hexsha
stringlengths 40
40
| size
int64 5
1.05M
| ext
stringclasses 588
values | lang
stringclasses 305
values | max_stars_repo_path
stringlengths 3
363
| max_stars_repo_name
stringlengths 5
118
| max_stars_repo_head_hexsha
stringlengths 40
40
| max_stars_repo_licenses
listlengths 1
10
| max_stars_count
float64 1
191k
⌀ | max_stars_repo_stars_event_min_datetime
stringdate 2015-01-01 00:00:35
2022-03-31 23:43:49
⌀ | max_stars_repo_stars_event_max_datetime
stringdate 2015-01-01 12:37:38
2022-03-31 23:59:52
⌀ | max_issues_repo_path
stringlengths 3
363
| max_issues_repo_name
stringlengths 5
118
| max_issues_repo_head_hexsha
stringlengths 40
40
| max_issues_repo_licenses
listlengths 1
10
| max_issues_count
float64 1
134k
⌀ | max_issues_repo_issues_event_min_datetime
stringlengths 24
24
⌀ | max_issues_repo_issues_event_max_datetime
stringlengths 24
24
⌀ | max_forks_repo_path
stringlengths 3
363
| max_forks_repo_name
stringlengths 5
135
| max_forks_repo_head_hexsha
stringlengths 40
40
| max_forks_repo_licenses
listlengths 1
10
| max_forks_count
float64 1
105k
⌀ | max_forks_repo_forks_event_min_datetime
stringdate 2015-01-01 00:01:02
2022-03-31 23:27:27
⌀ | max_forks_repo_forks_event_max_datetime
stringdate 2015-01-03 08:55:07
2022-03-31 23:59:24
⌀ | content
stringlengths 5
1.05M
| avg_line_length
float64 1.13
1.04M
| max_line_length
int64 1
1.05M
| alphanum_fraction
float64 0
1
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6150d0b021ebd4cde4c3b4f226dd414c3b362338
| 6,416
|
as
|
ActionScript
|
src/reflex/behaviors/SlideBehavior.as
|
reflex/reflex-framework
|
e2ccfdcd85e63c036bbc6eef832d2d97f2d526c5
|
[
"MIT"
] | 2
|
2015-11-19T09:10:50.000Z
|
2016-02-02T09:37:13.000Z
|
src/reflex/behaviors/SlideBehavior.as
|
reflex/reflex-framework
|
e2ccfdcd85e63c036bbc6eef832d2d97f2d526c5
|
[
"MIT"
] | 5
|
2021-08-13T20:25:30.000Z
|
2021-08-13T20:27:01.000Z
|
src/reflex/behaviors/SlideBehavior.as
|
reflex/reflex-framework
|
e2ccfdcd85e63c036bbc6eef832d2d97f2d526c5
|
[
"MIT"
] | 2
|
2019-05-12T07:34:46.000Z
|
2020-03-12T17:58:35.000Z
|
package reflex.behaviors
{
import flash.events.Event;
import flash.events.IEventDispatcher;
import flash.events.MouseEvent;
import reflex.data.IPagingPosition;
import reflex.data.IPosition;
public class SlideBehavior extends Behavior// extends StepBehavior
{
static public const HORIZONTAL:String = "horizontal";
static public const VERTICAL:String = "vertical";
private var _track:Object;
private var _thumb:Object;
private var _progress:Object;
private var _position:IPosition;
private var _mouseEnabled:Boolean = true;
public var page:Boolean = false;
public var layoutChildren:Boolean = true;
public var direction:String = HORIZONTAL;
[Bindable(event="trackChange")]
[Binding(target="target.skin.track")]
public function get track():Object { return _track; }
public function set track(value:Object):void {
notify("track", _track, _track = value);
}
[Bindable(event="thumbChange")]
[Binding(target="target.skin.thumb")]
public function get thumb():Object { return _thumb; }
public function set thumb(value:Object):void {
notify("thumb", _thumb, _thumb = value);
//(value as IEventDispatcher).addEventListener(MouseEvent.MOUSE_DOWN, onThumbDown, false, 0, true);
}
[Bindable(event="progressChange")]
[Binding(target="target.skin.progress")]
public function get progress():Object { return _progress; }
public function set progress(value:Object):void {
notify("progress", _progress, _progress = value);
}
[Bindable(event="positionChange")]
[Binding(target="target.position")]
public function get position():IPosition { return _position; }
public function set position(value:IPosition):void {
notify("position", _position, _position = value);
}
[Bindable(event="mouseEnabledChange")]
public function get mouseEnabled():Boolean { return _mouseEnabled; }
public function set mouseEnabled(value:Boolean):void {
notify("mouseEnabled", _mouseEnabled, _mouseEnabled = value);
}
public function SlideBehavior(target:IEventDispatcher = null, direction:String = "horizontal", page:Boolean = false) {
super(target);
this.direction = direction;
this.page = page;
//updateUILayout();
}
// behavior
[EventListener(event="click", target="track")]
public function onTrackPress(event:MouseEvent):void
{
if(_mouseEnabled) {
var t:Object = target as Object;
if(page) {
if(direction == HORIZONTAL) {
pagePosition(event.localX - track.x, track.width);
} else if(direction == VERTICAL) {
pagePosition(event.localY - track.y, track.height);
}
} else {
if(direction == HORIZONTAL) {
jumpToPosition(event.localX - track.x, track.width);
} else if(direction == VERTICAL) {
jumpToPosition(event.localY - track.y, track.height);
}
}
updateUIPosition();
}
}
[EventListener(event="mouseDown", target="thumb")]
public function onThumbDown(event:MouseEvent):void
{
if(_mouseEnabled) {
(target as Object).display.stage.addEventListener(Event.ENTER_FRAME, onEnterFrame, false, 0, true);
(target as Object).display.stage.addEventListener(MouseEvent.MOUSE_UP, onThumbUp, false, 0, true);
(target as Object).display.stage.addEventListener(Event.MOUSE_LEAVE, onThumbUp, false, 0, true);
//(target as Object).stage.addEventListener(MouseEvent.MOUSE_UP, onThumbUp, false, 0, true);
//(target as Object).stage.addEventListener(Event.MOUSE_LEAVE, onThumbUp, false, 0, true);
}
}
private function onThumbUp(event:MouseEvent):void {
(target as Object).display.stage.removeEventListener(Event.ENTER_FRAME, onEnterFrame, false);
(target as Object).display.stage.removeEventListener(MouseEvent.MOUSE_UP, onThumbUp, false);
(target as Object).display.stage.removeEventListener(Event.MOUSE_LEAVE, onThumbUp, false);
//(target as Object).stage.removeEventListener(MouseEvent.MOUSE_UP, onThumbUp, false);
//(target as Object).stage.removeEventListener(Event.MOUSE_LEAVE, onThumbUp, false);
}
private function onEnterFrame(event:Event):void {
var percent:Number = 0;
var t:Object = (target as Object).display;
if(direction == HORIZONTAL) {
percent = (t.mouseX - track.x)/track.width;
} else if(direction == VERTICAL) {
percent = (t.mouseY - track.y)/track.height;
}
var value:Number = (position.maximum-position.minimum)*percent + position.minimum;
position.value = Math.max(position.minimum, Math.min(position.maximum, value));
updateUIPosition();
}
// skinpart positioning
//[CommitProperties(properties="position.min, position.max, position.position, position.pageSize")]
[EventListener(event="valueChange", target="position")]
public function onPositionChange(event:Event):void {
updateUIPosition();
}
[EventListener(event="heightChange", target="target")]
public function onSizeChange(event:Event):void {
updateUILayout();
}
private function pagePosition(v:Number, length:Number):void {
var scroll:IPagingPosition = position as IPagingPosition;
if(scroll) {
var center:Number = length/2;
if(v < center) {
scroll.value -= scroll.pageSize;
} else {
scroll.value += scroll.pageSize;
}
}
}
private function jumpToPosition(v:Number, length:Number):void {
var percent:Number = v/length;
position.value = (position.maximum-position.minimum)*percent + position.minimum;
}
private function updateUIPosition():void {
var percent:Number = (position.value-position.minimum)/(position.maximum-position.minimum);
if(target) {
if(direction == HORIZONTAL) {
if(thumb && track) { thumb.x = track.x + (track.width-thumb.width) * percent; }
if(progress) { progress.width = track.width * percent; }
} else if(direction == VERTICAL) {
if(thumb && track) { thumb.y = track.y + (track.height-thumb.height) * percent; }
if(progress) { progress.height = track.height * percent; }
}
}
}
private function updateUILayout():void {
if(target) {
if(direction == HORIZONTAL) {
var h2:Number = (target as Object).height/2;
if(track) { track.y = h2 - track.height/2; }
if(thumb) { thumb.y = h2 - thumb.height/2; }
} else {
var w2:Number = (target as Object).width/2;
if(track) { track.x = w2 - track.width/2; }
if(thumb) { thumb.x = w2 - thumb.width/2; }
}
}
}
}
}
| 34.494624
| 120
| 0.694046
|
20a1361251a9db81c2b2b91ba2329bd2bf799780
| 1,407
|
as
|
ActionScript
|
demo/shapes/RectangleUnit.as
|
evan-liu/xface
|
47c56b5d5372049939ded81d95d28fe8b39b0b36
|
[
"MIT"
] | null | null | null |
demo/shapes/RectangleUnit.as
|
evan-liu/xface
|
47c56b5d5372049939ded81d95d28fe8b39b0b36
|
[
"MIT"
] | null | null | null |
demo/shapes/RectangleUnit.as
|
evan-liu/xface
|
47c56b5d5372049939ded81d95d28fe8b39b0b36
|
[
"MIT"
] | null | null | null |
package shapes
{
import xface.XFace;
import flash.display.Shape;
/**
* @author eidiot
*/
public class RectangleUnit
{
//======================================================================
// Variables
//======================================================================
private var shape:Shape;
//======================================================================
// Public methods
//======================================================================
[Before]
public function setUp():void
{
shape = new Shape();
XFace.display(shape, 10, 10);
}
[After]
public function tearDown():void
{
shape = null;
}
[Test]
public function fill_color():void
{
XFace.changeBackgroundColor(0x00FF00);
with (shape.graphics)
{
beginFill(0xFF0000);
drawRect(0, 0, 200, 100);
endFill();
}
}
[Test]
public function only_rim():void
{
XFace.changeBackgroundColor(0x0000FF);
with (shape.graphics)
{
lineStyle(0, 0xFF0000);
drawRect(0, 0, 200, 100);
endFill();
}
}
}
}
| 26.54717
| 80
| 0.33973
|
79a34f78cd999ee5149b68977408ed632cf1cc48
| 23,196
|
as
|
ActionScript
|
libs/laya/src/laya/webgl/WebGL.as
|
wildfirecode/LayaAir-ActionScript-Automation-Demo
|
08092ea69826ea8f13e4baa16a697e087851b16c
|
[
"MIT"
] | null | null | null |
libs/laya/src/laya/webgl/WebGL.as
|
wildfirecode/LayaAir-ActionScript-Automation-Demo
|
08092ea69826ea8f13e4baa16a697e087851b16c
|
[
"MIT"
] | null | null | null |
libs/laya/src/laya/webgl/WebGL.as
|
wildfirecode/LayaAir-ActionScript-Automation-Demo
|
08092ea69826ea8f13e4baa16a697e087851b16c
|
[
"MIT"
] | 1
|
2021-09-06T03:07:17.000Z
|
2021-09-06T03:07:17.000Z
|
package laya.webgl {
import laya.display.Sprite;
import laya.events.Event;
import laya.filters.Filter;
import laya.filters.IFilterAction;
import laya.filters.webgl.ColorFilterActionGL;
import laya.maths.Matrix;
import laya.maths.Point;
import laya.maths.Rectangle;
import laya.renders.Render;
import laya.renders.RenderContext;
import laya.renders.RenderSprite;
import laya.resource.Bitmap;
import laya.resource.Context;
import laya.resource.HTMLCanvas;
import laya.resource.HTMLImage;
import laya.resource.HTMLSubImage;
import laya.resource.ResourceManager;
import laya.resource.Texture;
import laya.system.System;
import laya.utils.Browser;
import laya.utils.Color;
import laya.utils.RunDriver;
import laya.webgl.atlas.AtlasResourceManager;
import laya.webgl.atlas.AtlasWebGLCanvas;
import laya.webgl.canvas.BlendMode;
import laya.webgl.canvas.WebGLContext2D;
import laya.webgl.display.GraphicsGL;
import laya.webgl.resource.IMergeAtlasBitmap;
import laya.webgl.resource.RenderTarget2D;
import laya.webgl.resource.WebGLCanvas;
import laya.webgl.resource.WebGLImage;
import laya.webgl.resource.WebGLSubImage;
import laya.webgl.shader.d2.Shader2D;
import laya.webgl.shader.d2.ShaderDefines2D;
import laya.webgl.shader.d2.skinAnishader.SkinMesh;
import laya.webgl.shader.d2.value.Value2D;
import laya.webgl.shader.Shader;
import laya.webgl.shader.ShaderValue;
import laya.webgl.submit.Submit;
import laya.webgl.submit.SubmitCMD;
import laya.webgl.submit.SubmitCMDScope;
import laya.webgl.text.DrawText;
import laya.webgl.utils.Buffer2D;
import laya.webgl.utils.RenderSprite3D;
import laya.webgl.utils.RenderState2D;
import laya.webgl.shader.d2.Shader2X;
import laya.webgl.utils.GlUtils;
import laya.webgl.utils.IndexBuffer2D;
import laya.webgl.utils.VertexBuffer2D;
/**
* @private
*/
public class WebGL {
/**@private */
public static var compressAstc:Object;
/**@private */
public static var compressAtc:Object;
/**@private */
public static var compressEtc:Object;
/**@private */
public static var compressEtc1:Object;
/**@private */
public static var compressPvrtc:Object;
/**@private */
public static var compressS3tc:Object;
/**@private */
public static var compressS3tc_srgb:Object;
public static var mainCanvas:HTMLCanvas;
public static var mainContext:WebGLContext;
public static var antialias:Boolean = true;
/**Shader是否支持高精度。 */
public static var frameShaderHighPrecision:Boolean;
private static var _bg_null:Array =/*[STATIC SAFE]*/ [0, 0, 0, 0];
private static function _uint8ArraySlice():Uint8Array {
var _this:* = __JS__("this");
var sz:int = _this.length;
var dec:Uint8Array = new Uint8Array(_this.length);
for (var i:int = 0; i < sz; i++) dec[i] = _this[i];
return dec;
}
private static function _float32ArraySlice():Float32Array {
var _this:* = __JS__("this");
var sz:int = _this.length;
var dec:Float32Array = new Float32Array(_this.length);
for (var i:int = 0; i < sz; i++) dec[i] = _this[i];
return dec;
}
private static function _uint16ArraySlice(... arg):Uint16Array {
var _this:* = __JS__("this");
var sz:int;
var dec:Uint16Array;
var i:int;
if (arg.length === 0) {
sz = _this.length;
dec = new Uint16Array(sz);
for (i = 0; i < sz; i++)
dec[i] = _this[i];
} else if (arg.length === 2) {
var start:int = arg[0];
var end:int = arg[1];
if (end > start) {
sz = end - start;
dec = new Uint16Array(sz);
for (i = start; i < end; i++)
dec[i - start] = _this[i];
} else {
dec = new Uint16Array(0);
}
}
return dec;
}
private static function expandContext():void {
var from:* = Context.prototype;
var to:* = __JS__("CanvasRenderingContext2D.prototype");
to.fillTrangles = from.fillTrangles;
Buffer2D.__int__(null);
to.setIBVB = function(x:Number, y:Number, ib:IndexBuffer2D, vb:VertexBuffer2D, numElement:int, mat:Matrix, shader:Shader, shaderValues:ShaderValue, startIndex:int = 0, offset:int = 0):void {
if (ib === null) {
this._ib = this._ib || IndexBuffer2D.QuadrangleIB;
ib = this._ib;
GlUtils.expandIBQuadrangle(ib, (vb._byteLength / (4 * 16) + 8));
}
this._setIBVB(x, y, ib, vb, numElement, mat, shader, shaderValues, startIndex, offset);
};
to.fillTrangles = function(tex:Texture, x:Number, y:Number, points:Array, m:Matrix):void {
this._curMat = this._curMat || Matrix.create();
this._vb = this._vb || VertexBuffer2D.create();
if (!this._ib) {
this._ib = IndexBuffer2D.create();
GlUtils.fillIBQuadrangle(this._ib, length / 4);
}
var vb:VertexBuffer2D = this._vb;
var length:int = points.length >> 4;
GlUtils.fillTranglesVB(vb, x, y, points, m || this._curMat, 0, 0);
GlUtils.expandIBQuadrangle(this._ib, (vb._byteLength / (4 * 16) + 8));
var shaderValues:Value2D = new Value2D(0x01, 0);// Value2D.create(0x01, 0);
shaderValues.textureHost = tex;
//var sd = RenderState2D.worldShaderDefines?shaderValues._withWorldShaderDefines():(Shader.sharders [shaderValues.mainID | shaderValues.defines._value] );
//var sd = new Shader2X("attribute vec4 position; attribute vec2 texcoord; uniform vec2 size; uniform mat4 mmat; varying vec2 v_texcoord; void main() { vec4 pos=mmat*position; gl_Position =vec4((pos.x/size.x-0.5)*2.0,(0.5-pos.y/size.y)*2.0,pos.z,1.0); v_texcoord = texcoord; }", "precision mediump float; varying vec2 v_texcoord; uniform sampler2D texture; void main() { vec4 color= texture2D(texture, v_texcoord); color.a*=1.0; gl_FragColor=color; }");
var sd:Shader = new Shader2X("attribute vec2 position; attribute vec2 texcoord; uniform vec2 size; uniform mat4 mmat; varying vec2 v_texcoord; void main() { vec4 p=vec4(position.xy,0.0,1.0);vec4 pos=mmat*p; gl_Position =vec4((pos.x/size.x-0.5)*2.0,(0.5-pos.y/size.y)*2.0,pos.z,1.0); v_texcoord = texcoord; }", "precision mediump float; varying vec2 v_texcoord; uniform sampler2D texture; void main() {vec4 color= texture2D(texture, v_texcoord); color.a*=1.0; gl_FragColor= color;}");
__JS__("vb._vertType =3");//表示使用XYUV
this._setIBVB(x, y, this._ib, vb, length * 6, m, sd, shaderValues, 0, 0);
}
}
public static function enable():Boolean {
Browser.__init__();
if (Render.isConchApp) {
if (!Render.isConchWebGL) {
RunDriver.skinAniSprite = function():* {
var tSkinSprite:SkinMesh = new SkinMesh()
return tSkinSprite;
}
expandContext();
return false;
}
}
RunDriver.getWebGLContext = function getWebGLContext(canvas:*):WebGLContext {
var gl:WebGLContext;
var names:Array = ["webgl", "experimental-webgl", "webkit-3d", "moz-webgl"];
for (var i:int = 0; i < names.length; i++) {
try {
gl = canvas.getContext(names[i], {stencil: Config.isStencil, alpha: Config.isAlpha, antialias: Config.isAntialias, premultipliedAlpha: Config.premultipliedAlpha, preserveDrawingBuffer: Config.preserveDrawingBuffer});//antialias为true,premultipliedAlpha为false,IOS和部分安卓QQ浏览器有黑屏或者白屏底色BUG
} catch (e:*) {
}
if (gl)
return gl;
}
return null;
}
mainContext = RunDriver.getWebGLContext(Render._mainCanvas);
if (mainContext == null)
return false;
if (Render.isWebGL) return true;
HTMLImage.create = function(src:String, def:* = null):HTMLImage {
return new WebGLImage(src, def);
}
HTMLSubImage.create = function(canvas:*, offsetX:int, offsetY:int, width:int, height:int, atlasImage:*, src:String):WebGLSubImage {
return new WebGLSubImage(canvas, offsetX, offsetY, width, height, atlasImage, src);
}
Render.WebGL = WebGL;
Render.isWebGL = true;
DrawText.__init__();
RunDriver.createRenderSprite = function(type:int, next:RenderSprite):RenderSprite {
return new RenderSprite3D(type, next);
}
RunDriver.createWebGLContext2D = function(c:HTMLCanvas):WebGLContext2D {
return new WebGLContext2D(c);
}
RunDriver.changeWebGLSize = function(width:Number, height:Number):void {
WebGL.onStageResize(width, height);
}
RunDriver.createGraphics = function():GraphicsGL {
return new GraphicsGL();
}
var action:* = RunDriver.createFilterAction;
RunDriver.createFilterAction = action ? action : function(type:int):IFilterAction {
return new ColorFilterActionGL()
}
RunDriver.clear = function(color:String):void {
RenderState2D.worldScissorTest && WebGL.mainContext.disable(WebGLContext.SCISSOR_TEST);
var ctx:* = Render.context.ctx;
//兼容浏览器
var c:Array = (ctx._submits._length == 0 || Config.preserveDrawingBuffer) ? Color.create(color)._color : Laya.stage._wgColor;
if (c) ctx.clearBG(c[0], c[1], c[2], c[3]);
RenderState2D.clear();
}
RunDriver.addToAtlas = function(texture:Texture, force:Boolean = false):void {
var bitmap:Bitmap = texture.bitmap;
if (!Render.optimizeTextureMemory(texture.url, texture)) {
(bitmap as IMergeAtlasBitmap).enableMerageInAtlas = false;
return;
}
if ((bitmap is IMergeAtlasBitmap) && ((bitmap as IMergeAtlasBitmap).allowMerageInAtlas)) {
bitmap.on(Event.RECOVERED, texture, texture.addTextureToAtlas);
}
}
RunDriver.isAtlas = function(bitmap:*):Boolean{
return bitmap is AtlasWebGLCanvas;
}
AtlasResourceManager._enable();
RunDriver.beginFlush = function():void {
var atlasResourceManager:AtlasResourceManager = AtlasResourceManager.instance;
var count:int = atlasResourceManager.getAtlaserCount();
for (var i:int = 0; i < count; i++) {
var atlerCanvas:AtlasWebGLCanvas = atlasResourceManager.getAtlaserByIndex(i).texture;
(atlerCanvas._flashCacheImageNeedFlush) && (RunDriver.flashFlushImage(atlerCanvas));
}
}
RunDriver.drawToCanvas = function(sprite:Sprite, _renderType:int, canvasWidth:Number, canvasHeight:Number, offsetX:Number, offsetY:Number):* {
offsetX -= sprite.x;
offsetY -= sprite.y;
var renderTarget:RenderTarget2D = new RenderTarget2D(canvasWidth, canvasHeight, WebGLContext.RGBA, WebGLContext.UNSIGNED_BYTE, 0, false);
renderTarget.start();
Render.context.clear();
sprite.render(Render.context, offsetX, RenderState2D.height - canvasHeight + offsetY);
Render.context.flush();
renderTarget.end();
var pixels:Uint8Array = renderTarget.getData(0, 0, renderTarget.width, renderTarget.height);
renderTarget.dispose();
var htmlCanvas:* = new WebGLCanvas();
htmlCanvas._canvas = Browser.createElement("canvas");
htmlCanvas.size(canvasWidth, canvasHeight);
var context:* = htmlCanvas._canvas.getContext('2d');
Browser.canvas.size(canvasWidth, canvasHeight);
var tempContext:* = Browser.context;
var imgData:* = tempContext.createImageData(canvasWidth, canvasHeight);
imgData.data.set(__JS__("new Uint8ClampedArray(pixels.buffer)"));
tempContext.putImageData(imgData, 0, 0);
context.save();
context.translate(0, canvasHeight);
context.scale(1, -1);
context.drawImage(Browser.canvas.source, 0, 0);
context.restore();
return htmlCanvas;
}
RunDriver.createFilterAction = function(type:int):* {
var action:*;
switch (type) {
case Filter.COLOR:
action = new ColorFilterActionGL();
break;
}
return action;
}
RunDriver.addTextureToAtlas = function(texture:Texture):void {
texture._uvID++;
AtlasResourceManager._atlasRestore++;
((texture.bitmap as IMergeAtlasBitmap).enableMerageInAtlas) && (AtlasResourceManager.instance.addToAtlas(texture));//资源恢复时重新加入大图集
}
RunDriver.getTexturePixels = function(value:Texture, x:Number, y:Number, width:Number, height:Number):Array {
(Render.context.ctx as WebGLContext2D).clear();
var tSprite:Sprite = new Sprite();
tSprite.graphics.drawTexture(value, -x, -y);
//启用RenderTarget2D,把精灵上的内容画上去
var tRenderTarget:RenderTarget2D = RenderTarget2D.create(width, height);
tRenderTarget.start();
tRenderTarget.clear(0, 0, 0, 0);
tSprite.render(Render.context, 0, 0);
(Render.context.ctx as WebGLContext2D).flush();
tRenderTarget.end();
var tUint8Array:Uint8Array = tRenderTarget.getData(0, 0, width, height);
var tArray:Array = [];
var tIndex:int = 0;
for (var i:int = height - 1; i >= 0; i--) {
for (var j:int = 0; j < width; j++) {
tIndex = (i * width + j) * 4;
tArray.push(tUint8Array[tIndex]);
tArray.push(tUint8Array[tIndex + 1]);
tArray.push(tUint8Array[tIndex + 2]);
tArray.push(tUint8Array[tIndex + 3]);
}
}
return tArray;
}
RunDriver.skinAniSprite = function():* {
var tSkinSprite:SkinMesh = new SkinMesh()
return tSkinSprite;
}
Filter._filterStart = function(scope:SubmitCMDScope, sprite:*, context:RenderContext, x:Number, y:Number):void {
var b:Rectangle = scope.getValue("bounds");
var source:RenderTarget2D = RenderTarget2D.create(b.width, b.height);
source.start();
source.clear(0, 0, 0, 0);
scope.addValue("src", source);
scope.addValue("ScissorTest", RenderState2D.worldScissorTest);
if (RenderState2D.worldScissorTest) {
var tClilpRect:Rectangle = new Rectangle();
tClilpRect.copyFrom((context.ctx as WebGLContext2D)._clipRect)
scope.addValue("clipRect", tClilpRect);
RenderState2D.worldScissorTest = false;
WebGL.mainContext.disable(WebGLContext.SCISSOR_TEST);
}
}
Filter._filterEnd = function(scope:SubmitCMDScope, sprite:*, context:RenderContext, x:Number, y:Number):void {
var b:Rectangle = scope.getValue("bounds");
var source:RenderTarget2D = scope.getValue("src");
source.end();
var out:RenderTarget2D = RenderTarget2D.create(b.width, b.height);
out.start();
out.clear(0, 0, 0, 0);
scope.addValue("out", out);
sprite._set$P('_filterCache', out);
sprite._set$P('_isHaveGlowFilter', scope.getValue("_isHaveGlowFilter"));
}
Filter._EndTarget = function(scope:SubmitCMDScope, context:RenderContext):void {
var source:RenderTarget2D = scope.getValue("src");
source.recycle();
var out:RenderTarget2D = scope.getValue("out");
out.end();
var b:Boolean = scope.getValue("ScissorTest");
if (b) {
RenderState2D.worldScissorTest = true;
WebGL.mainContext.enable(WebGLContext.SCISSOR_TEST);
context.ctx.save();
var tClipRect:Rectangle = scope.getValue("clipRect");
(context.ctx as WebGLContext2D).clipRect(tClipRect.x, tClipRect.y, tClipRect.width, tClipRect.height);
}
}
Filter._useSrc = function(scope:SubmitCMDScope):void {
var source:RenderTarget2D = scope.getValue("out");
source.end();
source = scope.getValue("src");
source.start();
source.clear(0, 0, 0, 0);
}
Filter._endSrc = function(scope:SubmitCMDScope):void {
var source:RenderTarget2D = scope.getValue("src");
source.end();
}
Filter._useOut = function(scope:SubmitCMDScope):void {
var source:RenderTarget2D = scope.getValue("src");
source.end();
source = scope.getValue("out");
source.start();
source.clear(0, 0, 0, 0);
}
Filter._endOut = function(scope:SubmitCMDScope):void {
var source:RenderTarget2D = scope.getValue("out");
source.end();
}
//scope:SubmitCMDScope
Filter._recycleScope = function(scope:SubmitCMDScope):void {
scope.recycle();
}
Filter._filter = function(sprite:*, context:*, x:Number, y:Number):void {
var next:* = this._next;
if (next) {
var filters:Array = sprite.filters, len:int = filters.length;
//如果只有对象只有一个滤镜,那么还用原来的方式
if (len == 1 && (filters[0].type == Filter.COLOR)) {
context.ctx.save();
context.ctx.setFilters([filters[0]]);
next._fun.call(next, sprite, context, x, y);
context.ctx.restore();
return;
}
//思路:依次遍历滤镜,每次滤镜都画到out的RenderTarget上,然后把out画取src的RenderTarget做原图,去叠加新的滤镜
var shaderValue:Value2D
var b:Rectangle;
var scope:SubmitCMDScope = SubmitCMDScope.create();
var p:Point = Point.TEMP;
var tMatrix:Matrix = context.ctx._getTransformMatrix();
var mat:Matrix = Matrix.create();
tMatrix.copyTo(mat);
var tPadding:int = 0;
var tHalfPadding:int = 0;
var tIsHaveGlowFilter:Boolean = false;
//这里判断是否存储了out,如果存储了直接用;
var out:RenderTarget2D = sprite._$P._filterCache ? sprite._$P._filterCache : null;
if (!out || sprite._repaint) {
tIsHaveGlowFilter = sprite._isHaveGlowFilter();
scope.addValue("_isHaveGlowFilter", tIsHaveGlowFilter);
if (tIsHaveGlowFilter) {
tPadding = 50;
tHalfPadding = 25;
}
b = new Rectangle();
b.copyFrom((sprite as Sprite).getSelfBounds());
b.x += (sprite as Sprite).x;
b.y += (sprite as Sprite).y;
b.x -= (sprite as Sprite).pivotX + 4;//blur
b.y -= (sprite as Sprite).pivotY + 4;//blur
var tSX:Number = b.x;
var tSY:Number = b.y;
//重新计算宽和高
b.width += (tPadding + 8);//增加宽度 blur 由于blur系数为9
b.height += (tPadding + 8);//增加高度 blur
p.x = b.x * mat.a + b.y * mat.c;
p.y = b.y * mat.d + b.x * mat.b;
b.x = p.x;
b.y = p.y;
p.x = b.width * mat.a + b.height * mat.c;
p.y = b.height * mat.d + b.width * mat.b;
b.width = p.x;
b.height = p.y;
if (b.width <= 0 || b.height <= 0) {
return;
}
out && out.recycle();
scope.addValue("bounds", b);
var submit:SubmitCMD = SubmitCMD.create([scope, sprite, context, 0, 0], Filter._filterStart);
context.addRenderObject(submit);
(context.ctx as WebGLContext2D)._renderKey = 0;
(context.ctx as WebGLContext2D)._shader2D.glTexture = null;//绘制前置空下,保证不会被打包进上一个序列
var tX:Number = sprite.x - tSX + tHalfPadding;
var tY:Number = sprite.y - tSY + tHalfPadding;
next._fun.call(next, sprite, context, tX, tY);
submit = SubmitCMD.create([scope, sprite, context, 0, 0], Filter._filterEnd);
context.addRenderObject(submit);
for (var i:int = 0; i < len; i++) {
if (i != 0) {
//把out画到src上
submit = SubmitCMD.create([scope], Filter._useSrc);
context.addRenderObject(submit);
shaderValue = Value2D.create(ShaderDefines2D.TEXTURE2D, 0);
Matrix.TEMP.identity();
context.ctx.drawTarget(scope, 0, 0, b.width, b.height, Matrix.TEMP, "out", shaderValue, null, BlendMode.TOINT.overlay);
submit = SubmitCMD.create([scope], Filter._useOut);
context.addRenderObject(submit);
}
var fil:* = filters[i];
fil.action.apply3d(scope, sprite, context, 0, 0);
}
submit = SubmitCMD.create([scope, context], Filter._EndTarget);
context.addRenderObject(submit);
} else {
tIsHaveGlowFilter = sprite._$P._isHaveGlowFilter ? sprite._$P._isHaveGlowFilter : false;
if (tIsHaveGlowFilter) {
tPadding = 50;
tHalfPadding = 25;
}
b = sprite.getBounds();
if (b.width <= 0 || b.height <= 0) {
return;
}
b.width += tPadding;
b.height += tPadding;
p.x = b.x * mat.a + b.y * mat.c;
p.y = b.y * mat.d + b.x * mat.b;
b.x = p.x;
b.y = p.y;
p.x = b.width * mat.a + b.height * mat.c;
p.y = b.height * mat.d + b.width * mat.b;
b.width = p.x;
b.height = p.y;
scope.addValue("out", out);
}
x = x - tHalfPadding - sprite.x;
y = y - tHalfPadding - sprite.y;
p.setTo(x, y);
mat.transformPoint(p);
x = p.x + b.x;
y = p.y + b.y;
shaderValue = Value2D.create(ShaderDefines2D.TEXTURE2D, 0);
//把最后的out纹理画出来
Matrix.TEMP.identity();
(context.ctx as WebGLContext2D).drawTarget(scope, x, y, b.width, b.height, Matrix.TEMP, "out", shaderValue, null, BlendMode.TOINT.overlay);
//把对象放回池子中
submit = SubmitCMD.create([scope], Filter._recycleScope);
context.addRenderObject(submit);
mat.destroy();
}
}
Float32Array.prototype.slice || (Float32Array.prototype.slice = _float32ArraySlice);
Uint16Array.prototype.slice || (Uint16Array.prototype.slice = _uint16ArraySlice);
Uint8Array.prototype.slice || (Uint8Array.prototype.slice = _uint8ArraySlice);
return true;
}
public static function onStageResize(width:Number, height:Number):void {
if (mainContext == null) return;
mainContext.viewport(0, 0, width, height);
/*[IF-FLASH]*/
mainContext.configureBackBuffer(width, height, 0, true);
RenderState2D.width = width;
RenderState2D.height = height;
}
private static function onInvalidGLRes():void {
AtlasResourceManager.instance.freeAll();
ResourceManager.releaseContentManagers(true);
doNodeRepaint(Laya.stage);
mainContext.viewport(0, 0, RenderState2D.width, RenderState2D.height);
Laya.stage.event(Event.DEVICE_LOST);
//Render.context.ctx._repaint = true;
//alert("释放资源");
}
public static function doNodeRepaint(sprite:Sprite):void {
(sprite.numChildren == 0) && (sprite.repaint());
for (var i:int = 0; i < sprite.numChildren; i++)
doNodeRepaint(sprite.getChildAt(i) as Sprite);
}
public static function init(canvas:HTMLCanvas, width:int, height:int):void {
mainCanvas = canvas;
HTMLCanvas._createContext = function(canvas:HTMLCanvas):* {
return new WebGLContext2D(canvas);
}
var gl:WebGLContext = WebGL.mainContext;
if (gl.getShaderPrecisionFormat != null) {//某些浏览器中未实现此函数,提前判断增强兼容性。
var precisionFormat:* = gl.getShaderPrecisionFormat(WebGLContext.FRAGMENT_SHADER, WebGLContext.HIGH_FLOAT);
frameShaderHighPrecision = precisionFormat.precision ? true : false;
} else {
frameShaderHighPrecision = false;
}
compressAstc = gl.getExtension("WEBGL_compressed_texture_astc");
compressAtc = gl.getExtension("WEBGL_compressed_texture_atc");
compressEtc = gl.getExtension("WEBGL_compressed_texture_etc");
compressEtc1 = gl.getExtension("WEBGL_compressed_texture_etc1");
compressPvrtc = gl.getExtension("WEBGL_compressed_texture_pvrtc");
compressS3tc = gl.getExtension("WEBGL_compressed_texture_s3tc");
compressS3tc_srgb = gl.getExtension("WEBGL_compressed_texture_s3tc_srgb");
//var compresseFormat:Uint32Array = gl.getParameter(WebGLContext.COMPRESSED_TEXTURE_FORMATS);
//alert(compresseFormat.length);
/*[IF-SCRIPT-BEGIN]
gl.deleteTexture1 = gl.deleteTexture;
gl.deleteTexture = function(t){
if (t == WebGLContext.curBindTexValue)
{
WebGLContext.curBindTexValue = null;
}
gl.deleteTexture1(t);
}
[IF-SCRIPT-END]*/
onStageResize(width, height);
if (mainContext == null)
throw new Error("webGL getContext err!");
System.__init__();
AtlasResourceManager.__init__();
ShaderDefines2D.__init__();
Submit.__init__();
WebGLContext2D.__init__();
Value2D.__init__();
Shader2D.__init__();
Buffer2D.__int__(gl);
BlendMode._init_(gl);
if (Render.isConchApp) {
__JS__("conch.setOnInvalidGLRes(WebGL.onInvalidGLRes)");
}
}
}
}
| 37.054313
| 487
| 0.674211
|
c685546f6ca0d36f4374448dd0d55c9725bc444e
| 1,609
|
as
|
ActionScript
|
SJGame/src/SJ/Game/onlineReward/CJOLRewardModul.as
|
liu-jack/SJGame
|
2ade3f9d4ec3cf6a6589301d77dd980cfa2500d5
|
[
"MIT"
] | 1
|
2021-06-09T23:39:11.000Z
|
2021-06-09T23:39:11.000Z
|
SJGame/src/SJ/Game/onlineReward/CJOLRewardModul.as
|
liu-jack/SJGame
|
2ade3f9d4ec3cf6a6589301d77dd980cfa2500d5
|
[
"MIT"
] | null | null | null |
SJGame/src/SJ/Game/onlineReward/CJOLRewardModul.as
|
liu-jack/SJGame
|
2ade3f9d4ec3cf6a6589301d77dd980cfa2500d5
|
[
"MIT"
] | null | null | null |
package SJ.Game.onlineReward
{
import SJ.Common.Constants.ConstResource;
import SJ.Game.CJModulePopupBase;
import SJ.Game.layer.CJLayerManager;
import SJ.Game.layer.CJLoadingLayer;
import engine_starling.utils.AssetManagerUtil;
import engine_starling.utils.FeatherControlUtils.SFeatherControlUtils;
public class CJOLRewardModul extends SJ.Game.CJModulePopupBase
{
private var _layer:CJOLRewardLayer;
public function CJOLRewardModul()
{
super("CJOLRewardModul");
}
override public function getPreloadResource():Array
{
return [ConstResource.sResXmlItem_1];
}
override protected function _onEnter(params:Object=null):void
{
super._onEnter(params);
CJLoadingLayer.show();
AssetManagerUtil.o.loadPrepareInQueueWithArray("CJOLRewardModulResource", getPreloadResource());
AssetManagerUtil.o.loadQueue(_onProgress);
}
private function _onProgress(r:Number):void
{
//设置加载动画的进度
CJLoadingLayer.loadingprogress = r;
if(r == 1)
{
//移除加载动画
CJLoadingLayer.close();
var s:XML = AssetManagerUtil.o.getObject("onlineRewardLayout.sxml") as XML;
_layer = SFeatherControlUtils.o.genLayoutFromXML(s,CJOLRewardLayer) as CJOLRewardLayer;
CJLayerManager.o.addToModuleLayerFadein(_layer);
_layer.addAllListener();
}
}
override protected function _onExit(params:Object=null):void
{
_layer.removeAllListener(); // 移除监听
CJLayerManager.o.removeFromLayerFadeout(_layer);
_layer = null;
AssetManagerUtil.o.disposeAssetsByGroup("CJOLRewardModulResource");
super._onExit(params);
}
}
}
| 25.140625
| 99
| 0.744562
|
dc406e99809d2290061e51d935a7662d75913096
| 1,464
|
as
|
ActionScript
|
client/src/kabam/rotmg/application/impl/ProductionSetup.as
|
OryxSlayer1337/LoE-Realm-NC-2
|
757473a54e410f6b0d69b6ab9fa561acb4ce5f3f
|
[
"MIT"
] | 1
|
2018-12-02T02:01:42.000Z
|
2018-12-02T02:01:42.000Z
|
client/src/kabam/rotmg/application/impl/ProductionSetup.as
|
OryxSlayer1337/LoE-Realm-NC-2
|
757473a54e410f6b0d69b6ab9fa561acb4ce5f3f
|
[
"MIT"
] | null | null | null |
client/src/kabam/rotmg/application/impl/ProductionSetup.as
|
OryxSlayer1337/LoE-Realm-NC-2
|
757473a54e410f6b0d69b6ab9fa561acb4ce5f3f
|
[
"MIT"
] | 12
|
2018-11-08T14:35:04.000Z
|
2019-11-08T15:03:04.000Z
|
package kabam.rotmg.application.impl {
import com.company.assembleegameclient.parameters.Parameters;
import kabam.rotmg.application.api.ApplicationSetup;
public class ProductionSetup implements ApplicationSetup {
private const SERVER:String = Parameters.ENVIRONMENT_DNS + ":" + Parameters.ENVIRONMENT_PORT;
private const PROTOCOL:String = "{PROTOCOL}://" + SERVER;
private const BUILD_LABEL:String = "<font color='#FFFF00'><b>Official</b> {CLIENT_NAME}</font> #{VERSION}.{MINOR}";
public function getAppEngineUrl(_arg1:Boolean = true):String {
return this.PROTOCOL.replace("{PROTOCOL}", Parameters.CONNECTION_SECURITY_PROTOCOL);
}
public function getBuildLabel():String {
return this.BUILD_LABEL.replace("{VERSION}", Parameters.BUILD_VERSION).replace("{MINOR}", Parameters.MINOR_VERSION).replace("{CLIENT_NAME}", Parameters.CLIENT_NAME);
}
public function useLocalTextures():Boolean {
return (false);
}
public function isToolingEnabled():Boolean {
return (false);
}
public function isGameLoopMonitored():Boolean {
return (false);
}
public function useProductionDialogs():Boolean {
return (true);
}
public function areErrorsReported():Boolean {
return (false);
}
public function areDeveloperHotkeysEnabled():Boolean {
return (false);
}
public function isDebug():Boolean {
return (false);
}
}
}
| 28.705882
| 173
| 0.691257
|
7321e82aea8bef14afe4ba485100007d201b7837
| 6,546
|
as
|
ActionScript
|
Source Client/By ID/sprite20923.as
|
AXeL-dev/Dofus-client-1.29
|
e09c7e5fec1fff0d542a16985868fc561aeca02b
|
[
"MIT"
] | 1
|
2021-01-18T15:19:16.000Z
|
2021-01-18T15:19:16.000Z
|
Source Client/By ID/sprite20923.as
|
Guardian820/Dofus-client-1.29
|
e09c7e5fec1fff0d542a16985868fc561aeca02b
|
[
"MIT"
] | null | null | null |
Source Client/By ID/sprite20923.as
|
Guardian820/Dofus-client-1.29
|
e09c7e5fec1fff0d542a16985868fc561aeca02b
|
[
"MIT"
] | 1
|
2020-10-07T20:03:49.000Z
|
2020-10-07T20:03:49.000Z
|
// Action script...
// [Initial MovieClip Action of sprite 20923]
#initclip 188
if (!dofus.graphics.gapi.ui.bigstore.BigStorePriceItem)
{
if (!dofus)
{
_global.dofus = new Object();
} // end if
if (!dofus.graphics)
{
_global.dofus.graphics = new Object();
} // end if
if (!dofus.graphics.gapi)
{
_global.dofus.graphics.gapi = new Object();
} // end if
if (!dofus.graphics.gapi.ui)
{
_global.dofus.graphics.gapi.ui = new Object();
} // end if
if (!dofus.graphics.gapi.ui.bigstore)
{
_global.dofus.graphics.gapi.ui.bigstore = new Object();
} // end if
var _loc1 = (_global.dofus.graphics.gapi.ui.bigstore.BigStorePriceItem = function ()
{
super();
}).prototype;
_loc1.__set__list = function (mcList)
{
this._mcList = mcList;
//return (this.list());
};
_loc1.__set__row = function (mcRow)
{
this._mcRow = mcRow;
//return (this.row());
};
_loc1.setValue = function (bUsed, sSuggested, oItem)
{
delete this._nSelectedSet;
if (bUsed)
{
this._oItem = oItem;
var _loc5 = this._mcList._parent._parent.isThisPriceSelected(oItem.id, 1);
var _loc6 = this._mcList._parent._parent.isThisPriceSelected(oItem.id, 2);
var _loc7 = this._mcList._parent._parent.isThisPriceSelected(oItem.id, 3);
if (_loc5)
{
var _loc8 = this._btnPriceSet1;
} // end if
if (_loc6)
{
_loc8 = this._btnPriceSet2;
} // end if
if (_loc7)
{
_loc8 = this._btnPriceSet3;
} // end if
if (_loc5 || (_loc6 || _loc7))
{
var _loc9 = this._btnBuy;
} // end if
if (_loc9 != undefined)
{
this._mcList._parent._parent.setButtons(_loc8, _loc9);
} // end if
this._btnPriceSet1.selected = _loc5 && !_global.isNaN(oItem.priceSet1);
this._btnPriceSet2.selected = _loc6 && !_global.isNaN(oItem.priceSet2);
this._btnPriceSet3.selected = _loc7 && !_global.isNaN(oItem.priceSet3);
if (_loc5)
{
this._nSelectedSet = 1;
}
else if (_loc6)
{
this._nSelectedSet = 2;
}
else if (_loc7)
{
this._nSelectedSet = 3;
} // end else if
this._btnBuy.enabled = this._nSelectedSet != undefined;
this._btnBuy._visible = true;
this._btnPriceSet1._visible = true;
this._btnPriceSet2._visible = true;
this._btnPriceSet3._visible = true;
this._btnPriceSet1.enabled = !_global.isNaN(oItem.priceSet1);
this._btnPriceSet2.enabled = !_global.isNaN(oItem.priceSet2);
this._btnPriceSet3.enabled = !_global.isNaN(oItem.priceSet3);
this._btnPriceSet1.label = _global.isNaN(oItem.priceSet1) ? ("- ") : (new ank.utils.ExtendedString(oItem.priceSet1).addMiddleChar(this._mcList.gapi.api.lang.getConfigText("THOUSAND_SEPARATOR"), 3) + " ");
this._btnPriceSet2.label = _global.isNaN(oItem.priceSet2) ? ("- ") : (new ank.utils.ExtendedString(oItem.priceSet2).addMiddleChar(this._mcList.gapi.api.lang.getConfigText("THOUSAND_SEPARATOR"), 3) + " ");
this._btnPriceSet3.label = _global.isNaN(oItem.priceSet3) ? ("- ") : (new ank.utils.ExtendedString(oItem.priceSet3).addMiddleChar(this._mcList.gapi.api.lang.getConfigText("THOUSAND_SEPARATOR"), 3) + " ");
this._ldrIcon.contentParams = oItem.item.params;
this._ldrIcon.contentPath = oItem.item.iconFile;
}
else if (this._ldrIcon.contentPath != undefined)
{
this._btnPriceSet1._visible = false;
this._btnPriceSet2._visible = false;
this._btnPriceSet3._visible = false;
this._btnBuy._visible = false;
this._ldrIcon.contentPath = "";
} // end else if
};
_loc1.init = function ()
{
super.init(false);
this._btnPriceSet1._visible = false;
this._btnPriceSet2._visible = false;
this._btnPriceSet3._visible = false;
this._btnBuy._visible = false;
};
_loc1.createChildren = function ()
{
this.addToQueue({object: this, method: this.addListeners});
this.addToQueue({object: this, method: this.initTexts});
};
_loc1.addListeners = function ()
{
this._btnPriceSet1.addEventListener("click", this);
this._btnPriceSet2.addEventListener("click", this);
this._btnPriceSet3.addEventListener("click", this);
this._btnBuy.addEventListener("click", this);
};
_loc1.initTexts = function ()
{
this._btnBuy.label = this._mcList.gapi.api.lang.getText("BUY");
};
_loc1.click = function (oEvent)
{
switch (oEvent.target._name)
{
case "_btnPriceSet1":
case "_btnPriceSet2":
case "_btnPriceSet3":
{
var _loc3 = Number(oEvent.target._name.substr(12));
this._mcList._parent._parent.selectPrice(this._oItem, _loc3, oEvent.target, this._btnBuy);
if (oEvent.target.selected)
{
this._nSelectedSet = _loc3;
this._mcRow.select();
this._btnBuy.enabled = true;
}
else
{
delete this._nSelectedSet;
this._btnBuy.enabled = false;
} // end else if
break;
}
case "_btnBuy":
{
if (!this._nSelectedSet || _global.isNaN(this._nSelectedSet))
{
this._btnBuy.enabled = false;
return;
} // end if
this._mcList._parent._parent.askBuy(this._oItem.item, this._nSelectedSet, this._oItem["priceSet" + this._nSelectedSet]);
this._mcList._parent._parent.askMiddlePrice(this._oItem.item);
break;
}
} // End of switch
};
_loc1.addProperty("row", function ()
{
}, _loc1.__set__row);
_loc1.addProperty("list", function ()
{
}, _loc1.__set__list);
ASSetPropFlags(_loc1, null, 1);
} // end if
#endinitclip
| 36.983051
| 218
| 0.551024
|
ca0cf8354cfb6f95641d442a38eab2e465270a9e
| 15,484
|
as
|
ActionScript
|
swf/starling/display/DisplayObjectContainer.as
|
lukastechhonda/BigBangEmpireBot
|
5d5666c9d06111dc079f61b6038e2338d21fc8a7
|
[
"MIT"
] | 1
|
2019-10-31T13:49:58.000Z
|
2019-10-31T13:49:58.000Z
|
swf/starling/display/DisplayObjectContainer.as
|
lukastechhonda/BigBangEmpireBot
|
5d5666c9d06111dc079f61b6038e2338d21fc8a7
|
[
"MIT"
] | 11
|
2018-09-30T15:17:00.000Z
|
2022-02-13T11:52:26.000Z
|
swf/starling/display/DisplayObjectContainer.as
|
Zweer/BigBangEmpireBot
|
d0fd04118822bf0eb6fffd271ce944f0475c5998
|
[
"MIT"
] | 6
|
2018-06-18T18:43:46.000Z
|
2021-03-03T21:48:43.000Z
|
package starling.display
{
import flash.geom.Matrix;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.system.Capabilities;
import flash.utils.getQualifiedClassName;
import starling.errors.AbstractClassError;
import starling.events.Event;
import starling.filters.FragmentFilter;
import starling.rendering.BatchToken;
import starling.rendering.Painter;
import starling.utils.MatrixUtil;
public class DisplayObjectContainer extends DisplayObject
{
private static var sHelperMatrix:Matrix = new Matrix();
private static var sHelperPoint:Point = new Point();
private static var sBroadcastListeners:Vector.<DisplayObject> = new Vector.<DisplayObject>(0);
private static var sSortBuffer:Vector.<DisplayObject> = new Vector.<DisplayObject>(0);
private static var sCacheToken:BatchToken = new BatchToken();
private var _children:Vector.<DisplayObject>;
private var _touchGroup:Boolean;
public function DisplayObjectContainer()
{
super();
if(Capabilities.isDebugger && getQualifiedClassName(this) == "starling.display::DisplayObjectContainer")
{
throw new AbstractClassError();
}
_children = new Vector.<DisplayObject>(0);
}
private static function mergeSort(param1:Vector.<DisplayObject>, param2:Function, param3:int, param4:int, param5:Vector.<DisplayObject>) : void
{
var _loc9_:* = 0;
var _loc7_:int = 0;
var _loc8_:int = 0;
var _loc10_:* = 0;
var _loc6_:int = 0;
if(param4 > 1)
{
_loc7_ = param3 + param4;
_loc8_ = param4 / 2;
_loc10_ = param3;
_loc6_ = param3 + _loc8_;
mergeSort(param1,param2,param3,_loc8_,param5);
mergeSort(param1,param2,param3 + _loc8_,param4 - _loc8_,param5);
_loc9_ = 0;
while(_loc9_ < param4)
{
if(_loc10_ < param3 + _loc8_ && (_loc6_ == _loc7_ || param2(param1[_loc10_],param1[_loc6_]) <= 0))
{
param5[_loc9_] = param1[_loc10_];
_loc10_++;
}
else
{
param5[_loc9_] = param1[_loc6_];
_loc6_++;
}
_loc9_++;
}
_loc9_ = param3;
while(_loc9_ < _loc7_)
{
param1[_loc9_] = param5[int(_loc9_ - param3)];
_loc9_++;
}
}
}
override public function dispose() : void
{
var _loc1_:int = 0;
_loc1_ = _children.length - 1;
while(_loc1_ >= 0)
{
_children[_loc1_].dispose();
_loc1_--;
}
super.dispose();
}
public function addChild(param1:DisplayObject) : DisplayObject
{
return addChildAt(param1,_children.length);
}
public function addChildAt(param1:DisplayObject, param2:int) : DisplayObject
{
var _loc3_:* = null;
var _loc4_:int = _children.length;
if(param2 >= 0 && param2 <= _loc4_)
{
setRequiresRedraw();
if(param1.parent == this)
{
setChildIndex(param1,param2);
}
else
{
_children.insertAt(param2,param1);
param1.removeFromParent();
param1.setParent(this);
param1.dispatchEventWith("added",true);
if(stage)
{
_loc3_ = param1 as DisplayObjectContainer;
if(_loc3_)
{
_loc3_.broadcastEventWith("addedToStage");
}
else
{
param1.dispatchEventWith("addedToStage");
}
}
}
return param1;
}
throw new RangeError("Invalid child index");
}
public function removeChild(param1:DisplayObject, param2:Boolean = false) : DisplayObject
{
var _loc3_:int = getChildIndex(param1);
if(_loc3_ != -1)
{
return removeChildAt(_loc3_,param2);
}
return null;
}
public function removeChildAt(param1:int, param2:Boolean = false) : DisplayObject
{
var _loc4_:* = null;
var _loc3_:* = null;
if(param1 >= 0 && param1 < _children.length)
{
setRequiresRedraw();
_loc4_ = _children[param1];
_loc4_.dispatchEventWith("removed",true);
if(stage)
{
_loc3_ = _loc4_ as DisplayObjectContainer;
if(_loc3_)
{
_loc3_.broadcastEventWith("removedFromStage");
}
else
{
_loc4_.dispatchEventWith("removedFromStage");
}
}
_loc4_.setParent(null);
param1 = _children.indexOf(_loc4_);
if(param1 >= 0)
{
_children.removeAt(param1);
}
if(param2)
{
_loc4_.dispose();
}
return _loc4_;
}
throw new RangeError("Invalid child index");
}
public function removeChildren(param1:int = 0, param2:int = -1, param3:Boolean = false) : void
{
var _loc4_:* = 0;
if(param2 < 0 || param2 >= numChildren)
{
param2 = numChildren - 1;
}
_loc4_ = param1;
while(_loc4_ <= param2)
{
removeChildAt(param1,param3);
_loc4_++;
}
}
public function getChildAt(param1:int) : DisplayObject
{
var _loc2_:int = _children.length;
if(param1 < 0)
{
param1 = _loc2_ + param1;
}
if(param1 >= 0 && param1 < _loc2_)
{
return _children[param1];
}
throw new RangeError("Invalid child index");
}
public function getChildByName(param1:String) : DisplayObject
{
var _loc3_:int = 0;
var _loc2_:int = _children.length;
_loc3_ = 0;
while(_loc3_ < _loc2_)
{
if(_children[_loc3_].name == param1)
{
return _children[_loc3_];
}
_loc3_++;
}
return null;
}
public function getChildIndex(param1:DisplayObject) : int
{
return _children.indexOf(param1);
}
public function setChildIndex(param1:DisplayObject, param2:int) : void
{
var _loc3_:int = getChildIndex(param1);
if(_loc3_ == param2)
{
return;
}
if(_loc3_ == -1)
{
throw new ArgumentError("Not a child of this container");
}
_children.removeAt(_loc3_);
_children.insertAt(param2,param1);
setRequiresRedraw();
}
public function swapChildren(param1:DisplayObject, param2:DisplayObject) : void
{
var _loc3_:int = getChildIndex(param1);
var _loc4_:int = getChildIndex(param2);
if(_loc3_ == -1 || _loc4_ == -1)
{
throw new ArgumentError("Not a child of this container");
}
swapChildrenAt(_loc3_,_loc4_);
}
public function swapChildrenAt(param1:int, param2:int) : void
{
var _loc4_:DisplayObject = getChildAt(param1);
var _loc3_:DisplayObject = getChildAt(param2);
_children[param1] = _loc3_;
_children[param2] = _loc4_;
setRequiresRedraw();
}
public function sortChildren(param1:Function) : void
{
sSortBuffer.length = _children.length;
mergeSort(_children,param1,0,_children.length,sSortBuffer);
sSortBuffer.length = 0;
setRequiresRedraw();
}
public function contains(param1:DisplayObject) : Boolean
{
while(param1)
{
if(param1 == this)
{
return true;
}
param1 = param1.parent;
}
return false;
}
override public function getBounds(param1:DisplayObject, param2:Rectangle = null) : Rectangle
{
var _loc4_:* = NaN;
var _loc3_:* = NaN;
var _loc8_:int = 0;
if(param2 == null)
{
param2 = new Rectangle();
}
var _loc7_:int = _children.length;
if(_loc7_ == 0)
{
getTransformationMatrix(param1,sHelperMatrix);
MatrixUtil.transformCoords(sHelperMatrix,0,0,sHelperPoint);
param2.setTo(sHelperPoint.x,sHelperPoint.y,0,0);
}
else if(_loc7_ == 1)
{
_children[0].getBounds(param1,param2);
}
else
{
_loc4_ = 1.79769313486232e308;
var _loc6_:* = -1.79769313486232e308;
_loc3_ = 1.79769313486232e308;
var _loc5_:* = -1.79769313486232e308;
_loc8_ = 0;
while(_loc8_ < _loc7_)
{
_children[_loc8_].getBounds(param1,param2);
if(_loc4_ > param2.x)
{
_loc4_ = Number(param2.x);
}
if(_loc6_ < param2.right)
{
_loc6_ = Number(param2.right);
}
if(_loc3_ > param2.y)
{
_loc3_ = Number(param2.y);
}
if(_loc5_ < param2.bottom)
{
_loc5_ = Number(param2.bottom);
}
_loc8_++;
}
param2.setTo(_loc4_,_loc3_,_loc6_ - _loc4_,_loc5_ - _loc3_);
}
return param2;
}
override public function hitTest(param1:Point) : DisplayObject
{
var _loc4_:int = 0;
var _loc7_:* = null;
if(!visible || !touchable || !hitTestMask(param1))
{
return null;
}
var _loc6_:DisplayObject = null;
var _loc5_:Number = param1.x;
var _loc2_:Number = param1.y;
var _loc3_:int = _children.length;
_loc4_ = _loc3_ - 1;
while(_loc4_ >= 0)
{
_loc7_ = _children[_loc4_];
if(!_loc7_.isMask)
{
sHelperMatrix.copyFrom(_loc7_.transformationMatrix);
sHelperMatrix.invert();
MatrixUtil.transformCoords(sHelperMatrix,_loc5_,_loc2_,sHelperPoint);
_loc6_ = _loc7_.hitTest(sHelperPoint);
if(_loc6_)
{
return !!_touchGroup?this:_loc6_;
}
}
_loc4_--;
}
return null;
}
override public function render(param1:Painter) : void
{
var _loc7_:int = 0;
var _loc10_:* = null;
var _loc9_:* = null;
var _loc3_:* = null;
var _loc2_:* = null;
var _loc11_:* = null;
var _loc6_:int = _children.length;
var _loc5_:uint = param1.frameID;
var _loc4_:* = _loc5_ != 0;
var _loc8_:* = _lastParentOrSelfChangeFrameID == _loc5_;
param1.pushState();
_loc7_ = 0;
while(_loc7_ < _loc6_)
{
_loc10_ = _children[_loc7_];
if(_loc10_._hasVisibleArea)
{
if(_loc7_ != 0)
{
param1.restoreState();
}
if(_loc8_)
{
_loc10_._lastParentOrSelfChangeFrameID = _loc5_;
}
if(_loc10_._lastParentOrSelfChangeFrameID != _loc5_ && _loc10_._lastChildChangeFrameID != _loc5_ && _loc10_._tokenFrameID == _loc5_ - 1 && _loc4_)
{
param1.fillToken(sCacheToken);
param1.drawFromCache(_loc10_._pushToken,_loc10_._popToken);
param1.fillToken(_loc10_._popToken);
_loc10_._pushToken.copyFrom(sCacheToken);
}
else
{
_loc9_ = !!_loc4_?_loc10_._pushToken:null;
_loc3_ = !!_loc4_?_loc10_._popToken:null;
_loc2_ = _loc10_._filter;
_loc11_ = _loc10_._mask;
param1.fillToken(_loc9_);
param1.setStateTo(_loc10_.transformationMatrix,_loc10_.alpha,_loc10_.blendMode);
if(_loc11_)
{
param1.drawMask(_loc11_,_loc10_);
}
if(_loc2_)
{
_loc2_.render(param1);
}
else
{
_loc10_.render(param1);
}
if(_loc11_)
{
param1.eraseMask(_loc11_,_loc10_);
}
param1.fillToken(_loc3_);
}
if(_loc4_)
{
_loc10_._tokenFrameID = _loc5_;
}
}
_loc7_++;
}
param1.popState();
}
public function broadcastEvent(param1:Event) : void
{
var _loc3_:* = 0;
if(param1.bubbles)
{
throw new ArgumentError("Broadcast of bubbling events is prohibited");
}
var _loc4_:int = sBroadcastListeners.length;
getChildEventListeners(this,param1.type,sBroadcastListeners);
var _loc2_:int = sBroadcastListeners.length;
_loc3_ = _loc4_;
while(_loc3_ < _loc2_)
{
sBroadcastListeners[_loc3_].dispatchEvent(param1);
_loc3_++;
}
sBroadcastListeners.length = _loc4_;
}
public function broadcastEventWith(param1:String, param2:Object = null) : void
{
var _loc3_:Event = Event.fromPool(param1,false,param2);
broadcastEvent(_loc3_);
Event.toPool(_loc3_);
}
public function get numChildren() : int
{
return _children.length;
}
public function get touchGroup() : Boolean
{
return _touchGroup;
}
public function set touchGroup(param1:Boolean) : void
{
_touchGroup = param1;
}
function getChildEventListeners(param1:DisplayObject, param2:String, param3:Vector.<DisplayObject>) : void
{
var _loc5_:* = undefined;
var _loc6_:int = 0;
var _loc7_:int = 0;
var _loc4_:DisplayObjectContainer = param1 as DisplayObjectContainer;
if(param1.hasEventListener(param2))
{
param3[param3.length] = param1;
}
if(_loc4_)
{
_loc5_ = _loc4_._children;
_loc6_ = _loc5_.length;
_loc7_ = 0;
while(_loc7_ < _loc6_)
{
getChildEventListeners(_loc5_[_loc7_],param2,param3);
_loc7_++;
}
}
}
}
}
| 30.540434
| 161
| 0.495479
|
bd2d158c066682a2494faa9912732cd7da5bb87c
| 5,298
|
as
|
ActionScript
|
flixel/org/flixel/plugin/photonstorm/FlxControl.as
|
glcoder/TinyDefenders
|
c053106a21d4b0e3cc3fdbbc855f7b13c9c44baf
|
[
"MIT"
] | 319
|
2020-04-04T14:25:53.000Z
|
2022-03-29T12:52:36.000Z
|
Test Suite/src/org/flixel/plugin/photonstorm/FlxControl.as
|
edgarcaixm/Flixel-Power-Tools
|
d744e5d1e7776bde8c32d930d530222b8de73168
|
[
"BSD-2-Clause-FreeBSD"
] | 1
|
2020-04-11T22:30:17.000Z
|
2020-04-12T16:54:42.000Z
|
Test Suite/src/org/flixel/plugin/photonstorm/FlxControl.as
|
edgarcaixm/Flixel-Power-Tools
|
d744e5d1e7776bde8c32d930d530222b8de73168
|
[
"BSD-2-Clause-FreeBSD"
] | 32
|
2020-04-04T18:01:59.000Z
|
2021-12-20T21:23:42.000Z
|
/**
* FlxControl
* -- Part of the Flixel Power Tools set
*
* v1.1 Fixed and added documentation
* v1.0 First release
*
* @version 1.1 - July 21st 2011
* @link http://www.photonstorm.com
* @author Richard Davey / Photon Storm
*/
package org.flixel.plugin.photonstorm
{
import flash.utils.Dictionary;
import org.flixel.*;
public class FlxControl extends FlxBasic
{
// Quick references
public static var player1:FlxControlHandler;
public static var player2:FlxControlHandler;
public static var player3:FlxControlHandler;
public static var player4:FlxControlHandler;
// Additional control handlers
private static var members:Dictionary = new Dictionary(true);
public function FlxControl()
{
}
/**
* Creates a new FlxControlHandler. You can have as many FlxControlHandlers as you like, but you usually only have one per player. The first handler you make
* will be assigned to the FlxControl.player1 var. The 2nd to FlxControl.player2 and so on for player3 and player4. Beyond this you need to keep a reference to the
* handler yourself.
*
* @param source The FlxSprite you want this class to control. It can only control one FlxSprite at once.
* @param movementType Set to either MOVEMENT_INSTANT or MOVEMENT_ACCELERATES
* @param stoppingType Set to STOPPING_INSTANT, STOPPING_DECELERATES or STOPPING_NEVER
* @param updateFacing If true it sets the FlxSprite.facing value to the direction pressed (default false)
* @param enableArrowKeys If true it will enable all arrow keys (default) - see setCursorControl for more fine-grained control
*
* @return The new FlxControlHandler
*/
public static function create(source:FlxSprite, movementType:int, stoppingType:int, player:int = 1, updateFacing:Boolean = false, enableArrowKeys:Boolean = true):FlxControlHandler
{
var result:FlxControlHandler;
if (player == 1)
{
player1 = new FlxControlHandler(source, movementType, stoppingType, updateFacing, enableArrowKeys);
members[player1] = player1;
result = player1;
}
else if (player == 2)
{
player2 = new FlxControlHandler(source, movementType, stoppingType, updateFacing, enableArrowKeys);
members[player2] = player2;
result = player2;
}
else if (player == 3)
{
player3 = new FlxControlHandler(source, movementType, stoppingType, updateFacing, enableArrowKeys);
members[player3] = player3;
result = player3;
}
else if (player == 4)
{
player4 = new FlxControlHandler(source, movementType, stoppingType, updateFacing, enableArrowKeys);
members[player4] = player4;
result = player4;
}
else
{
var newControlHandler:FlxControlHandler = new FlxControlHandler(source, movementType, stoppingType, updateFacing, enableArrowKeys);
members[newControlHandler] = newControlHandler;
result = newControlHandler;
}
return result;
}
/**
* Removes an FlxControlHandler
*
* @param source The FlxControlHandler to delete
* @return Boolean true if the FlxControlHandler was removed, otherwise false.
*/
public static function remove(source:FlxControlHandler):Boolean
{
if (members[source])
{
delete members[source];
return true;
}
return false;
}
/**
* Removes all FlxControlHandlers.<br />
* This is called automatically if this plugin is ever destroyed.
*/
public static function clear():void
{
for each (var handler:FlxControlHandler in members)
{
delete members[handler];
}
}
/**
* Starts updating the given FlxControlHandler, enabling keyboard actions for it. If no FlxControlHandler is given it starts updating all FlxControlHandlers currently added.<br />
* Updating is enabled by default, but this can be used to re-start it if you have stopped it via stop().<br />
*
* @param source The FlxControlHandler to start updating on. If left as null it will start updating all handlers.
*/
public static function start(source:FlxControlHandler = null):void
{
if (source)
{
members[source].enabled = true;
}
else
{
for each (var handler:FlxControlHandler in members)
{
handler.enabled = true;
}
}
}
/**
* Stops updating the given FlxControlHandler. If no FlxControlHandler is given it stops updating all FlxControlHandlers currently added.<br />
* Updating is enabled by default, but this can be used to stop it, for example if you paused your game (see start() to restart it again).<br />
*
* @param source The FlxControlHandler to stop updating. If left as null it will stop updating all handlers.
*/
public static function stop(source:FlxControlHandler = null):void
{
if (source)
{
members[source].enabled = false;
}
else
{
for each (var handler:FlxControlHandler in members)
{
handler.enabled = false;
}
}
}
/**
* Runs update on all currently active FlxControlHandlers
*/
override public function draw():void
{
for each (var handler:FlxControlHandler in members)
{
if (handler.enabled == true)
{
handler.update();
}
}
}
/**
* Runs when this plugin is destroyed
*/
override public function destroy():void
{
clear();
}
}
}
| 29.433333
| 181
| 0.698377
|
e4cb19b9b31e0461bfb70e7420aac960f1b82102
| 2,128
|
as
|
ActionScript
|
trunk/flash/src/tileui/tiles/ColorTile.as
|
dyzmapl/BumpTop
|
1329ea41411c7368516b942d19add694af3d602f
|
[
"Apache-2.0"
] | 460
|
2016-01-13T12:49:34.000Z
|
2022-02-20T04:10:40.000Z
|
trunk/flash/src/tileui/tiles/ColorTile.as
|
dyzmapl/BumpTop
|
1329ea41411c7368516b942d19add694af3d602f
|
[
"Apache-2.0"
] | 24
|
2016-11-07T04:59:49.000Z
|
2022-03-14T06:34:12.000Z
|
trunk/flash/src/tileui/tiles/ColorTile.as
|
dyzmapl/BumpTop
|
1329ea41411c7368516b942d19add694af3d602f
|
[
"Apache-2.0"
] | 148
|
2016-01-17T03:16:43.000Z
|
2022-03-17T12:20:36.000Z
|
//
// Copyright 2012 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
package tileui.tiles
{
import org.papervision3d.materials.ColorMaterial;
import tileui.tiles.pv3d.Base3DTile;
import tileui.tiles.pv3d.materials.TileMaterialList;
import mx.utils.ColorUtil;
/**
* A 3D tile representing a single color. The top of the Tile is the color passed
* in the constructor. The sides alternate between darker tinted versions of the color. The tinted is done
* using <code>ColorUtil.adjustBrightness()</code> and one side is tinted by setting the brightness
* of the color to -100, and the other side to -50;
*/
public class ColorTile extends Tile
{
/**
* @private
*/
protected var color:Number;
public function ColorTile(color:Number, width:Number=60, height:Number=10):void {
this.color = color;
super(width, height);
}
/**
* Creates 3 separate <code>ColorMaterial</code> materials, one for the top and bottom, which is the
* color of the tile, one for sides 1 and 3, which is a tinted version (-100) and one for sides
* 2 and 4 (-50).
*/
override protected function create3DTile(width:Number, height:Number):Base3DTile {
var material:ColorMaterial = new ColorMaterial(color);
var material2:ColorMaterial = new ColorMaterial(ColorUtil.adjustBrightness(color, -100));
var material3:ColorMaterial = new ColorMaterial(ColorUtil.adjustBrightness(color, -50));
return new Base3DTile(width, height, new TileMaterialList(material, material, material2, material3, material2, material3));
}
}
}
| 37.333333
| 126
| 0.726504
|
72eba025aabae87b759e953030f3c63e133641e6
| 898
|
as
|
ActionScript
|
PLANTILLA_FLASH/AS3 XML Vector Template/source/source/com/massiveProCreation/ball/sections/gallery/GalleryMain.as
|
zayro/templates-free
|
0eb86764d295f8a5c75e0152443df19f0b312139
|
[
"MIT"
] | null | null | null |
PLANTILLA_FLASH/AS3 XML Vector Template/source/source/com/massiveProCreation/ball/sections/gallery/GalleryMain.as
|
zayro/templates-free
|
0eb86764d295f8a5c75e0152443df19f0b312139
|
[
"MIT"
] | null | null | null |
PLANTILLA_FLASH/AS3 XML Vector Template/source/source/com/massiveProCreation/ball/sections/gallery/GalleryMain.as
|
zayro/templates-free
|
0eb86764d295f8a5c75e0152443df19f0b312139
|
[
"MIT"
] | null | null | null |
package com.massiveProCreation.ball.sections.gallery
{
/*/ IMPORTS /*/
import com.massiveProCreation.gallery.GalleryCore;
import com.massiveProCreation.events.CustomEvent;
import flash.display.Sprite;
import flash.events.Event;
public class GalleryMain extends GalleryCore
{
public function GalleryMain(xmlUrl:String, slideShowDelay:int)
{
super(xmlUrl, slideShowDelay);
}
/// we override the image loaded function because we need to control the default slideshow
override protected function imageLoaded(e:Event):void {
_images.push(_imageLoader.content);
_images[_ci].smoothing = true;
if(_ci == 0 && _slideShowTimer.running){
nextImage();
dispatchEvent(new CustomEvent(CustomEvent.IMAGE_LOADED, true, false));
} else if (_ci == 0){
dispatchEvent(new CustomEvent(CustomEvent.IMAGE_LOADED, true, false));
}
loadThumbnail(_ci);
}
}
}
| 28.967742
| 93
| 0.73608
|
84a629e2a52386b7c829cb0be8e42d975b1151cb
| 1,657
|
as
|
ActionScript
|
src/kabam/rotmg/death/view/ResurrectionView.as
|
GhostRealm/prodmafia-client
|
56cfbecfc8ee7ff5534095c30d4b52bb6ace2bc6
|
[
"MIT"
] | 5
|
2020-10-30T20:20:54.000Z
|
2021-10-16T09:40:39.000Z
|
src/kabam/rotmg/death/view/ResurrectionView.as
|
abrn/prodmafia-client
|
ae73e0a87009e6725b968d95ebb108a2b3cb79ed
|
[
"MIT"
] | null | null | null |
src/kabam/rotmg/death/view/ResurrectionView.as
|
abrn/prodmafia-client
|
ae73e0a87009e6725b968d95ebb108a2b3cb79ed
|
[
"MIT"
] | 5
|
2020-11-14T14:45:20.000Z
|
2022-03-18T04:06:11.000Z
|
package kabam.rotmg.death.view {
import com.company.assembleegameclient.ui.dialogs.Dialog;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.events.Event;
import flash.filters.ColorMatrixFilter;
import org.osflash.signals.Signal;
public class ResurrectionView extends Sprite {
public const showDialog:Signal = new Signal(Sprite);
public const closed:Signal = new Signal();
private const POPUP_BACKGROUND_COLOR:Number = 0;
private const POPUP_LINE_COLOR:Number = 3881787;
private const POPUP_WIDTH:Number = 300;
private const POPUP_HEIGHT:Number = 400;
public function ResurrectionView() {
super();
}
private var popup:Dialog;
public function init(_arg_1:BitmapData):void {
this.createBackground(_arg_1);
this.createPopup();
}
public function createPopup():void {
this.popup = new Dialog("ResurrectionView.YouDied", "ResurrectionView.deathText", "ResurrectionView.SaveMe", null, null);
this.popup.addEventListener("dialogLeftButton", this.onButtonClick);
this.showDialog.dispatch(this.popup);
}
private function createBackground(_arg_1:BitmapData):void {
var _local3:* = null;
var _local2:* = [0.33, 0.33, 0.33, 0, 0, 0.33, 0.33, 0.33, 0, 0, 0.33, 0.33, 0.33, 0, 0, 0.33, 0.33, 0.33, 1, 0];
var _local4:ColorMatrixFilter = new ColorMatrixFilter(_local2);
_local3 = new Bitmap(_arg_1);
_local3.filters = [_local4];
addChild(_local3);
}
private function onButtonClick(_arg_1:Event):void {
this.closed.dispatch();
}
}
}
| 29.070175
| 129
| 0.68799
|
b46a26aac6420bba45b24cdf1ea2668bc71f990c
| 1,354
|
as
|
ActionScript
|
src/robotlegs/starling/extensions/contextView/ContextViewExtension.as
|
jucasoft/robotlegs-utilities-starling
|
282120550dc86787d7335d751d840ee6a501c270
|
[
"MIT"
] | 1
|
2017-04-12T13:41:39.000Z
|
2017-04-12T13:41:39.000Z
|
src/robotlegs/starling/extensions/contextView/ContextViewExtension.as
|
jucasoft/robotlegs-utilities-starling
|
282120550dc86787d7335d751d840ee6a501c270
|
[
"MIT"
] | null | null | null |
src/robotlegs/starling/extensions/contextView/ContextViewExtension.as
|
jucasoft/robotlegs-utilities-starling
|
282120550dc86787d7335d751d840ee6a501c270
|
[
"MIT"
] | null | null | null |
package robotlegs.starling.extensions.contextView {
import robotlegs.bender.extensions.matching.instanceOfType;
import robotlegs.bender.framework.api.IContext;
import robotlegs.bender.framework.api.IExtension;
import robotlegs.bender.framework.api.IInjector;
import robotlegs.bender.framework.api.ILogger;
public class ContextViewExtension implements IExtension {
private var _injector:IInjector;
private var _logger:ILogger;
public function extend(context:IContext):void {
_injector = context.injector;
_logger = context.getLogger(this);
context.beforeInitializing(beforeInitializing);
context.addConfigHandler(instanceOfType(ContextView), handleContextView);
}
private function handleContextView(contextView:ContextView):void {
if (_injector.hasDirectMapping(ContextView)) {
_logger.warn('A contextView has already been installed, ignoring {0}', [contextView.view]);
}
else {
_logger.debug("Mapping {0} as contextView", [contextView.view]);
_injector.map(ContextView).toValue(contextView);
}
}
private function beforeInitializing():void {
if (!_injector.hasDirectMapping(ContextView)) {
_logger.error("A ContextView must be installed if you install the ContextViewExtension.");
}
}
}
}
| 35.631579
| 103
| 0.718612
|
3f20127aff0a16feb86227de11bdcd2dd585dffa
| 3,689
|
as
|
ActionScript
|
examples/src/com/hsharma/hungryHero/gameElements/GameBackground.as
|
matrix3d/spritejs
|
0fd5792f4db6127f17e57011cc034782ec933dda
|
[
"MIT"
] | 99
|
2015-12-01T08:42:16.000Z
|
2021-02-04T01:48:20.000Z
|
test/src/com/hsharma/hungryHero/gameElements/GameBackground.as
|
weimingtom/spriteflexjs
|
6545f09f3ff6329eeceacaa5122a83503bd40e97
|
[
"MIT"
] | 28
|
2016-02-15T18:28:05.000Z
|
2021-07-06T07:40:20.000Z
|
test/src/com/hsharma/hungryHero/gameElements/GameBackground.as
|
weimingtom/spriteflexjs
|
6545f09f3ff6329eeceacaa5122a83503bd40e97
|
[
"MIT"
] | 32
|
2015-12-01T19:03:41.000Z
|
2022-01-06T14:08:54.000Z
|
/**
*
* Hungry Hero Game
* http://www.hungryherogame.com
*
* Copyright (c) 2012 Hemanth Sharma (www.hsharma.com). All rights reserved.
*
* This ActionScript source code is free.
* You can redistribute and/or modify it in accordance with the
* terms of the accompanying Simplified BSD License Agreement.
*
*/
package com.hsharma.hungryHero.gameElements
{
import com.hsharma.hungryHero.GameConstants;
import flash.display.Sprite;
import flash.events.Event;
/**
* This class defines the whole InGame background containing multiple background layers.
*
* @author hsharma
*
*/
public class GameBackground extends Sprite
{
/**
* Different layers of the background.
*/
private var bgLayer1:BgLayer;
private var bgLayer2:BgLayer;
private var bgLayer3:BgLayer;
private var bgLayer4:BgLayer;
/** Current speed of animation of the background. */
private var _speed:Number = 0;
/** State of the game. */
private var _state:int;
/** Game paused? */
private var _gamePaused:Boolean = false;
public function GameBackground()
{
super();
this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
}
/**
* On added to stage.
* @param event
*
*/
private function onAddedToStage(event:Event):void
{
this.removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
bgLayer1 = new BgLayer(1);
bgLayer1.parallaxDepth = 0.02;
this.addChild(bgLayer1);
bgLayer2 = new BgLayer(2);
bgLayer2.parallaxDepth = 0.2;
this.addChild(bgLayer2);
bgLayer3 = new BgLayer(3);
bgLayer3.parallaxDepth = 0.5;
this.addChild(bgLayer3);
bgLayer4 = new BgLayer(4);
bgLayer4.parallaxDepth = 1;
this.addChild(bgLayer4);
// Start animating the background.
this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
/**
* On every frame, animate each layer based on its parallax depth and hero's speed.
* @param event
*
*/
private function onEnterFrame(event:Event):void
{
if (!gamePaused)
{
// Background 1 - Sky
bgLayer1.x -= Math.ceil(_speed * bgLayer1.parallaxDepth);
// Hero flying left
if (bgLayer1.x > 0) bgLayer1.x = -GameConstants.stageWidth;
// Hero flying right
if (bgLayer1.x < -GameConstants.stageWidth ) bgLayer1.x = 0;
// Background 2 - Hills
bgLayer2.x -= Math.ceil(_speed * bgLayer2.parallaxDepth);
// Hero flying left
if (bgLayer2.x > 0) bgLayer2.x = -GameConstants.stageWidth;
// Hero flying right
if (bgLayer2.x < -GameConstants.stageWidth ) bgLayer2.x = 0;
// Background 3 - Buildings
bgLayer3.x -= Math.ceil(_speed * bgLayer3.parallaxDepth);
// Hero flying left
if (bgLayer3.x > 0) bgLayer3.x = -GameConstants.stageWidth;
// Hero flying right
if (bgLayer3.x < -GameConstants.stageWidth ) bgLayer3.x = 0;
// Background 4 - Trees
bgLayer4.x -= Math.ceil(_speed * bgLayer4.parallaxDepth);
// Hero flying left
if (bgLayer4.x > 0) bgLayer4.x = -GameConstants.stageWidth;
// Hero flying right
if (bgLayer4.x < -GameConstants.stageWidth ) bgLayer4.x = 0;
}
}
/**
* Game paused?
* @return
*
*/
public function get gamePaused():Boolean { return _gamePaused; }
public function set gamePaused(value:Boolean):void { _gamePaused = value; }
/**
*
* State of the game.
*
*/
public function get state():int { return _state; }
public function set state(value:int):void { _state = value; }
/**
* Speed of the hero.
*
*/
public function get speed():Number { return _speed; }
public function set speed(value:Number):void { _speed = value; }
}
}
| 25.797203
| 89
| 0.660613
|
90d4265485a573d8a00ebe492220a410ba3335ab
| 3,823
|
as
|
ActionScript
|
frameworks/projects/Network/src/main/royale/org/apache/royale/net/SimpleRemoteObject.as
|
jmegonzalez/royale-asjs
|
bd5cbefc187fd9d650b93e89f684ce13f986729b
|
[
"ECL-2.0",
"Apache-2.0"
] | 306
|
2017-10-05T14:28:14.000Z
|
2022-01-25T09:30:45.000Z
|
frameworks/projects/Network/src/main/royale/org/apache/royale/net/SimpleRemoteObject.as
|
joseRamonLeon/royale-asjs
|
4dfa86ec6907da834fb5df7e5dc28e48ba65cbeb
|
[
"Apache-2.0",
"MIT"
] | 995
|
2017-09-29T16:42:20.000Z
|
2022-03-30T11:06:36.000Z
|
frameworks/projects/Network/src/main/royale/org/apache/royale/net/SimpleRemoteObject.as
|
joseRamonLeon/royale-asjs
|
4dfa86ec6907da834fb5df7e5dc28e48ba65cbeb
|
[
"Apache-2.0",
"MIT"
] | 132
|
2017-11-02T00:07:24.000Z
|
2022-01-31T11:53:31.000Z
|
////////////////////////////////////////////////////////////////////////////////
//
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// The ASF licenses this file to You under the Apache License, Version 2.0
// (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
package org.apache.royale.net
{
import org.apache.royale.core.IBead;
import org.apache.royale.core.IStrand;
import org.apache.royale.events.EventDispatcher;
import org.apache.royale.net.events.FaultEvent;
import org.apache.royale.net.events.ResultEvent;
import org.apache.royale.net.remoting.SimpleOperation;
import org.apache.royale.net.remoting.amf.AMFNetConnection;
import org.apache.royale.net.remoting.messages.ErrorMessage;
[Event(name="result", type="org.apache.royale.net.events.ResultEvent")]
[Event(name="fault", type="org.apache.royale.net.events.FaultEvent")]
/**
* This is the most simple implementation os a RemoteObject it can be use with
* simple backends like AMFPHP. To use with BlazeDS better us RemoteObject since
* it manages clientId and small messages
*/
public class SimpleRemoteObject extends EventDispatcher implements IBead
{
private var _endPoint:String;
private var _destination:String;
private var _source:String;
/**
* @private
* The connection to the server
*
* @royalesuppresspublicvarwarning
*/
public var nc:AMFNetConnection = new AMFNetConnection();
/**
*
*/
public function SimpleRemoteObject()
{
nc.errorClass = ErrorMessage;
}
private var _strand:IStrand;
public function set strand(value:IStrand):void
{
_strand = value;
}
public function set endPoint(value:String):void
{
_endPoint = value;
}
public function get endPoint():String
{
return _endPoint;
}
public function set destination(value:String):void
{
_destination = value;
}
public function get destination():String
{
return _destination;
}
/**
* source is a deprecated property. It exposes
* backend resources and it used by old AMF backend implementations.
* You should use "destination" property instead. This property is for
* backward compatibility with old implementations.
* Use at your own risk.
*/
public function set source(value:String):void
{
_source = value;
}
public function get source():String
{
return _source;
}
public function send(operation:String, params:Array):void
{
nc.connect(endPoint);
var op:SimpleOperation = new SimpleOperation(operation, this, params);
op.send();
}
public function resultHandler(param:Object):void
{
dispatchEvent(new ResultEvent(ResultEvent.RESULT, param.body));
}
public function faultHandler(param:Object):void
{
dispatchEvent(new FaultEvent(FaultEvent.FAULT, param));
}
}
}
| 31.858333
| 83
| 0.63615
|
8bf5fd003c6baa6baeec7184d2fee73328ceec9a
| 4,192
|
as
|
ActionScript
|
src/de/dittner/siegmar/model/domain/user/User.as
|
Dittner/GSA
|
e29c8b96ddc8f2d208a893f5357d22f90bc1c3f2
|
[
"Apache-2.0"
] | null | null | null |
src/de/dittner/siegmar/model/domain/user/User.as
|
Dittner/GSA
|
e29c8b96ddc8f2d208a893f5357d22f90bc1c3f2
|
[
"Apache-2.0"
] | null | null | null |
src/de/dittner/siegmar/model/domain/user/User.as
|
Dittner/GSA
|
e29c8b96ddc8f2d208a893f5357d22f90bc1c3f2
|
[
"Apache-2.0"
] | null | null | null |
package de.dittner.siegmar.model.domain.user {
import com.adobe.crypto.MD5;
import de.dittner.async.AsyncOperation;
import de.dittner.async.IAsyncOperation;
import de.dittner.siegmar.backend.EncryptionService;
import de.dittner.siegmar.backend.LocalStorage;
import de.dittner.siegmar.model.domain.fileSystem.SiegmarFileSystem;
import de.dittner.walter.WalterProxy;
public class User extends WalterProxy {
private static const USER_NAME:String = "USER_NAME";
private static const ENCRYPTED_RANDOM_TEXT:String = "ENCRYPTED_RANDOM_TEXT";
private static const ENCRYPTED_DB_PWD:String = "ENCRYPTED_DB_PWD";
public function User() {
super();
_userName = LocalStorage.read(USER_NAME) || "";
encryptedRandomText = LocalStorage.read(ENCRYPTED_RANDOM_TEXT) || "";
encryptedDataBasePwd = LocalStorage.read(ENCRYPTED_DB_PWD) || "";
}
[Inject]
public var encryptionService:EncryptionService;
[Inject]
public var system:SiegmarFileSystem;
//----------------------------------------------------------------------------------------------
//
// Variables
//
//----------------------------------------------------------------------------------------------
private var encryptedRandomText:String;
private var encryptedDataBasePwd:String;
private var isAuthorized:Boolean = false;
//----------------------------------------------------------------------------------------------
//
// Properties
//
//----------------------------------------------------------------------------------------------
//--------------------------------------
// userName
//--------------------------------------
private var _userName:String = "";
public function get userName():String {return _userName;}
//--------------------------------------
// dataBasePwd
//--------------------------------------
private var _dataBasePwd:String = "";
public function get dataBasePwd():String {return _dataBasePwd;}
//--------------------------------------
// isRegistered
//--------------------------------------
public function get isRegistered():Boolean {return userName;}
//----------------------------------------------------------------------------------------------
//
// Methods
//
//----------------------------------------------------------------------------------------------
public function register(userName:String, enteredPwd:String, privacyLevel:uint, enteredDataBasePwd:String):IAsyncOperation {
var op:IAsyncOperation = new AsyncOperation();
if (isRegistered) {
op.dispatchSuccess();
}
else {
_userName = userName;
isAuthorized = true;
_dataBasePwd = enteredDataBasePwd;
op = encryptionService.createEncryptionKey(enteredPwd, privacyLevel);
op.addCompleteCallback(function (op:IAsyncOperation):void {
encryptedRandomText = encryptionService.encryptRandomText();
encryptedDataBasePwd = MD5.hash(MD5.hash(enteredDataBasePwd));
LocalStorage.write(USER_NAME, userName);
LocalStorage.write(ENCRYPTED_RANDOM_TEXT, encryptedRandomText);
LocalStorage.write(ENCRYPTED_DB_PWD, MD5.hash(MD5.hash(enteredDataBasePwd)));
});
}
return op;
}
public function login(enteredPwd:String, privacyLevel:uint, enteredDataBasePwd:String):IAsyncOperation {
var op:IAsyncOperation = new AsyncOperation();
if (isAuthorized) {
op.dispatchError("Agent has been already authorized!");
}
else if (!isRegistered) {
op.dispatchError("Agent can not login for unregistered user!");
}
else {
op = encryptionService.createEncryptionKey(enteredPwd, privacyLevel);
op.addCompleteCallback(function (op:IAsyncOperation):void {
if (encryptedRandomText == encryptionService.encryptRandomText()) {
if (encryptedDataBasePwd == MD5.hash(MD5.hash(enteredDataBasePwd))) {
isAuthorized = true;
_dataBasePwd = enteredDataBasePwd;
op.dispatchSuccess();
}
else {
op.dispatchError("Der Datenbankschlüssel ist ungültig!");
}
}
else {
op.dispatchError("Der Schlüssel ist ungültig!");
}
});
}
return op;
}
public function logout():void {
if (isAuthorized) {
isAuthorized = false;
system.logout();
encryptionService.deleteEncryptionKey();
}
}
}
}
| 32.496124
| 125
| 0.592796
|
f2a31b46e3b5a8778408cfb2ead895a1007fa9db
| 379
|
as
|
ActionScript
|
src/nid/xfl/motion/MotionObjectXML.as
|
nidin/as3-XFL-compiler
|
1b90ea1c9920762e09b0a3b9a5b4a604a081db58
|
[
"MIT"
] | 8
|
2015-02-03T19:52:43.000Z
|
2021-06-22T22:37:05.000Z
|
src/nid/xfl/motion/MotionObjectXML.as
|
nidin/as3-XFL-compiler
|
1b90ea1c9920762e09b0a3b9a5b4a604a081db58
|
[
"MIT"
] | null | null | null |
src/nid/xfl/motion/MotionObjectXML.as
|
nidin/as3-XFL-compiler
|
1b90ea1c9920762e09b0a3b9a5b4a604a081db58
|
[
"MIT"
] | 1
|
2017-12-14T09:59:49.000Z
|
2017-12-14T09:59:49.000Z
|
package nid.xfl.motion
{
/**
* ...
* @author Nidin Vinayak
*/
public class MotionObjectXML
{
public var animationCore:AnimationCore;
public function MotionObjectXML(data:XMLList=null)
{
if (data != null)
{
parse(data);
}
}
public function parse(data:XMLList):void
{
animationCore = new AnimationCore(data.AnimationCore);
}
}
}
| 15.16
| 57
| 0.635884
|
565f48fcade91c543d989e5b9f65df2cd6a32e71
| 3,700
|
as
|
ActionScript
|
src/as/com/threerings/msoy/item/data/all/ItemTypes.as
|
VirtueDev/synced_repo
|
adc1b61ad68402492386fa011e4c628d6588c800
|
[
"BSD-3-Clause"
] | 21
|
2015-04-30T10:28:47.000Z
|
2021-06-23T23:00:45.000Z
|
src/as/com/threerings/msoy/item/data/all/ItemTypes.as
|
VirtueDev/synced_repo
|
adc1b61ad68402492386fa011e4c628d6588c800
|
[
"BSD-3-Clause"
] | 36
|
2015-07-29T20:50:57.000Z
|
2021-09-18T22:37:25.000Z
|
src/as/com/threerings/msoy/item/data/all/ItemTypes.as
|
VirtueDev/synced_repo
|
adc1b61ad68402492386fa011e4c628d6588c800
|
[
"BSD-3-Clause"
] | 35
|
2015-04-30T10:29:41.000Z
|
2022-02-15T21:17:01.000Z
|
//
// $Id$
package com.threerings.msoy.item.data.all {
/**
* Collection of static constants and functions related to the type of an item.
*/
public class ItemTypes
{
// WARNING: DON'T EVER CHANGE THE MAGIC NUMBERS ASSIGNED TO EACH CLASS
/** The type constant for an Occupant. */
public static const OCCUPANT :int = -1;
/** The type constant for an unassigned or invalid item. */
public static const NOT_A_TYPE :int = 0;
/** The type constant for a {@link Photo} item. */
public static const PHOTO :int = 1;
/** The type constant for a {@link Document} item. */
public static const DOCUMENT :int = 2;
/** The type constant for a {@link Furniture} item. */
public static const FURNITURE :int = 3;
/** The type constant for a {@link Game} item. */
public static const GAME :int = 4;
// WARNING: DON'T EVER CHANGE THE MAGIC NUMBERS ASSIGNED TO EACH CLASS
/** The type constant for a {@link Avatar} item. */
public static const AVATAR :int = 5;
/** The type constant for a {@link Pet} item. */
public static const PET :int = 6;
/** The type constant for a {@link Audio} item. */
public static const AUDIO :int = 7;
/** The type constant for a {@link Video} item. */
public static const VIDEO :int = 8;
/** The type constant for a {@link Decor} item. */
public static const DECOR :int = 9;
/** The type constant for a {@link Toy} item. */
public static const TOY :int = 10;
// WARNING: DON'T EVER CHANGE THE MAGIC NUMBERS ASSIGNED TO EACH CLASS
/** The type constant for a {@link LevelPack} item. */
public static const LEVEL_PACK :int = 11;
/** The type constant for a {@link ItemPack} item. */
public static const ITEM_PACK :int = 12;
/** The type constant for a {@link TrophySource} item. */
public static const TROPHY_SOURCE :int = 13;
/** The type constant for a {@link Prize} item. */
public static const PRIZE :int = 14;
/** The type constant for a {@link Prop} item. */
public static const PROP :int = 15;
/** The type constant for a {@link Launcher} item. */
public static const LAUNCHER :int = 16;
// WARNING: DON'T EVER CHANGE THE MAGIC NUMBERS ASSIGNED TO EACH CLASS
/**
* Get the Stringy name of the specified item type.
*/
public static function getTypeName (type :int) :String
{
// We can't use a switch statement because our final variables are not actually constants
// (they are assigned values at class initialization time).
if (type == PHOTO) {
return "photo";
} else if (type == AVATAR) {
return "avatar";
} else if (type == GAME) {
return "game";
} else if (type == FURNITURE) {
return "furniture";
} else if (type == DOCUMENT) {
return "document";
} else if (type == PET) {
return "pet";
} else if (type == AUDIO) {
return "audio";
} else if (type == VIDEO) {
return "video";
} else if (type == DECOR) {
return "decor";
} else if (type == TOY) {
return "toy";
} else if (type == LEVEL_PACK) {
return "level_pack";
} else if (type == ITEM_PACK) {
return "item_pack";
} else if (type == TROPHY_SOURCE) {
return "trophy_source";
} else if (type == PRIZE) {
return "prize";
} else if (type == PROP) {
return "prop";
} else if (type == LAUNCHER) {
return "launcher";
} else {
return "unknown:" + type;
}
}
}
}
| 30.833333
| 97
| 0.574324
|
2199f647b8ae2f147b3708c1a0743f82ba9be41a
| 57,352
|
adb
|
Ada
|
gcc-gcc-7_3_0-release/gcc/ada/a-strunb-shared.adb
|
best08618/asylo
|
5a520a9f5c461ede0f32acc284017b737a43898c
|
[
"Apache-2.0"
] | 7
|
2020-05-02T17:34:05.000Z
|
2021-10-17T10:15:18.000Z
|
gcc-gcc-7_3_0-release/gcc/ada/a-strunb-shared.adb
|
best08618/asylo
|
5a520a9f5c461ede0f32acc284017b737a43898c
|
[
"Apache-2.0"
] | null | null | null |
gcc-gcc-7_3_0-release/gcc/ada/a-strunb-shared.adb
|
best08618/asylo
|
5a520a9f5c461ede0f32acc284017b737a43898c
|
[
"Apache-2.0"
] | 2
|
2020-07-27T00:22:36.000Z
|
2021-04-01T09:41:02.000Z
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . S T R I N G S . U N B O U N D E D --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2016, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Strings.Search;
with Ada.Unchecked_Deallocation;
package body Ada.Strings.Unbounded is
use Ada.Strings.Maps;
Growth_Factor : constant := 32;
-- The growth factor controls how much extra space is allocated when
-- we have to increase the size of an allocated unbounded string. By
-- allocating extra space, we avoid the need to reallocate on every
-- append, particularly important when a string is built up by repeated
-- append operations of small pieces. This is expressed as a factor so
-- 32 means add 1/32 of the length of the string as growth space.
Min_Mul_Alloc : constant := Standard'Maximum_Alignment;
-- Allocation will be done by a multiple of Min_Mul_Alloc. This causes
-- no memory loss as most (all?) malloc implementations are obliged to
-- align the returned memory on the maximum alignment as malloc does not
-- know the target alignment.
function Aligned_Max_Length (Max_Length : Natural) return Natural;
-- Returns recommended length of the shared string which is greater or
-- equal to specified length. Calculation take in sense alignment of the
-- allocated memory segments to use memory effectively by Append/Insert/etc
-- operations.
---------
-- "&" --
---------
function "&"
(Left : Unbounded_String;
Right : Unbounded_String) return Unbounded_String
is
LR : constant Shared_String_Access := Left.Reference;
RR : constant Shared_String_Access := Right.Reference;
DL : constant Natural := LR.Last + RR.Last;
DR : Shared_String_Access;
begin
-- Result is an empty string, reuse shared empty string
if DL = 0 then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
-- Left string is empty, return Right string
elsif LR.Last = 0 then
Reference (RR);
DR := RR;
-- Right string is empty, return Left string
elsif RR.Last = 0 then
Reference (LR);
DR := LR;
-- Otherwise, allocate new shared string and fill data
else
DR := Allocate (DL);
DR.Data (1 .. LR.Last) := LR.Data (1 .. LR.Last);
DR.Data (LR.Last + 1 .. DL) := RR.Data (1 .. RR.Last);
DR.Last := DL;
end if;
return (AF.Controlled with Reference => DR);
end "&";
function "&"
(Left : Unbounded_String;
Right : String) return Unbounded_String
is
LR : constant Shared_String_Access := Left.Reference;
DL : constant Natural := LR.Last + Right'Length;
DR : Shared_String_Access;
begin
-- Result is an empty string, reuse shared empty string
if DL = 0 then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
-- Right is an empty string, return Left string
elsif Right'Length = 0 then
Reference (LR);
DR := LR;
-- Otherwise, allocate new shared string and fill it
else
DR := Allocate (DL);
DR.Data (1 .. LR.Last) := LR.Data (1 .. LR.Last);
DR.Data (LR.Last + 1 .. DL) := Right;
DR.Last := DL;
end if;
return (AF.Controlled with Reference => DR);
end "&";
function "&"
(Left : String;
Right : Unbounded_String) return Unbounded_String
is
RR : constant Shared_String_Access := Right.Reference;
DL : constant Natural := Left'Length + RR.Last;
DR : Shared_String_Access;
begin
-- Result is an empty string, reuse shared one
if DL = 0 then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
-- Left is empty string, return Right string
elsif Left'Length = 0 then
Reference (RR);
DR := RR;
-- Otherwise, allocate new shared string and fill it
else
DR := Allocate (DL);
DR.Data (1 .. Left'Length) := Left;
DR.Data (Left'Length + 1 .. DL) := RR.Data (1 .. RR.Last);
DR.Last := DL;
end if;
return (AF.Controlled with Reference => DR);
end "&";
function "&"
(Left : Unbounded_String;
Right : Character) return Unbounded_String
is
LR : constant Shared_String_Access := Left.Reference;
DL : constant Natural := LR.Last + 1;
DR : Shared_String_Access;
begin
DR := Allocate (DL);
DR.Data (1 .. LR.Last) := LR.Data (1 .. LR.Last);
DR.Data (DL) := Right;
DR.Last := DL;
return (AF.Controlled with Reference => DR);
end "&";
function "&"
(Left : Character;
Right : Unbounded_String) return Unbounded_String
is
RR : constant Shared_String_Access := Right.Reference;
DL : constant Natural := 1 + RR.Last;
DR : Shared_String_Access;
begin
DR := Allocate (DL);
DR.Data (1) := Left;
DR.Data (2 .. DL) := RR.Data (1 .. RR.Last);
DR.Last := DL;
return (AF.Controlled with Reference => DR);
end "&";
---------
-- "*" --
---------
function "*"
(Left : Natural;
Right : Character) return Unbounded_String
is
DR : Shared_String_Access;
begin
-- Result is an empty string, reuse shared empty string
if Left = 0 then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
-- Otherwise, allocate new shared string and fill it
else
DR := Allocate (Left);
for J in 1 .. Left loop
DR.Data (J) := Right;
end loop;
DR.Last := Left;
end if;
return (AF.Controlled with Reference => DR);
end "*";
function "*"
(Left : Natural;
Right : String) return Unbounded_String
is
DL : constant Natural := Left * Right'Length;
DR : Shared_String_Access;
K : Positive;
begin
-- Result is an empty string, reuse shared empty string
if DL = 0 then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
-- Otherwise, allocate new shared string and fill it
else
DR := Allocate (DL);
K := 1;
for J in 1 .. Left loop
DR.Data (K .. K + Right'Length - 1) := Right;
K := K + Right'Length;
end loop;
DR.Last := DL;
end if;
return (AF.Controlled with Reference => DR);
end "*";
function "*"
(Left : Natural;
Right : Unbounded_String) return Unbounded_String
is
RR : constant Shared_String_Access := Right.Reference;
DL : constant Natural := Left * RR.Last;
DR : Shared_String_Access;
K : Positive;
begin
-- Result is an empty string, reuse shared empty string
if DL = 0 then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
-- Coefficient is one, just return string itself
elsif Left = 1 then
Reference (RR);
DR := RR;
-- Otherwise, allocate new shared string and fill it
else
DR := Allocate (DL);
K := 1;
for J in 1 .. Left loop
DR.Data (K .. K + RR.Last - 1) := RR.Data (1 .. RR.Last);
K := K + RR.Last;
end loop;
DR.Last := DL;
end if;
return (AF.Controlled with Reference => DR);
end "*";
---------
-- "<" --
---------
function "<"
(Left : Unbounded_String;
Right : Unbounded_String) return Boolean
is
LR : constant Shared_String_Access := Left.Reference;
RR : constant Shared_String_Access := Right.Reference;
begin
return LR.Data (1 .. LR.Last) < RR.Data (1 .. RR.Last);
end "<";
function "<"
(Left : Unbounded_String;
Right : String) return Boolean
is
LR : constant Shared_String_Access := Left.Reference;
begin
return LR.Data (1 .. LR.Last) < Right;
end "<";
function "<"
(Left : String;
Right : Unbounded_String) return Boolean
is
RR : constant Shared_String_Access := Right.Reference;
begin
return Left < RR.Data (1 .. RR.Last);
end "<";
----------
-- "<=" --
----------
function "<="
(Left : Unbounded_String;
Right : Unbounded_String) return Boolean
is
LR : constant Shared_String_Access := Left.Reference;
RR : constant Shared_String_Access := Right.Reference;
begin
-- LR = RR means two strings shares shared string, thus they are equal
return LR = RR or else LR.Data (1 .. LR.Last) <= RR.Data (1 .. RR.Last);
end "<=";
function "<="
(Left : Unbounded_String;
Right : String) return Boolean
is
LR : constant Shared_String_Access := Left.Reference;
begin
return LR.Data (1 .. LR.Last) <= Right;
end "<=";
function "<="
(Left : String;
Right : Unbounded_String) return Boolean
is
RR : constant Shared_String_Access := Right.Reference;
begin
return Left <= RR.Data (1 .. RR.Last);
end "<=";
---------
-- "=" --
---------
function "="
(Left : Unbounded_String;
Right : Unbounded_String) return Boolean
is
LR : constant Shared_String_Access := Left.Reference;
RR : constant Shared_String_Access := Right.Reference;
begin
return LR = RR or else LR.Data (1 .. LR.Last) = RR.Data (1 .. RR.Last);
-- LR = RR means two strings shares shared string, thus they are equal
end "=";
function "="
(Left : Unbounded_String;
Right : String) return Boolean
is
LR : constant Shared_String_Access := Left.Reference;
begin
return LR.Data (1 .. LR.Last) = Right;
end "=";
function "="
(Left : String;
Right : Unbounded_String) return Boolean
is
RR : constant Shared_String_Access := Right.Reference;
begin
return Left = RR.Data (1 .. RR.Last);
end "=";
---------
-- ">" --
---------
function ">"
(Left : Unbounded_String;
Right : Unbounded_String) return Boolean
is
LR : constant Shared_String_Access := Left.Reference;
RR : constant Shared_String_Access := Right.Reference;
begin
return LR.Data (1 .. LR.Last) > RR.Data (1 .. RR.Last);
end ">";
function ">"
(Left : Unbounded_String;
Right : String) return Boolean
is
LR : constant Shared_String_Access := Left.Reference;
begin
return LR.Data (1 .. LR.Last) > Right;
end ">";
function ">"
(Left : String;
Right : Unbounded_String) return Boolean
is
RR : constant Shared_String_Access := Right.Reference;
begin
return Left > RR.Data (1 .. RR.Last);
end ">";
----------
-- ">=" --
----------
function ">="
(Left : Unbounded_String;
Right : Unbounded_String) return Boolean
is
LR : constant Shared_String_Access := Left.Reference;
RR : constant Shared_String_Access := Right.Reference;
begin
-- LR = RR means two strings shares shared string, thus they are equal
return LR = RR or else LR.Data (1 .. LR.Last) >= RR.Data (1 .. RR.Last);
end ">=";
function ">="
(Left : Unbounded_String;
Right : String) return Boolean
is
LR : constant Shared_String_Access := Left.Reference;
begin
return LR.Data (1 .. LR.Last) >= Right;
end ">=";
function ">="
(Left : String;
Right : Unbounded_String) return Boolean
is
RR : constant Shared_String_Access := Right.Reference;
begin
return Left >= RR.Data (1 .. RR.Last);
end ">=";
------------
-- Adjust --
------------
procedure Adjust (Object : in out Unbounded_String) is
begin
Reference (Object.Reference);
end Adjust;
------------------------
-- Aligned_Max_Length --
------------------------
function Aligned_Max_Length (Max_Length : Natural) return Natural is
Static_Size : constant Natural :=
Empty_Shared_String'Size / Standard'Storage_Unit;
-- Total size of all static components
begin
return
((Static_Size + Max_Length - 1) / Min_Mul_Alloc + 2) * Min_Mul_Alloc
- Static_Size;
end Aligned_Max_Length;
--------------
-- Allocate --
--------------
function Allocate
(Max_Length : Natural) return not null Shared_String_Access
is
begin
-- Empty string requested, return shared empty string
if Max_Length = 0 then
Reference (Empty_Shared_String'Access);
return Empty_Shared_String'Access;
-- Otherwise, allocate requested space (and probably some more room)
else
return new Shared_String (Aligned_Max_Length (Max_Length));
end if;
end Allocate;
------------
-- Append --
------------
procedure Append
(Source : in out Unbounded_String;
New_Item : Unbounded_String)
is
SR : constant Shared_String_Access := Source.Reference;
NR : constant Shared_String_Access := New_Item.Reference;
DL : constant Natural := SR.Last + NR.Last;
DR : Shared_String_Access;
begin
-- Source is an empty string, reuse New_Item data
if SR.Last = 0 then
Reference (NR);
Source.Reference := NR;
Unreference (SR);
-- New_Item is empty string, nothing to do
elsif NR.Last = 0 then
null;
-- Try to reuse existing shared string
elsif Can_Be_Reused (SR, DL) then
SR.Data (SR.Last + 1 .. DL) := NR.Data (1 .. NR.Last);
SR.Last := DL;
-- Otherwise, allocate new one and fill it
else
DR := Allocate (DL + DL / Growth_Factor);
DR.Data (1 .. SR.Last) := SR.Data (1 .. SR.Last);
DR.Data (SR.Last + 1 .. DL) := NR.Data (1 .. NR.Last);
DR.Last := DL;
Source.Reference := DR;
Unreference (SR);
end if;
end Append;
procedure Append
(Source : in out Unbounded_String;
New_Item : String)
is
SR : constant Shared_String_Access := Source.Reference;
DL : constant Natural := SR.Last + New_Item'Length;
DR : Shared_String_Access;
begin
-- New_Item is an empty string, nothing to do
if New_Item'Length = 0 then
null;
-- Try to reuse existing shared string
elsif Can_Be_Reused (SR, DL) then
SR.Data (SR.Last + 1 .. DL) := New_Item;
SR.Last := DL;
-- Otherwise, allocate new one and fill it
else
DR := Allocate (DL + DL / Growth_Factor);
DR.Data (1 .. SR.Last) := SR.Data (1 .. SR.Last);
DR.Data (SR.Last + 1 .. DL) := New_Item;
DR.Last := DL;
Source.Reference := DR;
Unreference (SR);
end if;
end Append;
procedure Append
(Source : in out Unbounded_String;
New_Item : Character)
is
SR : constant Shared_String_Access := Source.Reference;
DL : constant Natural := SR.Last + 1;
DR : Shared_String_Access;
begin
-- Try to reuse existing shared string
if Can_Be_Reused (SR, SR.Last + 1) then
SR.Data (SR.Last + 1) := New_Item;
SR.Last := SR.Last + 1;
-- Otherwise, allocate new one and fill it
else
DR := Allocate (DL + DL / Growth_Factor);
DR.Data (1 .. SR.Last) := SR.Data (1 .. SR.Last);
DR.Data (DL) := New_Item;
DR.Last := DL;
Source.Reference := DR;
Unreference (SR);
end if;
end Append;
-------------------
-- Can_Be_Reused --
-------------------
function Can_Be_Reused
(Item : not null Shared_String_Access;
Length : Natural) return Boolean
is
begin
return
System.Atomic_Counters.Is_One (Item.Counter)
and then Item.Max_Length >= Length
and then Item.Max_Length <=
Aligned_Max_Length (Length + Length / Growth_Factor);
end Can_Be_Reused;
-----------
-- Count --
-----------
function Count
(Source : Unbounded_String;
Pattern : String;
Mapping : Maps.Character_Mapping := Maps.Identity) return Natural
is
SR : constant Shared_String_Access := Source.Reference;
begin
return Search.Count (SR.Data (1 .. SR.Last), Pattern, Mapping);
end Count;
function Count
(Source : Unbounded_String;
Pattern : String;
Mapping : Maps.Character_Mapping_Function) return Natural
is
SR : constant Shared_String_Access := Source.Reference;
begin
return Search.Count (SR.Data (1 .. SR.Last), Pattern, Mapping);
end Count;
function Count
(Source : Unbounded_String;
Set : Maps.Character_Set) return Natural
is
SR : constant Shared_String_Access := Source.Reference;
begin
return Search.Count (SR.Data (1 .. SR.Last), Set);
end Count;
------------
-- Delete --
------------
function Delete
(Source : Unbounded_String;
From : Positive;
Through : Natural) return Unbounded_String
is
SR : constant Shared_String_Access := Source.Reference;
DL : Natural;
DR : Shared_String_Access;
begin
-- Empty slice is deleted, use the same shared string
if From > Through then
Reference (SR);
DR := SR;
-- Index is out of range
elsif Through > SR.Last then
raise Index_Error;
-- Compute size of the result
else
DL := SR.Last - (Through - From + 1);
-- Result is an empty string, reuse shared empty string
if DL = 0 then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
-- Otherwise, allocate new shared string and fill it
else
DR := Allocate (DL);
DR.Data (1 .. From - 1) := SR.Data (1 .. From - 1);
DR.Data (From .. DL) := SR.Data (Through + 1 .. SR.Last);
DR.Last := DL;
end if;
end if;
return (AF.Controlled with Reference => DR);
end Delete;
procedure Delete
(Source : in out Unbounded_String;
From : Positive;
Through : Natural)
is
SR : constant Shared_String_Access := Source.Reference;
DL : Natural;
DR : Shared_String_Access;
begin
-- Nothing changed, return
if From > Through then
null;
-- Through is outside of the range
elsif Through > SR.Last then
raise Index_Error;
else
DL := SR.Last - (Through - From + 1);
-- Result is empty, reuse shared empty string
if DL = 0 then
Reference (Empty_Shared_String'Access);
Source.Reference := Empty_Shared_String'Access;
Unreference (SR);
-- Try to reuse existing shared string
elsif Can_Be_Reused (SR, DL) then
SR.Data (From .. DL) := SR.Data (Through + 1 .. SR.Last);
SR.Last := DL;
-- Otherwise, allocate new shared string
else
DR := Allocate (DL);
DR.Data (1 .. From - 1) := SR.Data (1 .. From - 1);
DR.Data (From .. DL) := SR.Data (Through + 1 .. SR.Last);
DR.Last := DL;
Source.Reference := DR;
Unreference (SR);
end if;
end if;
end Delete;
-------------
-- Element --
-------------
function Element
(Source : Unbounded_String;
Index : Positive) return Character
is
SR : constant Shared_String_Access := Source.Reference;
begin
if Index <= SR.Last then
return SR.Data (Index);
else
raise Index_Error;
end if;
end Element;
--------------
-- Finalize --
--------------
procedure Finalize (Object : in out Unbounded_String) is
SR : constant not null Shared_String_Access := Object.Reference;
begin
if SR /= Null_Unbounded_String.Reference then
-- The same controlled object can be finalized several times for
-- some reason. As per 7.6.1(24) this should have no ill effect,
-- so we need to add a guard for the case of finalizing the same
-- object twice.
-- We set the Object to the empty string so there will be no ill
-- effects if a program references an already-finalized object.
Object.Reference := Null_Unbounded_String.Reference;
Reference (Object.Reference);
Unreference (SR);
end if;
end Finalize;
----------------
-- Find_Token --
----------------
procedure Find_Token
(Source : Unbounded_String;
Set : Maps.Character_Set;
From : Positive;
Test : Strings.Membership;
First : out Positive;
Last : out Natural)
is
SR : constant Shared_String_Access := Source.Reference;
begin
Search.Find_Token (SR.Data (From .. SR.Last), Set, Test, First, Last);
end Find_Token;
procedure Find_Token
(Source : Unbounded_String;
Set : Maps.Character_Set;
Test : Strings.Membership;
First : out Positive;
Last : out Natural)
is
SR : constant Shared_String_Access := Source.Reference;
begin
Search.Find_Token (SR.Data (1 .. SR.Last), Set, Test, First, Last);
end Find_Token;
----------
-- Free --
----------
procedure Free (X : in out String_Access) is
procedure Deallocate is
new Ada.Unchecked_Deallocation (String, String_Access);
begin
Deallocate (X);
end Free;
----------
-- Head --
----------
function Head
(Source : Unbounded_String;
Count : Natural;
Pad : Character := Space) return Unbounded_String
is
SR : constant Shared_String_Access := Source.Reference;
DR : Shared_String_Access;
begin
-- Result is empty, reuse shared empty string
if Count = 0 then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
-- Length of the string is the same as requested, reuse source shared
-- string.
elsif Count = SR.Last then
Reference (SR);
DR := SR;
-- Otherwise, allocate new shared string and fill it
else
DR := Allocate (Count);
-- Length of the source string is more than requested, copy
-- corresponding slice.
if Count < SR.Last then
DR.Data (1 .. Count) := SR.Data (1 .. Count);
-- Length of the source string is less than requested, copy all
-- contents and fill others by Pad character.
else
DR.Data (1 .. SR.Last) := SR.Data (1 .. SR.Last);
for J in SR.Last + 1 .. Count loop
DR.Data (J) := Pad;
end loop;
end if;
DR.Last := Count;
end if;
return (AF.Controlled with Reference => DR);
end Head;
procedure Head
(Source : in out Unbounded_String;
Count : Natural;
Pad : Character := Space)
is
SR : constant Shared_String_Access := Source.Reference;
DR : Shared_String_Access;
begin
-- Result is empty, reuse empty shared string
if Count = 0 then
Reference (Empty_Shared_String'Access);
Source.Reference := Empty_Shared_String'Access;
Unreference (SR);
-- Result is same as source string, reuse source shared string
elsif Count = SR.Last then
null;
-- Try to reuse existing shared string
elsif Can_Be_Reused (SR, Count) then
if Count > SR.Last then
for J in SR.Last + 1 .. Count loop
SR.Data (J) := Pad;
end loop;
end if;
SR.Last := Count;
-- Otherwise, allocate new shared string and fill it
else
DR := Allocate (Count);
-- Length of the source string is greater than requested, copy
-- corresponding slice.
if Count < SR.Last then
DR.Data (1 .. Count) := SR.Data (1 .. Count);
-- Length of the source string is less than requested, copy all
-- existing data and fill remaining positions with Pad characters.
else
DR.Data (1 .. SR.Last) := SR.Data (1 .. SR.Last);
for J in SR.Last + 1 .. Count loop
DR.Data (J) := Pad;
end loop;
end if;
DR.Last := Count;
Source.Reference := DR;
Unreference (SR);
end if;
end Head;
-----------
-- Index --
-----------
function Index
(Source : Unbounded_String;
Pattern : String;
Going : Strings.Direction := Strings.Forward;
Mapping : Maps.Character_Mapping := Maps.Identity) return Natural
is
SR : constant Shared_String_Access := Source.Reference;
begin
return Search.Index (SR.Data (1 .. SR.Last), Pattern, Going, Mapping);
end Index;
function Index
(Source : Unbounded_String;
Pattern : String;
Going : Direction := Forward;
Mapping : Maps.Character_Mapping_Function) return Natural
is
SR : constant Shared_String_Access := Source.Reference;
begin
return Search.Index (SR.Data (1 .. SR.Last), Pattern, Going, Mapping);
end Index;
function Index
(Source : Unbounded_String;
Set : Maps.Character_Set;
Test : Strings.Membership := Strings.Inside;
Going : Strings.Direction := Strings.Forward) return Natural
is
SR : constant Shared_String_Access := Source.Reference;
begin
return Search.Index (SR.Data (1 .. SR.Last), Set, Test, Going);
end Index;
function Index
(Source : Unbounded_String;
Pattern : String;
From : Positive;
Going : Direction := Forward;
Mapping : Maps.Character_Mapping := Maps.Identity) return Natural
is
SR : constant Shared_String_Access := Source.Reference;
begin
return Search.Index
(SR.Data (1 .. SR.Last), Pattern, From, Going, Mapping);
end Index;
function Index
(Source : Unbounded_String;
Pattern : String;
From : Positive;
Going : Direction := Forward;
Mapping : Maps.Character_Mapping_Function) return Natural
is
SR : constant Shared_String_Access := Source.Reference;
begin
return Search.Index
(SR.Data (1 .. SR.Last), Pattern, From, Going, Mapping);
end Index;
function Index
(Source : Unbounded_String;
Set : Maps.Character_Set;
From : Positive;
Test : Membership := Inside;
Going : Direction := Forward) return Natural
is
SR : constant Shared_String_Access := Source.Reference;
begin
return Search.Index (SR.Data (1 .. SR.Last), Set, From, Test, Going);
end Index;
---------------------
-- Index_Non_Blank --
---------------------
function Index_Non_Blank
(Source : Unbounded_String;
Going : Strings.Direction := Strings.Forward) return Natural
is
SR : constant Shared_String_Access := Source.Reference;
begin
return Search.Index_Non_Blank (SR.Data (1 .. SR.Last), Going);
end Index_Non_Blank;
function Index_Non_Blank
(Source : Unbounded_String;
From : Positive;
Going : Direction := Forward) return Natural
is
SR : constant Shared_String_Access := Source.Reference;
begin
return Search.Index_Non_Blank (SR.Data (1 .. SR.Last), From, Going);
end Index_Non_Blank;
----------------
-- Initialize --
----------------
procedure Initialize (Object : in out Unbounded_String) is
begin
Reference (Object.Reference);
end Initialize;
------------
-- Insert --
------------
function Insert
(Source : Unbounded_String;
Before : Positive;
New_Item : String) return Unbounded_String
is
SR : constant Shared_String_Access := Source.Reference;
DL : constant Natural := SR.Last + New_Item'Length;
DR : Shared_String_Access;
begin
-- Check index first
if Before > SR.Last + 1 then
raise Index_Error;
end if;
-- Result is empty, reuse empty shared string
if DL = 0 then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
-- Inserted string is empty, reuse source shared string
elsif New_Item'Length = 0 then
Reference (SR);
DR := SR;
-- Otherwise, allocate new shared string and fill it
else
DR := Allocate (DL + DL / Growth_Factor);
DR.Data (1 .. Before - 1) := SR.Data (1 .. Before - 1);
DR.Data (Before .. Before + New_Item'Length - 1) := New_Item;
DR.Data (Before + New_Item'Length .. DL) :=
SR.Data (Before .. SR.Last);
DR.Last := DL;
end if;
return (AF.Controlled with Reference => DR);
end Insert;
procedure Insert
(Source : in out Unbounded_String;
Before : Positive;
New_Item : String)
is
SR : constant Shared_String_Access := Source.Reference;
DL : constant Natural := SR.Last + New_Item'Length;
DR : Shared_String_Access;
begin
-- Check bounds
if Before > SR.Last + 1 then
raise Index_Error;
end if;
-- Result is empty string, reuse empty shared string
if DL = 0 then
Reference (Empty_Shared_String'Access);
Source.Reference := Empty_Shared_String'Access;
Unreference (SR);
-- Inserted string is empty, nothing to do
elsif New_Item'Length = 0 then
null;
-- Try to reuse existing shared string first
elsif Can_Be_Reused (SR, DL) then
SR.Data (Before + New_Item'Length .. DL) :=
SR.Data (Before .. SR.Last);
SR.Data (Before .. Before + New_Item'Length - 1) := New_Item;
SR.Last := DL;
-- Otherwise, allocate new shared string and fill it
else
DR := Allocate (DL + DL / Growth_Factor);
DR.Data (1 .. Before - 1) := SR.Data (1 .. Before - 1);
DR.Data (Before .. Before + New_Item'Length - 1) := New_Item;
DR.Data (Before + New_Item'Length .. DL) :=
SR.Data (Before .. SR.Last);
DR.Last := DL;
Source.Reference := DR;
Unreference (SR);
end if;
end Insert;
------------
-- Length --
------------
function Length (Source : Unbounded_String) return Natural is
begin
return Source.Reference.Last;
end Length;
---------------
-- Overwrite --
---------------
function Overwrite
(Source : Unbounded_String;
Position : Positive;
New_Item : String) return Unbounded_String
is
SR : constant Shared_String_Access := Source.Reference;
DL : Natural;
DR : Shared_String_Access;
begin
-- Check bounds
if Position > SR.Last + 1 then
raise Index_Error;
end if;
DL := Integer'Max (SR.Last, Position + New_Item'Length - 1);
-- Result is empty string, reuse empty shared string
if DL = 0 then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
-- Result is same as source string, reuse source shared string
elsif New_Item'Length = 0 then
Reference (SR);
DR := SR;
-- Otherwise, allocate new shared string and fill it
else
DR := Allocate (DL);
DR.Data (1 .. Position - 1) := SR.Data (1 .. Position - 1);
DR.Data (Position .. Position + New_Item'Length - 1) := New_Item;
DR.Data (Position + New_Item'Length .. DL) :=
SR.Data (Position + New_Item'Length .. SR.Last);
DR.Last := DL;
end if;
return (AF.Controlled with Reference => DR);
end Overwrite;
procedure Overwrite
(Source : in out Unbounded_String;
Position : Positive;
New_Item : String)
is
SR : constant Shared_String_Access := Source.Reference;
DL : Natural;
DR : Shared_String_Access;
begin
-- Bounds check
if Position > SR.Last + 1 then
raise Index_Error;
end if;
DL := Integer'Max (SR.Last, Position + New_Item'Length - 1);
-- Result is empty string, reuse empty shared string
if DL = 0 then
Reference (Empty_Shared_String'Access);
Source.Reference := Empty_Shared_String'Access;
Unreference (SR);
-- String unchanged, nothing to do
elsif New_Item'Length = 0 then
null;
-- Try to reuse existing shared string
elsif Can_Be_Reused (SR, DL) then
SR.Data (Position .. Position + New_Item'Length - 1) := New_Item;
SR.Last := DL;
-- Otherwise allocate new shared string and fill it
else
DR := Allocate (DL);
DR.Data (1 .. Position - 1) := SR.Data (1 .. Position - 1);
DR.Data (Position .. Position + New_Item'Length - 1) := New_Item;
DR.Data (Position + New_Item'Length .. DL) :=
SR.Data (Position + New_Item'Length .. SR.Last);
DR.Last := DL;
Source.Reference := DR;
Unreference (SR);
end if;
end Overwrite;
---------------
-- Reference --
---------------
procedure Reference (Item : not null Shared_String_Access) is
begin
System.Atomic_Counters.Increment (Item.Counter);
end Reference;
---------------------
-- Replace_Element --
---------------------
procedure Replace_Element
(Source : in out Unbounded_String;
Index : Positive;
By : Character)
is
SR : constant Shared_String_Access := Source.Reference;
DR : Shared_String_Access;
begin
-- Bounds check
if Index <= SR.Last then
-- Try to reuse existing shared string
if Can_Be_Reused (SR, SR.Last) then
SR.Data (Index) := By;
-- Otherwise allocate new shared string and fill it
else
DR := Allocate (SR.Last);
DR.Data (1 .. SR.Last) := SR.Data (1 .. SR.Last);
DR.Data (Index) := By;
DR.Last := SR.Last;
Source.Reference := DR;
Unreference (SR);
end if;
else
raise Index_Error;
end if;
end Replace_Element;
-------------------
-- Replace_Slice --
-------------------
function Replace_Slice
(Source : Unbounded_String;
Low : Positive;
High : Natural;
By : String) return Unbounded_String
is
SR : constant Shared_String_Access := Source.Reference;
DL : Natural;
DR : Shared_String_Access;
begin
-- Check bounds
if Low > SR.Last + 1 then
raise Index_Error;
end if;
-- Do replace operation when removed slice is not empty
if High >= Low then
DL := By'Length + SR.Last + Low - Integer'Min (High, SR.Last) - 1;
-- This is the number of characters remaining in the string after
-- replacing the slice.
-- Result is empty string, reuse empty shared string
if DL = 0 then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
-- Otherwise allocate new shared string and fill it
else
DR := Allocate (DL);
DR.Data (1 .. Low - 1) := SR.Data (1 .. Low - 1);
DR.Data (Low .. Low + By'Length - 1) := By;
DR.Data (Low + By'Length .. DL) := SR.Data (High + 1 .. SR.Last);
DR.Last := DL;
end if;
return (AF.Controlled with Reference => DR);
-- Otherwise just insert string
else
return Insert (Source, Low, By);
end if;
end Replace_Slice;
procedure Replace_Slice
(Source : in out Unbounded_String;
Low : Positive;
High : Natural;
By : String)
is
SR : constant Shared_String_Access := Source.Reference;
DL : Natural;
DR : Shared_String_Access;
begin
-- Bounds check
if Low > SR.Last + 1 then
raise Index_Error;
end if;
-- Do replace operation only when replaced slice is not empty
if High >= Low then
DL := By'Length + SR.Last + Low - Integer'Min (High, SR.Last) - 1;
-- This is the number of characters remaining in the string after
-- replacing the slice.
-- Result is empty string, reuse empty shared string
if DL = 0 then
Reference (Empty_Shared_String'Access);
Source.Reference := Empty_Shared_String'Access;
Unreference (SR);
-- Try to reuse existing shared string
elsif Can_Be_Reused (SR, DL) then
SR.Data (Low + By'Length .. DL) := SR.Data (High + 1 .. SR.Last);
SR.Data (Low .. Low + By'Length - 1) := By;
SR.Last := DL;
-- Otherwise allocate new shared string and fill it
else
DR := Allocate (DL);
DR.Data (1 .. Low - 1) := SR.Data (1 .. Low - 1);
DR.Data (Low .. Low + By'Length - 1) := By;
DR.Data (Low + By'Length .. DL) := SR.Data (High + 1 .. SR.Last);
DR.Last := DL;
Source.Reference := DR;
Unreference (SR);
end if;
-- Otherwise just insert item
else
Insert (Source, Low, By);
end if;
end Replace_Slice;
--------------------------
-- Set_Unbounded_String --
--------------------------
procedure Set_Unbounded_String
(Target : out Unbounded_String;
Source : String)
is
TR : constant Shared_String_Access := Target.Reference;
DR : Shared_String_Access;
begin
-- In case of empty string, reuse empty shared string
if Source'Length = 0 then
Reference (Empty_Shared_String'Access);
Target.Reference := Empty_Shared_String'Access;
else
-- Try to reuse existing shared string
if Can_Be_Reused (TR, Source'Length) then
Reference (TR);
DR := TR;
-- Otherwise allocate new shared string
else
DR := Allocate (Source'Length);
Target.Reference := DR;
end if;
DR.Data (1 .. Source'Length) := Source;
DR.Last := Source'Length;
end if;
Unreference (TR);
end Set_Unbounded_String;
-----------
-- Slice --
-----------
function Slice
(Source : Unbounded_String;
Low : Positive;
High : Natural) return String
is
SR : constant Shared_String_Access := Source.Reference;
begin
-- Note: test of High > Length is in accordance with AI95-00128
if Low > SR.Last + 1 or else High > SR.Last then
raise Index_Error;
else
return SR.Data (Low .. High);
end if;
end Slice;
----------
-- Tail --
----------
function Tail
(Source : Unbounded_String;
Count : Natural;
Pad : Character := Space) return Unbounded_String
is
SR : constant Shared_String_Access := Source.Reference;
DR : Shared_String_Access;
begin
-- For empty result reuse empty shared string
if Count = 0 then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
-- Result is whole source string, reuse source shared string
elsif Count = SR.Last then
Reference (SR);
DR := SR;
-- Otherwise allocate new shared string and fill it
else
DR := Allocate (Count);
if Count < SR.Last then
DR.Data (1 .. Count) := SR.Data (SR.Last - Count + 1 .. SR.Last);
else
for J in 1 .. Count - SR.Last loop
DR.Data (J) := Pad;
end loop;
DR.Data (Count - SR.Last + 1 .. Count) := SR.Data (1 .. SR.Last);
end if;
DR.Last := Count;
end if;
return (AF.Controlled with Reference => DR);
end Tail;
procedure Tail
(Source : in out Unbounded_String;
Count : Natural;
Pad : Character := Space)
is
SR : constant Shared_String_Access := Source.Reference;
DR : Shared_String_Access;
procedure Common
(SR : Shared_String_Access;
DR : Shared_String_Access;
Count : Natural);
-- Common code of tail computation. SR/DR can point to the same object
------------
-- Common --
------------
procedure Common
(SR : Shared_String_Access;
DR : Shared_String_Access;
Count : Natural) is
begin
if Count < SR.Last then
DR.Data (1 .. Count) := SR.Data (SR.Last - Count + 1 .. SR.Last);
else
DR.Data (Count - SR.Last + 1 .. Count) := SR.Data (1 .. SR.Last);
for J in 1 .. Count - SR.Last loop
DR.Data (J) := Pad;
end loop;
end if;
DR.Last := Count;
end Common;
begin
-- Result is empty string, reuse empty shared string
if Count = 0 then
Reference (Empty_Shared_String'Access);
Source.Reference := Empty_Shared_String'Access;
Unreference (SR);
-- Length of the result is the same as length of the source string,
-- reuse source shared string.
elsif Count = SR.Last then
null;
-- Try to reuse existing shared string
elsif Can_Be_Reused (SR, Count) then
Common (SR, SR, Count);
-- Otherwise allocate new shared string and fill it
else
DR := Allocate (Count);
Common (SR, DR, Count);
Source.Reference := DR;
Unreference (SR);
end if;
end Tail;
---------------
-- To_String --
---------------
function To_String (Source : Unbounded_String) return String is
begin
return Source.Reference.Data (1 .. Source.Reference.Last);
end To_String;
-------------------------
-- To_Unbounded_String --
-------------------------
function To_Unbounded_String (Source : String) return Unbounded_String is
DR : Shared_String_Access;
begin
if Source'Length = 0 then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
else
DR := Allocate (Source'Length);
DR.Data (1 .. Source'Length) := Source;
DR.Last := Source'Length;
end if;
return (AF.Controlled with Reference => DR);
end To_Unbounded_String;
function To_Unbounded_String (Length : Natural) return Unbounded_String is
DR : Shared_String_Access;
begin
if Length = 0 then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
else
DR := Allocate (Length);
DR.Last := Length;
end if;
return (AF.Controlled with Reference => DR);
end To_Unbounded_String;
---------------
-- Translate --
---------------
function Translate
(Source : Unbounded_String;
Mapping : Maps.Character_Mapping) return Unbounded_String
is
SR : constant Shared_String_Access := Source.Reference;
DR : Shared_String_Access;
begin
-- Nothing to translate, reuse empty shared string
if SR.Last = 0 then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
-- Otherwise, allocate new shared string and fill it
else
DR := Allocate (SR.Last);
for J in 1 .. SR.Last loop
DR.Data (J) := Value (Mapping, SR.Data (J));
end loop;
DR.Last := SR.Last;
end if;
return (AF.Controlled with Reference => DR);
end Translate;
procedure Translate
(Source : in out Unbounded_String;
Mapping : Maps.Character_Mapping)
is
SR : constant Shared_String_Access := Source.Reference;
DR : Shared_String_Access;
begin
-- Nothing to translate
if SR.Last = 0 then
null;
-- Try to reuse shared string
elsif Can_Be_Reused (SR, SR.Last) then
for J in 1 .. SR.Last loop
SR.Data (J) := Value (Mapping, SR.Data (J));
end loop;
-- Otherwise, allocate new shared string
else
DR := Allocate (SR.Last);
for J in 1 .. SR.Last loop
DR.Data (J) := Value (Mapping, SR.Data (J));
end loop;
DR.Last := SR.Last;
Source.Reference := DR;
Unreference (SR);
end if;
end Translate;
function Translate
(Source : Unbounded_String;
Mapping : Maps.Character_Mapping_Function) return Unbounded_String
is
SR : constant Shared_String_Access := Source.Reference;
DR : Shared_String_Access;
begin
-- Nothing to translate, reuse empty shared string
if SR.Last = 0 then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
-- Otherwise, allocate new shared string and fill it
else
DR := Allocate (SR.Last);
for J in 1 .. SR.Last loop
DR.Data (J) := Mapping.all (SR.Data (J));
end loop;
DR.Last := SR.Last;
end if;
return (AF.Controlled with Reference => DR);
exception
when others =>
Unreference (DR);
raise;
end Translate;
procedure Translate
(Source : in out Unbounded_String;
Mapping : Maps.Character_Mapping_Function)
is
SR : constant Shared_String_Access := Source.Reference;
DR : Shared_String_Access;
begin
-- Nothing to translate
if SR.Last = 0 then
null;
-- Try to reuse shared string
elsif Can_Be_Reused (SR, SR.Last) then
for J in 1 .. SR.Last loop
SR.Data (J) := Mapping.all (SR.Data (J));
end loop;
-- Otherwise allocate new shared string and fill it
else
DR := Allocate (SR.Last);
for J in 1 .. SR.Last loop
DR.Data (J) := Mapping.all (SR.Data (J));
end loop;
DR.Last := SR.Last;
Source.Reference := DR;
Unreference (SR);
end if;
exception
when others =>
if DR /= null then
Unreference (DR);
end if;
raise;
end Translate;
----------
-- Trim --
----------
function Trim
(Source : Unbounded_String;
Side : Trim_End) return Unbounded_String
is
SR : constant Shared_String_Access := Source.Reference;
DL : Natural;
DR : Shared_String_Access;
Low : Natural;
High : Natural;
begin
Low := Index_Non_Blank (Source, Forward);
-- All blanks, reuse empty shared string
if Low = 0 then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
else
case Side is
when Left =>
High := SR.Last;
DL := SR.Last - Low + 1;
when Right =>
Low := 1;
High := Index_Non_Blank (Source, Backward);
DL := High;
when Both =>
High := Index_Non_Blank (Source, Backward);
DL := High - Low + 1;
end case;
-- Length of the result is the same as length of the source string,
-- reuse source shared string.
if DL = SR.Last then
Reference (SR);
DR := SR;
-- Otherwise, allocate new shared string
else
DR := Allocate (DL);
DR.Data (1 .. DL) := SR.Data (Low .. High);
DR.Last := DL;
end if;
end if;
return (AF.Controlled with Reference => DR);
end Trim;
procedure Trim
(Source : in out Unbounded_String;
Side : Trim_End)
is
SR : constant Shared_String_Access := Source.Reference;
DL : Natural;
DR : Shared_String_Access;
Low : Natural;
High : Natural;
begin
Low := Index_Non_Blank (Source, Forward);
-- All blanks, reuse empty shared string
if Low = 0 then
Reference (Empty_Shared_String'Access);
Source.Reference := Empty_Shared_String'Access;
Unreference (SR);
else
case Side is
when Left =>
High := SR.Last;
DL := SR.Last - Low + 1;
when Right =>
Low := 1;
High := Index_Non_Blank (Source, Backward);
DL := High;
when Both =>
High := Index_Non_Blank (Source, Backward);
DL := High - Low + 1;
end case;
-- Length of the result is the same as length of the source string,
-- nothing to do.
if DL = SR.Last then
null;
-- Try to reuse existing shared string
elsif Can_Be_Reused (SR, DL) then
SR.Data (1 .. DL) := SR.Data (Low .. High);
SR.Last := DL;
-- Otherwise, allocate new shared string
else
DR := Allocate (DL);
DR.Data (1 .. DL) := SR.Data (Low .. High);
DR.Last := DL;
Source.Reference := DR;
Unreference (SR);
end if;
end if;
end Trim;
function Trim
(Source : Unbounded_String;
Left : Maps.Character_Set;
Right : Maps.Character_Set) return Unbounded_String
is
SR : constant Shared_String_Access := Source.Reference;
DL : Natural;
DR : Shared_String_Access;
Low : Natural;
High : Natural;
begin
Low := Index (Source, Left, Outside, Forward);
-- Source includes only characters from Left set, reuse empty shared
-- string.
if Low = 0 then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
else
High := Index (Source, Right, Outside, Backward);
DL := Integer'Max (0, High - Low + 1);
-- Source includes only characters from Right set or result string
-- is empty, reuse empty shared string.
if High = 0 or else DL = 0 then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
-- Otherwise, allocate new shared string and fill it
else
DR := Allocate (DL);
DR.Data (1 .. DL) := SR.Data (Low .. High);
DR.Last := DL;
end if;
end if;
return (AF.Controlled with Reference => DR);
end Trim;
procedure Trim
(Source : in out Unbounded_String;
Left : Maps.Character_Set;
Right : Maps.Character_Set)
is
SR : constant Shared_String_Access := Source.Reference;
DL : Natural;
DR : Shared_String_Access;
Low : Natural;
High : Natural;
begin
Low := Index (Source, Left, Outside, Forward);
-- Source includes only characters from Left set, reuse empty shared
-- string.
if Low = 0 then
Reference (Empty_Shared_String'Access);
Source.Reference := Empty_Shared_String'Access;
Unreference (SR);
else
High := Index (Source, Right, Outside, Backward);
DL := Integer'Max (0, High - Low + 1);
-- Source includes only characters from Right set or result string
-- is empty, reuse empty shared string.
if High = 0 or else DL = 0 then
Reference (Empty_Shared_String'Access);
Source.Reference := Empty_Shared_String'Access;
Unreference (SR);
-- Try to reuse existing shared string
elsif Can_Be_Reused (SR, DL) then
SR.Data (1 .. DL) := SR.Data (Low .. High);
SR.Last := DL;
-- Otherwise, allocate new shared string and fill it
else
DR := Allocate (DL);
DR.Data (1 .. DL) := SR.Data (Low .. High);
DR.Last := DL;
Source.Reference := DR;
Unreference (SR);
end if;
end if;
end Trim;
---------------------
-- Unbounded_Slice --
---------------------
function Unbounded_Slice
(Source : Unbounded_String;
Low : Positive;
High : Natural) return Unbounded_String
is
SR : constant Shared_String_Access := Source.Reference;
DL : Natural;
DR : Shared_String_Access;
begin
-- Check bounds
if Low > SR.Last + 1 or else High > SR.Last then
raise Index_Error;
-- Result is empty slice, reuse empty shared string
elsif Low > High then
Reference (Empty_Shared_String'Access);
DR := Empty_Shared_String'Access;
-- Otherwise, allocate new shared string and fill it
else
DL := High - Low + 1;
DR := Allocate (DL);
DR.Data (1 .. DL) := SR.Data (Low .. High);
DR.Last := DL;
end if;
return (AF.Controlled with Reference => DR);
end Unbounded_Slice;
procedure Unbounded_Slice
(Source : Unbounded_String;
Target : out Unbounded_String;
Low : Positive;
High : Natural)
is
SR : constant Shared_String_Access := Source.Reference;
TR : constant Shared_String_Access := Target.Reference;
DL : Natural;
DR : Shared_String_Access;
begin
-- Check bounds
if Low > SR.Last + 1 or else High > SR.Last then
raise Index_Error;
-- Result is empty slice, reuse empty shared string
elsif Low > High then
Reference (Empty_Shared_String'Access);
Target.Reference := Empty_Shared_String'Access;
Unreference (TR);
else
DL := High - Low + 1;
-- Try to reuse existing shared string
if Can_Be_Reused (TR, DL) then
TR.Data (1 .. DL) := SR.Data (Low .. High);
TR.Last := DL;
-- Otherwise, allocate new shared string and fill it
else
DR := Allocate (DL);
DR.Data (1 .. DL) := SR.Data (Low .. High);
DR.Last := DL;
Target.Reference := DR;
Unreference (TR);
end if;
end if;
end Unbounded_Slice;
-----------------
-- Unreference --
-----------------
procedure Unreference (Item : not null Shared_String_Access) is
procedure Free is
new Ada.Unchecked_Deallocation (Shared_String, Shared_String_Access);
Aux : Shared_String_Access := Item;
begin
if System.Atomic_Counters.Decrement (Aux.Counter) then
-- Reference counter of Empty_Shared_String should never reach
-- zero. We check here in case it wraps around.
if Aux /= Empty_Shared_String'Access then
Free (Aux);
end if;
end if;
end Unreference;
end Ada.Strings.Unbounded;
| 27.10397
| 79
| 0.553616
|
8257e2f8f994108cf3f8491ad399cd2c67938e62
| 1,708
|
adb
|
Ada
|
source/s-once.adb
|
ytomino/drake
|
4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2
|
[
"MIT"
] | 33
|
2015-04-04T09:19:36.000Z
|
2021-11-10T05:33:34.000Z
|
source/s-once.adb
|
ytomino/drake
|
4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2
|
[
"MIT"
] | 8
|
2017-11-14T13:05:07.000Z
|
2018-08-09T15:28:49.000Z
|
source/s-once.adb
|
ytomino/drake
|
4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2
|
[
"MIT"
] | 9
|
2015-02-03T17:09:53.000Z
|
2021-11-12T01:16:05.000Z
|
with System.Storage_Barriers;
with System.Synchronous_Control;
package body System.Once is
pragma Suppress (All_Checks);
Yet : constant := 0;
Start : constant := 1;
Done : constant := 2;
function atomic_load (
ptr : not null access constant Flag;
memorder : Integer := Storage_Barriers.ATOMIC_ACQUIRE)
return Flag
with Import, Convention => Intrinsic, External_Name => "__atomic_load_1";
procedure atomic_store (
ptr : not null access Flag;
val : Flag;
memorder : Integer := Storage_Barriers.ATOMIC_RELEASE)
with Import,
Convention => Intrinsic, External_Name => "__atomic_store_1";
function atomic_compare_exchange (
ptr : not null access Flag;
expected : not null access Flag;
desired : Flag;
weak : Boolean := False;
success_memorder : Integer := Storage_Barriers.ATOMIC_ACQ_REL;
failure_memorder : Integer := Storage_Barriers.ATOMIC_ACQUIRE)
return Boolean
with Import,
Convention => Intrinsic,
External_Name => "__atomic_compare_exchange_1";
-- implementation
procedure Initialize (
Flag : not null access Once.Flag;
Process : not null access procedure)
is
Expected : aliased Once.Flag := Yet;
begin
if atomic_compare_exchange (Flag, Expected'Access, Start) then
-- succeeded to swap
Process.all;
atomic_store (Flag, Done);
elsif Expected = Start then
-- wait until Flag = Done
loop
Synchronous_Control.Yield;
exit when atomic_load (Flag) = Done;
end loop;
end if;
-- Flag = Done
end Initialize;
end System.Once;
| 29.448276
| 79
| 0.643443
|
9d8d6b959d1a94ef6c236dde341bd72fdb3b6dc3
| 6,490
|
ads
|
Ada
|
source/nodes/program-nodes-procedure_access_types.ads
|
optikos/oasis
|
9f64d46d26d964790d69f9db681c874cfb3bf96d
|
[
"MIT"
] | null | null | null |
source/nodes/program-nodes-procedure_access_types.ads
|
optikos/oasis
|
9f64d46d26d964790d69f9db681c874cfb3bf96d
|
[
"MIT"
] | null | null | null |
source/nodes/program-nodes-procedure_access_types.ads
|
optikos/oasis
|
9f64d46d26d964790d69f9db681c874cfb3bf96d
|
[
"MIT"
] | 2
|
2019-09-14T23:18:50.000Z
|
2019-10-02T10:11:40.000Z
|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Lexical_Elements;
with Program.Elements.Parameter_Specifications;
with Program.Elements.Procedure_Access_Types;
with Program.Element_Visitors;
package Program.Nodes.Procedure_Access_Types is
pragma Preelaborate;
type Procedure_Access_Type is
new Program.Nodes.Node
and Program.Elements.Procedure_Access_Types.Procedure_Access_Type
and Program.Elements.Procedure_Access_Types.Procedure_Access_Type_Text
with private;
function Create
(Not_Token : Program.Lexical_Elements.Lexical_Element_Access;
Null_Token : Program.Lexical_Elements.Lexical_Element_Access;
Access_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Protected_Token : Program.Lexical_Elements.Lexical_Element_Access;
Procedure_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Left_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access;
Parameters : Program.Elements.Parameter_Specifications
.Parameter_Specification_Vector_Access;
Right_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access)
return Procedure_Access_Type;
type Implicit_Procedure_Access_Type is
new Program.Nodes.Node
and Program.Elements.Procedure_Access_Types.Procedure_Access_Type
with private;
function Create
(Parameters : Program.Elements.Parameter_Specifications
.Parameter_Specification_Vector_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False;
Has_Not_Null : Boolean := False;
Has_Protected : Boolean := False)
return Implicit_Procedure_Access_Type
with Pre =>
Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance;
private
type Base_Procedure_Access_Type is
abstract new Program.Nodes.Node
and Program.Elements.Procedure_Access_Types.Procedure_Access_Type
with record
Parameters : Program.Elements.Parameter_Specifications
.Parameter_Specification_Vector_Access;
end record;
procedure Initialize
(Self : aliased in out Base_Procedure_Access_Type'Class);
overriding procedure Visit
(Self : not null access Base_Procedure_Access_Type;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class);
overriding function Parameters
(Self : Base_Procedure_Access_Type)
return Program.Elements.Parameter_Specifications
.Parameter_Specification_Vector_Access;
overriding function Is_Procedure_Access_Type_Element
(Self : Base_Procedure_Access_Type)
return Boolean;
overriding function Is_Access_Type_Element
(Self : Base_Procedure_Access_Type)
return Boolean;
overriding function Is_Type_Definition_Element
(Self : Base_Procedure_Access_Type)
return Boolean;
overriding function Is_Definition_Element
(Self : Base_Procedure_Access_Type)
return Boolean;
type Procedure_Access_Type is
new Base_Procedure_Access_Type
and Program.Elements.Procedure_Access_Types.Procedure_Access_Type_Text
with record
Not_Token : Program.Lexical_Elements.Lexical_Element_Access;
Null_Token : Program.Lexical_Elements.Lexical_Element_Access;
Access_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Protected_Token : Program.Lexical_Elements.Lexical_Element_Access;
Procedure_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Left_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access;
Right_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access;
end record;
overriding function To_Procedure_Access_Type_Text
(Self : aliased in out Procedure_Access_Type)
return Program.Elements.Procedure_Access_Types
.Procedure_Access_Type_Text_Access;
overriding function Not_Token
(Self : Procedure_Access_Type)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Null_Token
(Self : Procedure_Access_Type)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Access_Token
(Self : Procedure_Access_Type)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function Protected_Token
(Self : Procedure_Access_Type)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Procedure_Token
(Self : Procedure_Access_Type)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function Left_Bracket_Token
(Self : Procedure_Access_Type)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Right_Bracket_Token
(Self : Procedure_Access_Type)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Has_Not_Null
(Self : Procedure_Access_Type)
return Boolean;
overriding function Has_Protected
(Self : Procedure_Access_Type)
return Boolean;
type Implicit_Procedure_Access_Type is
new Base_Procedure_Access_Type
with record
Is_Part_Of_Implicit : Boolean;
Is_Part_Of_Inherited : Boolean;
Is_Part_Of_Instance : Boolean;
Has_Not_Null : Boolean;
Has_Protected : Boolean;
end record;
overriding function To_Procedure_Access_Type_Text
(Self : aliased in out Implicit_Procedure_Access_Type)
return Program.Elements.Procedure_Access_Types
.Procedure_Access_Type_Text_Access;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Procedure_Access_Type)
return Boolean;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Procedure_Access_Type)
return Boolean;
overriding function Is_Part_Of_Instance
(Self : Implicit_Procedure_Access_Type)
return Boolean;
overriding function Has_Not_Null
(Self : Implicit_Procedure_Access_Type)
return Boolean;
overriding function Has_Protected
(Self : Implicit_Procedure_Access_Type)
return Boolean;
end Program.Nodes.Procedure_Access_Types;
| 35.659341
| 79
| 0.748074
|
10a26fce5f6efb9f157462394c4ef9c6965ce5e1
| 10,704
|
adb
|
Ada
|
tests/natools-s_expressions-templates-tests-dates.adb
|
faelys/natools
|
947c004e6f69ca144942c6af40e102d089223cf8
|
[
"0BSD"
] | null | null | null |
tests/natools-s_expressions-templates-tests-dates.adb
|
faelys/natools
|
947c004e6f69ca144942c6af40e102d089223cf8
|
[
"0BSD"
] | null | null | null |
tests/natools-s_expressions-templates-tests-dates.adb
|
faelys/natools
|
947c004e6f69ca144942c6af40e102d089223cf8
|
[
"0BSD"
] | null | null | null |
------------------------------------------------------------------------------
-- Copyright (c) 2014, Natacha Porté --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- purpose with or without fee is hereby granted, provided that the above --
-- copyright notice and this permission notice appear in all copies. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR --
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES --
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN --
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF --
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --
------------------------------------------------------------------------------
with Ada.Calendar.Formatting;
with Ada.Calendar.Time_Zones;
with Natools.S_Expressions.Parsers;
with Natools.S_Expressions.Test_Tools;
with Natools.S_Expressions.Templates.Dates;
with Natools.Static_Maps.S_Expressions.Templates.Dates.T;
package body Natools.S_Expressions.Templates.Tests.Dates is
procedure Test_Render
(Test : in out NT.Test;
Template : in String;
Expected : in String;
Value : in Ada.Calendar.Time;
Time_Zone : Ada.Calendar.Time_Zones.Time_Offset := 0);
-- Run Template with Value and compare the result with Expected
------------------------------
-- Local Helper Subprograms --
------------------------------
procedure Test_Render
(Test : in out NT.Test;
Template : in String;
Expected : in String;
Value : in Ada.Calendar.Time;
Time_Zone : Ada.Calendar.Time_Zones.Time_Offset := 0)
is
Input : aliased Test_Tools.Memory_Stream;
Output : Test_Tools.Memory_Stream;
Parser : Parsers.Stream_Parser (Input'Access);
begin
Input.Set_Data (To_Atom (Template));
Parser.Next;
Output.Set_Expected (To_Atom (Expected));
Templates.Dates.Render (Output, Parser, Value, Time_Zone);
Output.Check_Stream (Test);
end Test_Render;
-------------------------
-- Complete Test Suite --
-------------------------
procedure All_Tests (Report : in out NT.Reporter'Class) is
begin
Composite_Components (Report);
Forced_Time_Zone (Report);
Padded_Components (Report);
RFC_3339 (Report);
Simple_Components (Report);
Static_Hash_Map (Report);
Weekday_In_Time_Zone (Report);
end All_Tests;
-----------------------
-- Inidividual Tests --
-----------------------
procedure Composite_Components (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Composite date and time formats");
begin
Test_Render
(Test, "(YYYYMMDD)T(HHMMSS)",
"20111125T082052",
Ada.Calendar.Formatting.Time_Of (2011, 11, 25, 8, 20, 52));
Test_Render
(Test, "(big-endian-date ""."")1: (time "":"")",
"2013.10.01 18:49:11",
Ada.Calendar.Formatting.Time_Of (2013, 10, 1, 18, 49, 11));
Test_Render
(Test, "(little-endian-date ""/"")1: (time h m)1:s",
"11/10/2013 21h51m08s",
Ada.Calendar.Formatting.Time_Of (2013, 10, 11, 21, 51, 8));
Test_Render
(Test, "(big-endian-date 1: 1: )2:, (little-endian-time 1:;)",
"2013 10 13, 00;47;15",
Ada.Calendar.Formatting.Time_Of (2013, 10, 13, 15, 47, 0));
Test_Render
(Test, "(SSMMHH)(DDMMYYYY)",
"01082129012014",
Ada.Calendar.Formatting.Time_Of (2014, 1, 29, 21, 8, 1));
exception
when Error : others => Test.Report_Exception (Error);
end Composite_Components;
procedure Forced_Time_Zone (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Time zone set in template");
Moment : constant Ada.Calendar.Time := Ada.Calendar.Formatting.Time_Of
(2012, 8, 29, 22, 42, 16, Time_Zone => 0);
begin
Test_Render
(Test, "(in-zone 0 (rfc-3339))",
"2012-08-29T22:42:16Z", Moment);
Test_Render
(Test, "(in-zone CEST (rfc-3339))",
"2012-08-30T00:42:16+02:00", Moment);
Test_Render
(Test, "(in-zone -01:12 (rfc-3339))",
"2012-08-29T21:30:16-01:12", Moment);
Test_Render
(Test, "(in-zone +0130 (rfc-3339))",
"2012-08-30T00:12:16+01:30", Moment);
Test_Render
(Test, "(in-zone -10 (rfc-3339))",
"2012-08-29T12:42:16-10:00", Moment);
Test_Render
(Test, "(in-zone FOO (rfc-3339))",
"", Moment);
Test_Render
(Test, "(in-zone BARST (rfc-3339))",
"", Moment);
Test_Render
(Test, "(in-zone 12345 (rfc-3339))",
"", Moment);
exception
when Error : others => Test.Report_Exception (Error);
end Forced_Time_Zone;
procedure Padded_Components (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Simple time components with padding");
Template : constant String
:= "(padded-month)(padded-day)(padded-hour)(minute)(padded-second)";
begin
Test_Render
(Test, Template,
"1125082052",
Ada.Calendar.Formatting.Time_Of (2011, 11, 25, 8, 20, 52));
Test_Render
(Test, Template,
"1001184911",
Ada.Calendar.Formatting.Time_Of (2013, 10, 1, 18, 49, 11));
Test_Render
(Test, Template,
"1011215108",
Ada.Calendar.Formatting.Time_Of (2013, 10, 11, 21, 51, 8));
Test_Render
(Test, Template,
"1013154700",
Ada.Calendar.Formatting.Time_Of (2013, 10, 13, 15, 47, 0));
Test_Render
(Test, Template,
"012921801",
Ada.Calendar.Formatting.Time_Of (2014, 1, 29, 21, 8, 1));
exception
when Error : others => Test.Report_Exception (Error);
end Padded_Components;
procedure RFC_3339 (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("RFC-3339 format");
begin
Test_Render
(Test, "(rfc-3339)",
"2011-11-25T08:20:52Z",
Ada.Calendar.Formatting.Time_Of (2011, 11, 25, 8, 20, 52));
Test_Render
(Test, "(rfc-3339)",
"2013-10-01T18:49:11Z",
Ada.Calendar.Formatting.Time_Of (2013, 10, 1, 18, 49, 11));
Test_Render
(Test, "(rfc-3339)",
"2013-10-11T21:51:08Z",
Ada.Calendar.Formatting.Time_Of (2013, 10, 11, 21, 51, 8));
Test_Render
(Test, "(rfc-3339)",
"2013-10-13T15:47:00Z",
Ada.Calendar.Formatting.Time_Of (2013, 10, 13, 15, 47, 0));
Test_Render
(Test, "(rfc-3339)",
"2014-01-29T21:08:01Z",
Ada.Calendar.Formatting.Time_Of (2014, 1, 29, 21, 8, 1));
exception
when Error : others => Test.Report_Exception (Error);
end RFC_3339;
procedure Simple_Components (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Simple time components");
Template : constant String
:= "3:Le "
& "(day-of-week lundi mardi mercredi jeudi vendredi samedi dimanche)"
& "1: "
& "(day (suffix (er 1)))"
& "1: "
& "(month janvier février mars avril mai juin juillet"
& " août septembre octobre novembre décembre)"
& "1: (year)"
& """ à """
& "(hour) 1:h (padded-minute)"
& "4: et (second)"
& "1: (second (image-range secondes (seconde 1 0)))";
begin
Test_Render
(Test, Template,
"Le vendredi 25 novembre 2011 à 8h20 et 52 secondes",
Ada.Calendar.Formatting.Time_Of (2011, 11, 25, 8, 20, 52));
Test_Render
(Test, Template,
"Le mardi 1er octobre 2013 à 18h49 et 11 secondes",
Ada.Calendar.Formatting.Time_Of (2013, 10, 1, 18, 49, 11));
Test_Render
(Test, Template,
"Le vendredi 11 octobre 2013 à 21h51 et 8 secondes",
Ada.Calendar.Formatting.Time_Of (2013, 10, 11, 21, 51, 8));
Test_Render
(Test, Template,
"Le dimanche 13 octobre 2013 à 15h47 et 0 seconde",
Ada.Calendar.Formatting.Time_Of (2013, 10, 13, 15, 47, 0));
Test_Render
(Test, Template,
"Le mercredi 29 janvier 2014 à 21h08 et 1 seconde",
Ada.Calendar.Formatting.Time_Of (2014, 1, 29, 21, 8, 1));
exception
when Error : others => Test.Report_Exception (Error);
end Simple_Components;
procedure Static_Hash_Map (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Parse errors in template");
begin
if not Natools.Static_Maps.S_Expressions.Templates.Dates.T then
Test.Fail;
end if;
exception
when Error : others => Test.Report_Exception (Error);
end Static_Hash_Map;
procedure Weekday_In_Time_Zone (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Week day in various time zones");
Early : constant Ada.Calendar.Time := Ada.Calendar.Formatting.Time_Of
(2015, 11, 11, 0, 29, 0, Time_Zone => 0);
Late : constant Ada.Calendar.Time := Ada.Calendar.Formatting.Time_Of
(2015, 11, 11, 23, 31, 0, Time_Zone => 0);
Template_Prefix : constant String := "(in-zone ";
Template_Suffix : constant String
:= " (day-of-week Monday Tuesday Wednesday"
& " Thursday Friday Saturday Sunday) 1: "
& " (day (suffix th (st 1 21 31) (nd 2 22) (rd 3 23))) 2:, "
& " (hour) 1:: (padded-minute))";
procedure Double_Test (Zone, Expected_Early, Expected_Late : String);
procedure Double_Test (Zone, Expected_Early, Expected_Late : String) is
begin
Test_Render
(Test, Template_Prefix & Zone & Template_Suffix,
Expected_Early, Early);
Test_Render
(Test, Template_Prefix & Zone & Template_Suffix,
Expected_Late, Late);
end Double_Test;
begin
Double_Test ("0", "Wednesday 11th, 0:29", "Wednesday 11th, 23:31");
Double_Test ("-01:00", "Tuesday 10th, 23:29", "Wednesday 11th, 22:31");
Double_Test ("+01:00", "Wednesday 11th, 1:29", "Thursday 12th, 0:31");
exception
when Error : others => Test.Report_Exception (Error);
end Weekday_In_Time_Zone;
end Natools.S_Expressions.Templates.Tests.Dates;
| 37.690141
| 78
| 0.582212
|
8cc9b5547306ec0bc71eafb5f900a767459fb74d
| 7,399
|
ads
|
Ada
|
bb-runtimes/src/a-intnam__zynq.ads
|
JCGobbi/Nucleo-STM32G474RE
|
8dc1c4948ffeb11841eed10f1c3708f00fa1d832
|
[
"BSD-3-Clause"
] | null | null | null |
bb-runtimes/src/a-intnam__zynq.ads
|
JCGobbi/Nucleo-STM32G474RE
|
8dc1c4948ffeb11841eed10f1c3708f00fa1d832
|
[
"BSD-3-Clause"
] | null | null | null |
bb-runtimes/src/a-intnam__zynq.ads
|
JCGobbi/Nucleo-STM32G474RE
|
8dc1c4948ffeb11841eed10f1c3708f00fa1d832
|
[
"BSD-3-Clause"
] | null | null | null |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- A D A . I N T E R R U P T S . N A M E S --
-- --
-- S p e c --
-- --
-- Copyright (C) 2012-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
-- This package version is specific to the zynq target
pragma Restrictions (No_Elaboration_Code);
package Ada.Interrupts.Names is
-- All identifiers in this unit are implementation defined
pragma Implementation_Defined;
-- Software Generated Interrupts (SGI)
SGI_0 : constant Interrupt_ID := 0; -- Reserved by the runtime
SGI_1 : constant Interrupt_ID := 1;
SGI_2 : constant Interrupt_ID := 2;
SGI_3 : constant Interrupt_ID := 3;
SGI_4 : constant Interrupt_ID := 4;
SGI_5 : constant Interrupt_ID := 5;
SGI_6 : constant Interrupt_ID := 6;
SGI_7 : constant Interrupt_ID := 7;
SGI_8 : constant Interrupt_ID := 8;
SGI_9 : constant Interrupt_ID := 9;
SGI_10 : constant Interrupt_ID := 10;
SGI_11 : constant Interrupt_ID := 11;
SGI_12 : constant Interrupt_ID := 12;
SGI_13 : constant Interrupt_ID := 13;
SGI_14 : constant Interrupt_ID := 14;
SGI_15 : constant Interrupt_ID := 15;
-- Private Peripheral Interrupts (PPI)
Global_Timer_Interrupt : constant Interrupt_ID := 27;
FIQ_Interrupt : constant Interrupt_ID := 28;
CPU_Private_Timer_Interrupt : constant Interrupt_ID := 29;
Private_Watchdog_Interrupt : constant Interrupt_ID := 30;
IRQ_Interrupt : constant Interrupt_ID := 31;
-- PS and PL Shared Peripheral Interrupts
APU_CPU0_Interrupt : constant Interrupt_ID := 32;
APU_CPU1_Interrupt : constant Interrupt_ID := 33;
L2_Cache_Interrupt : constant Interrupt_ID := 34;
OCM_Interrupt : constant Interrupt_ID := 35;
Reserved_36_Interrupt : constant Interrupt_ID := 36;
PMU0_Interrupt : constant Interrupt_ID := 37;
PMU1_Interrupt : constant Interrupt_ID := 38;
XADC_Interrupt : constant Interrupt_ID := 39;
DEVC_Interrupt : constant Interrupt_ID := 40;
SWDT_Interrupt : constant Interrupt_ID := 41;
TTC0_0_Interrupt : constant Interrupt_ID := 42;
TTC0_1_Interrupt : constant Interrupt_ID := 43;
TTC0_2_Interrupt : constant Interrupt_ID := 44;
DMAC_Abort_Interrupt : constant Interrupt_ID := 45;
DMAC_0_Interrupt : constant Interrupt_ID := 46;
DMAC_1_Interrupt : constant Interrupt_ID := 47;
DMAC_2_Interrupt : constant Interrupt_ID := 48;
DMAC_3_Interrupt : constant Interrupt_ID := 49;
SMC_Interrupt : constant Interrupt_ID := 50;
QSPI_Interrupt : constant Interrupt_ID := 51;
GPIO_Interrupt : constant Interrupt_ID := 52;
USB0_Interrupt : constant Interrupt_ID := 53;
ETH0_Interrupt : constant Interrupt_ID := 54;
ETH0_Wake_Up_Interrupt : constant Interrupt_ID := 55;
SDIO0_Interrupt : constant Interrupt_ID := 56;
I2C0_Interrupt : constant Interrupt_ID := 57;
SPI0_Interrupt : constant Interrupt_ID := 58;
UART0_Interrupt : constant Interrupt_ID := 59;
CAN0_Interrupt : constant Interrupt_ID := 60;
PL0_Interrupt : constant Interrupt_ID := 61;
PL1_Interrupt : constant Interrupt_ID := 62;
PL2_Interrupt : constant Interrupt_ID := 63;
PL3_Interrupt : constant Interrupt_ID := 64;
PL4_Interrupt : constant Interrupt_ID := 65;
PL5_Interrupt : constant Interrupt_ID := 66;
PL6_Interrupt : constant Interrupt_ID := 67;
PL7_Interrupt : constant Interrupt_ID := 68;
TTC1_0_Interrupt : constant Interrupt_ID := 69;
TTC1_1_Interrupt : constant Interrupt_ID := 70;
TTC1_2_Interrupt : constant Interrupt_ID := 71;
DMAC_4_Interrupt : constant Interrupt_ID := 72;
DMAC_5_Interrupt : constant Interrupt_ID := 73;
DMAC_6_Interrupt : constant Interrupt_ID := 74;
DMAC_7_Interrupt : constant Interrupt_ID := 75;
USB1_Interrupt : constant Interrupt_ID := 76;
ETH1_Interrupt : constant Interrupt_ID := 77;
ETH1_Wake_Up_Interrupt : constant Interrupt_ID := 78;
SDIO1_Interrupt : constant Interrupt_ID := 79;
I2C1_Interrupt : constant Interrupt_ID := 80;
SPI1_Interrupt : constant Interrupt_ID := 81;
UART1_Interrupt : constant Interrupt_ID := 82;
CAN1_Interrupt : constant Interrupt_ID := 83;
PL8_Interrupt : constant Interrupt_ID := 84;
PL9_Interrupt : constant Interrupt_ID := 85;
PL10_Interrupt : constant Interrupt_ID := 86;
PL11_Interrupt : constant Interrupt_ID := 87;
PL12_Interrupt : constant Interrupt_ID := 88;
PL13_Interrupt : constant Interrupt_ID := 89;
PL14_Interrupt : constant Interrupt_ID := 90;
PL15_Interrupt : constant Interrupt_ID := 91;
SCU_Parity_Interrupt : constant Interrupt_ID := 92;
Reserved_93_Interrupt : constant Interrupt_ID := 93;
Reserved_94_Interrupt : constant Interrupt_ID := 94;
Reserved_95_Interrupt : constant Interrupt_ID := 95;
end Ada.Interrupts.Names;
| 54.807407
| 78
| 0.571158
|
33bc6abd6e26d4ef49479d7204f3a18610ca6391
| 2,328
|
adb
|
Ada
|
rp2040_elf2uf2/src/rp2040_elf2uf2.adb
|
NicoPy/Ada_RP2040_ELF2UF2
|
5186bcad1af34c6800484727c1a972e0078ad9c8
|
[
"BSD-3-Clause"
] | null | null | null |
rp2040_elf2uf2/src/rp2040_elf2uf2.adb
|
NicoPy/Ada_RP2040_ELF2UF2
|
5186bcad1af34c6800484727c1a972e0078ad9c8
|
[
"BSD-3-Clause"
] | null | null | null |
rp2040_elf2uf2/src/rp2040_elf2uf2.adb
|
NicoPy/Ada_RP2040_ELF2UF2
|
5186bcad1af34c6800484727c1a972e0078ad9c8
|
[
"BSD-3-Clause"
] | null | null | null |
--
-- Copyright 2022 (C) Nicolas Pinault (aka DrPi)
--
-- SPDX-License-Identifier: BSD-3-Clause
--
--
-- Converts an ELF file to a UF2 formated file.
--
-- UF2 files are accepted by RP2040 micro_controllers
-- in BOOTSEL mode for FLASH programming.
--
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Command_Line; use Ada.Command_Line;
with Ada.Streams.Stream_IO;
with elf2uf2;
with Errors;
procedure Rp2040_Elf2uf2 is
package SIO renames Ada.Streams.Stream_IO;
function usage return Exit_Status is
begin
Put_Line ("Usage: elf2uf2 (-v) <input ELF file> <output UF2 file>");
return Errors.ARGS;
end usage;
Arg : Natural := 0;
begin
if (Argument_Count < 2) or (Argument_Count > 3) then
Set_Exit_Status (Usage);
return;
end if;
if Argument_Count = 3 then
Arg := 2;
if (Argument(1) = "-v") then
elf2uf2.Set_Verbosity(1);
elsif (Argument(1) = "-vv") then
elf2uf2.Set_Verbosity(2);
else
Set_Exit_Status (Usage);
return;
end if;
else
Arg := 1;
end if;
declare
In_Filename : constant String := Argument(Arg);
Out_Filename : constant String := Argument(Arg+1);
In_File : SIO.File_Type;
Out_File : SIO.File_Type;
begin
declare
begin
SIO.Open (File => In_File, Mode => SIO.In_File, Name => In_Filename);
exception
when Name_Error =>
Put_Line ("Input File does not exist.");
Set_Exit_Status (Errors.ARGS);
return;
when others =>
Put_Line ("Error while opening input file.");
Set_Exit_Status (Errors.ARGS);
return;
end;
declare
begin
SIO.Create (File => Out_File, Mode => SIO.Out_File, Name => Out_Filename);
exception
when others =>
Put_Line ("Error while creating Output file.");
Set_Exit_Status (Errors.ARGS);
return;
end;
declare
Ret_Code : Exit_Status;
begin
Ret_Code := elf2uf2.Run(In_File, Out_File);
SIO.Close(In_File);
SIO.Close(Out_File);
if Ret_Code /= Errors.NO_ERROR then
SIO.Delete (Out_File);
end if;
Set_Exit_Status (Ret_Code);
end;
end;
end Rp2040_Elf2uf2;
| 25.032258
| 83
| 0.591924
|
9670439ca78ee0762032de3521567b0a293b5d69
| 2,033
|
adb
|
Ada
|
orka/src/orka/windows/orka-os.adb
|
onox/orka
|
9edf99559a16ffa96dfdb208322f4d18efbcbac6
|
[
"Apache-2.0"
] | 52
|
2016-07-30T23:00:28.000Z
|
2022-02-05T11:54:55.000Z
|
orka/src/orka/windows/orka-os.adb
|
onox/orka
|
9edf99559a16ffa96dfdb208322f4d18efbcbac6
|
[
"Apache-2.0"
] | 79
|
2016-08-01T18:36:48.000Z
|
2022-02-27T12:14:20.000Z
|
orka/src/orka/windows/orka-os.adb
|
onox/orka
|
9edf99559a16ffa96dfdb208322f4d18efbcbac6
|
[
"Apache-2.0"
] | 4
|
2018-04-28T22:36:26.000Z
|
2020-11-14T23:00:29.000Z
|
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2017 onox <denkpadje@gmail.com>
--
-- 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.
with System;
with Ada.Characters.Latin_1;
package body Orka.OS is
procedure Set_Task_Name (Name : in String) is
begin
null;
end Set_Task_Name;
function Monotonic_Clock return Duration is
begin
raise Program_Error with "BUG: Monotonic_Clock not implemented yet on Windows";
return 0.0;
end Monotonic_Clock;
function Monotonic_Clock return Time is (Time (Duration'(Monotonic_Clock)));
----------------------------------------------------------------------------
subtype Size_Type is Interfaces.C.unsigned_long;
procedure C_Fwrite
(Value : String;
Size : Size_Type;
Count : Size_Type;
File : System.Address)
with Import, Convention => C, External_Name => "fwrite";
File_Standard_Output : constant System.Address
with Import, Convention => C, External_Name => "stdout";
File_Standard_Error : constant System.Address
with Import, Convention => C, External_Name => "stderr";
procedure Put_Line (Value : String; Kind : File_Kind := Standard_Output) is
package L1 renames Ada.Characters.Latin_1;
C_Value : constant String := Value & L1.LF;
begin
C_Fwrite (C_Value, 1, C_Value'Length,
(case Kind is
when Standard_Output => File_Standard_Output,
when Standard_Error => File_Standard_Error));
end Put_Line;
end Orka.OS;
| 31.276923
| 85
| 0.674373
|
dac14b42fa14a88aec0e7d3cfc210bc5d59f2ed4
| 1,049
|
adb
|
Ada
|
attic/asis/find_all/adam-assist-query-find_all-element_processing.adb
|
charlie5/aIDE
|
fab406dbcd9b72a4cb215ffebb05166c788d6365
|
[
"MIT"
] | 3
|
2017-04-29T14:25:22.000Z
|
2017-09-29T10:15:28.000Z
|
attic/asis/find_all/adam-assist-query-find_all-element_processing.adb
|
charlie5/aIDE
|
fab406dbcd9b72a4cb215ffebb05166c788d6365
|
[
"MIT"
] | null | null | null |
attic/asis/find_all/adam-assist-query-find_all-element_processing.adb
|
charlie5/aIDE
|
fab406dbcd9b72a4cb215ffebb05166c788d6365
|
[
"MIT"
] | null | null | null |
with
Asis.Iterator,
AdaM.Assist.Query.find_All.Actuals_for_traversing;
package body AdaM.Assist.Query.find_All.element_Processing
is
procedure Recursive_Construct_Processing is new
Asis.Iterator.Traverse_Element
(State_Information => AdaM.Assist.Query.find_All.Actuals_for_traversing.Traversal_State,
Pre_Operation => AdaM.Assist.Query.find_All.Actuals_for_traversing.Pre_Op,
Post_Operation => AdaM.Assist.Query.find_All.Actuals_for_traversing.Post_Op);
procedure Process_Construct (The_Element : Asis.Element)
is
Process_Control : Asis.Traverse_Control := Asis.Continue;
Process_State : AdaM.Assist.Query.find_All.Actuals_for_traversing.Traversal_State
:= AdaM.Assist.Query.find_All.Actuals_for_traversing.Initial_Traversal_State;
begin
Recursive_Construct_Processing
(Element => The_Element,
Control => Process_Control,
State => Process_State);
end Process_Construct;
end AdaM.Assist.Query.find_All.element_Processing;
| 33.83871
| 96
| 0.752145
|
22a0b303722e9f32eaa6fbf0d9763efbc7376305
| 488
|
ads
|
Ada
|
src/skill-iterators.ads
|
skill-lang/adaCommon
|
b27bccb8fa1c8b299ab98a82741a648183e41d3c
|
[
"BSD-3-Clause"
] | null | null | null |
src/skill-iterators.ads
|
skill-lang/adaCommon
|
b27bccb8fa1c8b299ab98a82741a648183e41d3c
|
[
"BSD-3-Clause"
] | null | null | null |
src/skill-iterators.ads
|
skill-lang/adaCommon
|
b27bccb8fa1c8b299ab98a82741a648183e41d3c
|
[
"BSD-3-Clause"
] | null | null | null |
-- ___ _ ___ _ _ --
-- / __| |/ (_) | | Common SKilL implementation --
-- \__ \ ' <| | | |__ top level iterator package --
-- |___/_|\_\_|_|____| by: Timm Felden --
-- --
pragma Ada_2012;
package Skill.Iterators is
pragma Pure;
end Skill.Iterators;
| 40.666667
| 80
| 0.309426
|
542c40dfcce3349ea19a4c6d448874d0837803aa
| 6,086
|
adb
|
Ada
|
3-mid/impact/source/3d/collision/shapes/impact-d3-shape.adb
|
charlie5/lace
|
e9b7dc751d500ff3f559617a6fc3089ace9dc134
|
[
"0BSD"
] | 20
|
2015-11-04T09:23:59.000Z
|
2022-01-14T10:21:42.000Z
|
3-mid/impact/source/3d/collision/shapes/impact-d3-shape.adb
|
charlie5/lace
|
e9b7dc751d500ff3f559617a6fc3089ace9dc134
|
[
"0BSD"
] | 2
|
2015-11-04T17:05:56.000Z
|
2015-12-08T03:16:13.000Z
|
3-mid/impact/source/3d/collision/shapes/impact-d3-shape.adb
|
charlie5/lace
|
e9b7dc751d500ff3f559617a6fc3089ace9dc134
|
[
"0BSD"
] | 1
|
2015-12-07T12:53:52.000Z
|
2015-12-07T12:53:52.000Z
|
with
impact.d3.Transform,
impact.d3.Vector;
package body impact.d3.Shape
is
function isConvex (Self : in Item'Class) return Boolean
is
begin
return impact.d3.collision.Proxy.isConvex (Self.getShapeType);
end isConvex;
function getShapeType (Self : in Item) return impact.d3.collision.Proxy.BroadphaseNativeTypes
is
begin
return Self.m_shapeType;
end getShapeType;
procedure setShapeType (Self : in out Item; To : in impact.d3.collision.Proxy.BroadphaseNativeTypes)
is
begin
self.m_shapeType := To;
end setShapeType;
function isPolyhedral (Self : in Item'Class) return Boolean
is
begin
return impact.d3.collision.Proxy.isPolyhedral (Self.getShapeType);
end isPolyhedral;
function isConvex2d (Self : in Item'Class) return Boolean
is
begin
return impact.d3.collision.Proxy.isConvex2d (Self.getShapeType);
end isConvex2d;
function isNonMoving (Self : in Item'Class) return Boolean
is
begin
return impact.d3.collision.Proxy.isNonMoving (Self.getShapeType);
end isNonMoving;
function isConcave (Self : in Item'Class) return Boolean
is
begin
return impact.d3.collision.Proxy.isConcave (Self.getShapeType);
end isConcave;
function isCompound (Self : in Item'Class) return Boolean
is
begin
return impact.d3.collision.Proxy.isCompound (Self.getShapeType);
end isCompound;
function isSoftBody (Self : in Item'Class) return Boolean
is
begin
return impact.d3.collision.Proxy.isSoftBody (Self.getShapeType);
end isSoftBody;
function isInfinite (Self : in Item'Class) return Boolean
is
begin
return impact.d3.collision.Proxy.isInfinite (Self.getShapeType);
end isInfinite;
procedure setUserPointer (Self : in out Item'Class; userPtr : access Any'Class)
is
begin
Self.m_userPointer := userPtr;
end setUserPointer;
function getUserPointer (Self : in Item'Class) return access Any'Class
is
begin
return Self.m_userPointer;
end getUserPointer;
-- Make sure this dummy function never changes so that it
-- can be used by probes that are checking whether the
-- library is actually installed.
--
procedure btBulletCollisionProbe
is
begin
null;
end btBulletCollisionProbe;
procedure getBoundingSphere (Self : in Item'Class; center : out math.Vector_3;
radius : out math.Real)
is
use impact.d3.Vector, math.Vectors;
tr : constant Transform_3d := impact.d3.Transform.getIdentity;
aabbMin,
aabbMax : math.Vector_3;
begin
Self.getAabb (tr, aabbMin, aabbMax);
radius := length (aabbMax - aabbMin) * 0.5;
center := (aabbMin + aabbMax) * 0.5;
end getBoundingSphere;
function getAngularMotionDisc (Self : in Item) return math.Real
is
use impact.d3.Vector;
-- todo: cache this value, to improve performance
center : math.Vector_3;
disc : math.Real;
begin
Self.getBoundingSphere (center, disc);
disc := disc + length (center);
return disc;
end getAngularMotionDisc;
function getContactBreakingThreshold (Self : in Item; defaultContactThresholdFactor : in math.Real) return math.Real
is
begin
return Self.getAngularMotionDisc * defaultContactThresholdFactor;
end getContactBreakingThreshold;
procedure calculateTemporalAabb (Self : in Item'Class; curTrans : in Transform_3d;
linvel : in math.Vector_3;
angvel : in math.Vector_3;
timeStep : in math.Real;
temporalAabbMin,
temporalAabbMax : out math.Vector_3)
is
begin
-- start with static aabb
Self.getAabb (curTrans, temporalAabbMin, temporalAabbMax);
declare
use impact.d3.Vector, math.Vectors;
temporalAabbMaxx : math.Real := temporalAabbMax (1);
temporalAabbMaxy : math.Real := temporalAabbMax (2);
temporalAabbMaxz : math.Real := temporalAabbMax (3);
temporalAabbMinx : math.Real := temporalAabbMin (1);
temporalAabbMiny : math.Real := temporalAabbMin (2);
temporalAabbMinz : math.Real := temporalAabbMin (3);
linMotion : math.Vector_3 := linvel * timeStep; -- add linear motion
angularMotion : math.Real;
angularMotion3d : math.Vector_3;
begin
-- todo: simd would have a vector max/min operation, instead of per-element access
if linMotion (1) > 0.0 then
temporalAabbMaxx := temporalAabbMaxx + linMotion (1);
else
temporalAabbMinx := temporalAabbMinx + linMotion (1);
end if;
if linMotion (2) > 0.0 then
temporalAabbMaxy := temporalAabbMaxy + linMotion (2);
else
temporalAabbMiny := temporalAabbMiny + linMotion (2);
end if;
if linMotion (3) > 0.0 then
temporalAabbMaxz := temporalAabbMaxz + linMotion (3);
else
temporalAabbMinz := temporalAabbMinz + linMotion (3);
end if;
-- add conservative angular motion
--
angularMotion := length (angvel) * Self.getAngularMotionDisc * timeStep;
angularMotion3d := (angularMotion, angularMotion, angularMotion);
temporalAabbMin := (temporalAabbMinx, temporalAabbMiny, temporalAabbMinz);
temporalAabbMax := (temporalAabbMaxx, temporalAabbMaxy, temporalAabbMaxz);
temporalAabbMin := temporalAabbMin - angularMotion3d;
temporalAabbMax := temporalAabbMax + angularMotion3d;
end;
end calculateTemporalAabb;
end impact.d3.Shape;
| 24.055336
| 121
| 0.621755
|
f2ff531b87a3097fadc427423bfd8b0e9fa1845e
| 13,359
|
adb
|
Ada
|
src/bases-trade.adb
|
thindil/steamsky
|
d5d7fea622f7994c91017c4cd7ba5e188153556c
|
[
"TCL",
"MIT"
] | 80
|
2017-04-08T23:14:07.000Z
|
2022-02-10T22:30:51.000Z
|
src/bases-trade.adb
|
thindil/steamsky
|
d5d7fea622f7994c91017c4cd7ba5e188153556c
|
[
"TCL",
"MIT"
] | 89
|
2017-06-24T08:18:26.000Z
|
2021-11-12T04:37:36.000Z
|
src/bases-trade.adb
|
thindil/steamsky
|
d5d7fea622f7994c91017c4cd7ba5e188153556c
|
[
"TCL",
"MIT"
] | 9
|
2018-04-14T16:37:25.000Z
|
2020-03-21T14:33:49.000Z
|
-- Copyright 2017-2021 Bartek thindil Jasicki
--
-- This file is part of Steam Sky.
--
-- Steam Sky is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- Steam Sky is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with Steam Sky. If not, see <http://www.gnu.org/licenses/>.
with Messages; use Messages;
with Ships.Cargo; use Ships.Cargo;
with Ships.Crew; use Ships.Crew;
with Crafts; use Crafts;
with Trades; use Trades;
with Utils; use Utils;
with Bases.Cargo; use Bases.Cargo;
with Config; use Config;
with BasesTypes; use BasesTypes;
with Maps; use Maps;
package body Bases.Trade is
-- ****if* BTrade/BTrade.CheckMoney
-- FUNCTION
-- Check if player have enough money
-- PARAMETERS
-- Price - Miniumum amount of money which player must have
-- Message - Additional message to return when player don't have enough
-- money
-- RESULT
-- Cargo index of money from the player ship
-- SOURCE
function CheckMoney
(Price: Positive; Message: String := "") return Positive is
-- ****
MoneyIndex2: constant Natural :=
FindItem(Player_Ship.Cargo, Money_Index);
begin
if MoneyIndex2 = 0 then
if Message /= "" then
raise Trade_No_Money with Message;
else
raise Trade_No_Money;
end if;
end if;
if Player_Ship.Cargo(MoneyIndex2).Amount < Price then
if Message /= "" then
raise Trade_Not_Enough_Money with Message;
else
raise Trade_Not_Enough_Money;
end if;
end if;
return MoneyIndex2;
end CheckMoney;
procedure HireRecruit
(RecruitIndex: Recruit_Container.Extended_Index; Cost: Positive;
DailyPayment, TradePayment: Natural; ContractLenght: Integer) is
BaseIndex: constant Bases_Range :=
SkyMap(Player_Ship.Sky_X, Player_Ship.Sky_Y).BaseIndex;
MoneyIndex2: Inventory_Container.Extended_Index;
Price: Natural;
Recruit: constant Recruit_Data :=
Sky_Bases(BaseIndex).Recruits(RecruitIndex);
Morale: Skill_Range;
Inventory: Inventory_Container.Vector;
TraderIndex: constant Crew_Container.Extended_Index := FindMember(Talk);
begin
if TraderIndex = 0 then
raise Trade_No_Trader;
end if;
Price := Cost;
Count_Price(Price, TraderIndex);
MoneyIndex2 := CheckMoney(Price, To_String(Recruit.Name));
Add_Recruit_Inventory_Loop :
for Item of Recruit.Inventory loop
Inventory.Append
(New_Item =>
(ProtoIndex => Item, Amount => 1, Name => Null_Unbounded_String,
Durability => Default_Item_Durability, Price => 0));
end loop Add_Recruit_Inventory_Loop;
if Factions_List(Sky_Bases(BaseIndex).Owner).Flags.Contains
(To_Unbounded_String("nomorale")) then
Morale := 50;
else
Morale :=
(if 50 + Sky_Bases(BaseIndex).Reputation(1) > 100 then 100
else 50 + Sky_Bases(BaseIndex).Reputation(1));
end if;
Player_Ship.Crew.Append
(New_Item =>
(Amount_Of_Attributes => Attributes_Amount,
Amount_Of_Skills => Skills_Amount, Name => Recruit.Name,
Gender => Recruit.Gender, Health => 100, Tired => 0,
Skills => Recruit.Skills, Hunger => 0, Thirst => 0, Order => Rest,
PreviousOrder => Rest, OrderTime => 15, Orders => (others => 0),
Attributes => Recruit.Attributes, Inventory => Inventory,
Equipment => Recruit.Equipment,
Payment => (DailyPayment, TradePayment),
ContractLength => ContractLenght, Morale => (Morale, 0),
Loyalty => Morale, HomeBase => Recruit.Home_Base,
Faction => Recruit.Faction));
UpdateCargo
(Ship => Player_Ship, CargoIndex => MoneyIndex2, Amount => -(Price));
GainExp(1, Talking_Skill, TraderIndex);
Gain_Rep(BaseIndex, 1);
AddMessage
("You hired " & To_String(Recruit.Name) & " for" &
Positive'Image(Price) & " " & To_String(Money_Name) & ".",
TradeMessage);
Sky_Bases(BaseIndex).Recruits.Delete(Index => RecruitIndex);
Sky_Bases(BaseIndex).Population := Sky_Bases(BaseIndex).Population - 1;
Update_Game(5);
end HireRecruit;
procedure BuyRecipe(RecipeIndex: Unbounded_String) is
BaseIndex: constant Bases_Range :=
SkyMap(Player_Ship.Sky_X, Player_Ship.Sky_Y).BaseIndex;
MoneyIndex2: Inventory_Container.Extended_Index;
Cost: Natural;
RecipeName: constant String :=
To_String(Items_List(Recipes_List(RecipeIndex).ResultIndex).Name);
BaseType: constant Unbounded_String := Sky_Bases(BaseIndex).Base_Type;
TraderIndex: constant Crew_Container.Extended_Index := FindMember(Talk);
begin
if not Bases_Types_List(BaseType).Recipes.Contains(RecipeIndex) then
raise Trade_Cant_Buy;
end if;
if Known_Recipes.Find_Index(Item => RecipeIndex) /=
Positive_Container.No_Index then
raise Trade_Already_Known;
end if;
if TraderIndex = 0 then
raise Trade_No_Trader;
end if;
if Get_Price
(Sky_Bases(BaseIndex).Base_Type,
Recipes_List(RecipeIndex).ResultIndex) >
0 then
Cost :=
Get_Price
(Sky_Bases(BaseIndex).Base_Type,
Recipes_List(RecipeIndex).ResultIndex) *
Recipes_List(RecipeIndex).Difficulty * 10;
else
Cost := Recipes_List(RecipeIndex).Difficulty * 10;
end if;
Cost := Natural(Float(Cost) * Float(New_Game_Settings.Prices_Bonus));
if Cost = 0 then
Cost := 1;
end if;
Count_Price(Cost, TraderIndex);
MoneyIndex2 := CheckMoney(Cost, RecipeName);
UpdateCargo
(Ship => Player_Ship, CargoIndex => MoneyIndex2, Amount => -(Cost));
Update_Base_Cargo(Money_Index, Cost);
Known_Recipes.Append(New_Item => RecipeIndex);
AddMessage
("You bought the recipe for " & RecipeName & " for" &
Positive'Image(Cost) & " of " & To_String(Money_Name) & ".",
TradeMessage);
GainExp(1, Talking_Skill, TraderIndex);
Gain_Rep(BaseIndex, 1);
Update_Game(5);
end BuyRecipe;
procedure HealWounded(MemberIndex: Crew_Container.Extended_Index) is
BaseIndex: constant Bases_Range :=
SkyMap(Player_Ship.Sky_X, Player_Ship.Sky_Y).BaseIndex;
MoneyIndex2: Inventory_Container.Extended_Index := 0;
Cost, Time: Natural := 0;
TraderIndex: constant Crew_Container.Extended_Index := FindMember(Talk);
begin
HealCost(Cost, Time, MemberIndex);
if Cost = 0 then
raise Trade_Cant_Heal;
end if;
if TraderIndex = 0 then
raise Trade_No_Trader;
end if;
MoneyIndex2 := CheckMoney(Cost);
if MemberIndex > 0 then
Player_Ship.Crew(MemberIndex).Health := 100;
AddMessage
("You paid for healing " &
To_String(Player_Ship.Crew(MemberIndex).Name) & " for" &
Positive'Image(Cost) & " " & To_String(Money_Name) & ".",
TradeMessage);
GiveOrders(Player_Ship, MemberIndex, Rest, 0, False);
else
Give_Rest_Order_Loop :
for I in Player_Ship.Crew.Iterate loop
if Player_Ship.Crew(I).Health < 100 then
Player_Ship.Crew(I).Health := 100;
GiveOrders
(Player_Ship, Crew_Container.To_Index(I), Rest, 0, False);
end if;
end loop Give_Rest_Order_Loop;
AddMessage
("You paid for healing for all wounded crew members for" &
Positive'Image(Cost) & " " & To_String(Money_Name) & ".",
TradeMessage);
end if;
UpdateCargo
(Ship => Player_Ship, CargoIndex => MoneyIndex2, Amount => -(Cost));
Update_Base_Cargo(Money_Index, Cost);
GainExp(1, Talking_Skill, TraderIndex);
Gain_Rep(BaseIndex, 1);
Update_Game(Time);
end HealWounded;
procedure HealCost
(Cost, Time: in out Natural;
MemberIndex: Crew_Container.Extended_Index) is
BaseIndex: constant Bases_Range :=
SkyMap(Player_Ship.Sky_X, Player_Ship.Sky_Y).BaseIndex;
begin
if MemberIndex > 0 then
Time := 5 * (100 - Player_Ship.Crew(MemberIndex).Health);
Cost :=
(5 * (100 - Player_Ship.Crew(MemberIndex).Health)) *
Get_Price
(To_Unbounded_String("0"),
FindProtoItem
(ItemType =>
Factions_List(Player_Ship.Crew(MemberIndex).Faction)
.HealingTools));
else
Count_Heal_Cost_Loop :
for Member of Player_Ship.Crew loop
if Member.Health < 100 then
Time := Time + (5 * (100 - Member.Health));
Cost :=
Cost +
((5 * (100 - Member.Health)) *
Items_List
(FindProtoItem
(ItemType =>
Factions_List(Member.Faction).HealingTools))
.Price);
end if;
end loop Count_Heal_Cost_Loop;
end if;
Cost := Natural(Float(Cost) * Float(New_Game_Settings.Prices_Bonus));
if Cost = 0 then
Cost := 1;
end if;
Count_Price(Cost, FindMember(Talk));
if Time = 0 then
Time := 1;
end if;
if Bases_Types_List(Sky_Bases(BaseIndex).Base_Type).Flags.Contains
(To_Unbounded_String("temple")) then
Cost := Cost / 2;
if Cost = 0 then
Cost := 1;
end if;
end if;
end HealCost;
function TrainCost
(MemberIndex: Crew_Container.Extended_Index;
SkillIndex: Skills_Container.Extended_Index) return Natural is
Cost: Natural := Natural(100.0 * New_Game_Settings.Prices_Bonus);
begin
Count_Train_Cost_Loop :
for Skill of Player_Ship.Crew(MemberIndex).Skills loop
if Skill.Index = SkillIndex then
if Skill.Level = 100 then
return 0;
end if;
Cost :=
Natural
(Float((Skill.Level + 1) * 100) *
Float(New_Game_Settings.Prices_Bonus));
if Cost = 0 then
Cost := 1;
end if;
exit Count_Train_Cost_Loop;
end if;
end loop Count_Train_Cost_Loop;
Count_Price(Cost, FindMember(Talk));
return Cost;
end TrainCost;
procedure TrainSkill
(MemberIndex: Crew_Container.Extended_Index;
SkillIndex: Skills_Container.Extended_Index; Amount: Positive;
Is_Amount: Boolean := True) is
use Tiny_String;
Cost: Natural;
MoneyIndex2: Inventory_Container.Extended_Index;
GainedExp: Positive;
BaseIndex: constant Bases_Range :=
SkyMap(Player_Ship.Sky_X, Player_Ship.Sky_Y).BaseIndex;
TraderIndex: Crew_Container.Extended_Index;
Sessions, OverallCost: Natural := 0;
MaxAmount: Integer := Amount;
begin
GiveOrders(Player_Ship, MemberIndex, Rest, 0, False);
Train_Skill_Loop :
while MaxAmount > 0 loop
Cost := TrainCost(MemberIndex, SkillIndex);
MoneyIndex2 := FindItem(Player_Ship.Cargo, Money_Index);
exit Train_Skill_Loop when Cost = 0 or
Player_Ship.Cargo(MoneyIndex2).Amount < Cost or
(not Is_Amount and MaxAmount < Cost);
GainedExp :=
Get_Random(10, 60) +
Player_Ship.Crew(MemberIndex).Attributes
(Positive
(SkillsData_Container.Element(Skills_List, SkillIndex)
.Attribute))
.Level;
if GainedExp > 100 then
GainedExp := 100;
end if;
GainExp(GainedExp, SkillIndex, MemberIndex);
UpdateCargo
(Ship => Player_Ship, CargoIndex => MoneyIndex2, Amount => -(Cost));
Update_Base_Cargo(Money_Index, Cost);
TraderIndex := FindMember(Talk);
if TraderIndex > 0 then
GainExp(5, Talking_Skill, TraderIndex);
end if;
Gain_Rep(BaseIndex, 5);
Update_Game(60);
Sessions := Sessions + 1;
OverallCost := OverallCost + Cost;
MaxAmount := MaxAmount - (if Is_Amount then 1 else Cost);
end loop Train_Skill_Loop;
if Sessions > 0 then
AddMessage
("You purchased" & Positive'Image(Sessions) &
" training session(s) in " &
To_String
(SkillsData_Container.Element(Skills_List, SkillIndex).Name) &
" for " & To_String(Player_Ship.Crew(MemberIndex).Name) & " for" &
Positive'Image(OverallCost) & " " & To_String(Money_Name) & ".",
TradeMessage);
end if;
end TrainSkill;
end Bases.Trade;
| 37.737288
| 79
| 0.614043
|
6460a5cce59499168de2c89b8287633fbbbb038b
| 6,154
|
ads
|
Ada
|
src/gen/gstreamer-gst_low_level-gstreamer_0_10_gst_gsttypefind_h.ads
|
persan/A-gst
|
7a39693d105617adea52680424c862a1a08f7368
|
[
"Apache-2.0"
] | 1
|
2018-01-18T00:51:00.000Z
|
2018-01-18T00:51:00.000Z
|
src/gen/gstreamer-gst_low_level-gstreamer_0_10_gst_gsttypefind_h.ads
|
persan/A-gst
|
7a39693d105617adea52680424c862a1a08f7368
|
[
"Apache-2.0"
] | null | null | null |
src/gen/gstreamer-gst_low_level-gstreamer_0_10_gst_gsttypefind_h.ads
|
persan/A-gst
|
7a39693d105617adea52680424c862a1a08f7368
|
[
"Apache-2.0"
] | null | null | null |
pragma Ada_2005;
pragma Style_Checks (Off);
pragma Warnings (Off);
with Interfaces.C; use Interfaces.C;
with glib;
with glib.Values;
with System;
with GLIB; -- with GStreamer.GST_Low_Level.glibconfig_h;
limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstcaps_h;
with glib;
with Interfaces.C.Strings;
limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstplugin_h;
with System;
package GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttypefind_h is
-- unsupported macro: GST_TYPE_TYPE_FIND (gst_type_find_get_type())
-- GStreamer
-- * Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
-- *
-- * gsttypefind.h: typefinding subsystem
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Library General Public
-- * License as published by the Free Software Foundation; either
-- * version 2 of the License, or (at your option) any later version.
-- *
-- * This library is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- * Library General Public License for more details.
-- *
-- * You should have received a copy of the GNU Library General Public
-- * License along with this library; if not, write to the
-- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-- * Boston, MA 02111-1307, USA.
--
type GstTypeFind;
type u_GstTypeFind_u_gst_reserved_array is array (0 .. 3) of System.Address;
--subtype GstTypeFind is u_GstTypeFind; -- gst/gsttypefind.h:34
--*
-- * GstTypeFindFunction:
-- * @find: A #GstTypeFind structure
-- * @data: optionnal data to pass to the function
-- *
-- * A function that will be called by typefinding.
--
type GstTypeFindFunction is access procedure (arg1 : access GstTypeFind; arg2 : System.Address);
pragma Convention (C, GstTypeFindFunction); -- gst/gsttypefind.h:43
--*
-- * GstTypeFindProbability:
-- * @GST_TYPE_FIND_NONE: type undetected. Since 0.10.36.
-- * @GST_TYPE_FIND_MINIMUM: unlikely typefind.
-- * @GST_TYPE_FIND_POSSIBLE: possible type detected.
-- * @GST_TYPE_FIND_LIKELY: likely a type was detected.
-- * @GST_TYPE_FIND_NEARLY_CERTAIN: nearly certain that a type was detected.
-- * @GST_TYPE_FIND_MAXIMUM: very certain a type was detected.
-- *
-- * The probability of the typefind function. Higher values have more certainty
-- * in doing a reliable typefind.
--
subtype GstTypeFindProbability is unsigned;
GST_TYPE_FIND_NONE : constant GstTypeFindProbability := 0;
GST_TYPE_FIND_MINIMUM : constant GstTypeFindProbability := 1;
GST_TYPE_FIND_POSSIBLE : constant GstTypeFindProbability := 50;
GST_TYPE_FIND_LIKELY : constant GstTypeFindProbability := 80;
GST_TYPE_FIND_NEARLY_CERTAIN : constant GstTypeFindProbability := 99;
GST_TYPE_FIND_MAXIMUM : constant GstTypeFindProbability := 100; -- gst/gsttypefind.h:64
--*
-- * GstTypeFind:
-- * @peek: Method to peek data.
-- * @suggest: Method to suggest #GstCaps with a given probability.
-- * @data: The data used by the caller of the typefinding function.
-- * @get_length: Returns the length of current data.
-- *
-- * Object that stores typefind callbacks. To use with #GstTypeFindFactory.
--
-- private to the caller of the typefind function
type GstTypeFind is record
peek : access function
(arg1 : System.Address;
arg2 : GLIB.gint64;
arg3 : GLIB.guint) return access GLIB.guint8; -- gst/gsttypefind.h:79
suggest : access procedure
(arg1 : System.Address;
arg2 : GLIB.guint;
arg3 : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstcaps_h.GstCaps); -- gst/gsttypefind.h:83
data : System.Address; -- gst/gsttypefind.h:85
get_length : access function (arg1 : System.Address) return GLIB.guint64; -- gst/gsttypefind.h:88
u_gst_reserved : u_GstTypeFind_u_gst_reserved_array; -- gst/gsttypefind.h:91
end record;
pragma Convention (C_Pass_By_Copy, GstTypeFind); -- gst/gsttypefind.h:75
-- optional
-- <private>
function gst_type_find_get_type return GLIB.GType; -- gst/gsttypefind.h:94
pragma Import (C, gst_type_find_get_type, "gst_type_find_get_type");
-- typefind function interface
function gst_type_find_peek
(find : access GstTypeFind;
offset : GLIB.gint64;
size : GLIB.guint) return access GLIB.guint8; -- gst/gsttypefind.h:97
pragma Import (C, gst_type_find_peek, "gst_type_find_peek");
procedure gst_type_find_suggest
(find : access GstTypeFind;
probability : GLIB.guint;
caps : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstcaps_h.GstCaps); -- gst/gsttypefind.h:101
pragma Import (C, gst_type_find_suggest, "gst_type_find_suggest");
procedure gst_type_find_suggest_simple
(find : access GstTypeFind;
probability : GLIB.guint;
media_type : Interfaces.C.Strings.chars_ptr;
fieldname : Interfaces.C.Strings.chars_ptr -- , ...
); -- gst/gsttypefind.h:105
pragma Import (C, gst_type_find_suggest_simple, "gst_type_find_suggest_simple");
function gst_type_find_get_length (find : access GstTypeFind) return GLIB.guint64; -- gst/gsttypefind.h:110
pragma Import (C, gst_type_find_get_length, "gst_type_find_get_length");
-- registration interface
function gst_type_find_register
(plugin : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstplugin_h.GstPlugin;
name : access GLIB.gchar;
rank : GLIB.guint;
func : GstTypeFindFunction;
extensions : System.Address;
possible_caps : access constant GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstcaps_h.GstCaps;
data : System.Address;
data_notify : GStreamer.GST_Low_Level.glib_2_0_glib_gtypes_h.GDestroyNotify) return GLIB.gboolean; -- gst/gsttypefind.h:113
pragma Import (C, gst_type_find_register, "gst_type_find_register");
end GStreamer.GST_Low_Level.gstreamer_0_10_gst_gsttypefind_h;
| 42.736111
| 130
| 0.724244
|
1f785c8dad19aa9b74358843db7bb0531893276e
| 1,279
|
ads
|
Ada
|
src/adacar.ads
|
Asier98/AdaCar
|
1faaed09842c0c3573f359f049f559d97ccfe454
|
[
"MIT"
] | null | null | null |
src/adacar.ads
|
Asier98/AdaCar
|
1faaed09842c0c3573f359f049f559d97ccfe454
|
[
"MIT"
] | null | null | null |
src/adacar.ads
|
Asier98/AdaCar
|
1faaed09842c0c3573f359f049f559d97ccfe454
|
[
"MIT"
] | null | null | null |
with STM32.GPIO;
with Pins_STM32F446; use Pins_STM32F446;
with Ada.Real_Time; use type Ada.Real_Time.Time; use Ada;
package AdaCar is
--------------
-- Unidades --
--------------
type Unidades_AI is new Integer range 0..4095;
type Estado_Digital is new Integer range 0..1;
type Unidades_Distancia is new Float range 0.0..Float'Last;
-----------
-- Motor --
-----------
type Tipo_Motor is (Motor_Derecho,Motor_Izquierdo,Ambos_Motores);
type Tipo_Step is new Integer; -- Definir pasos en el rango de los pasos del motor
type Tipo_Direccion is (Hacia_Delante,Hacia_Detras);
-------------
-- Alarmas --
-------------
type Tipo_Alarmas is (Alarma_1,Alarma_2); -- Se definen las posibles alarmas
type Estado_Alarma is (Desactivada,Activada);
-------------
-- Canales --
-------------
subtype Canal_DI is STM32.GPIO.GPIO_Point;
subtype Canal_DO is STM32.GPIO.GPIO_Point;
subtype Canal_AI is STM32.GPIO.GPIO_Point;
-----------------
-- Operaciones --
-----------------
function "*" (A: Unidades_AI; Distancia: Unidades_Distancia) return Unidades_Distancia;
function "*" (Distancia: Unidades_Distancia; D: Duration) return Unidades_Distancia;
end AdaCar;
| 27.212766
| 90
| 0.616888
|
f8cb3e0ec2af69f61e141ba59967f61ab4a08869
| 1,352
|
adb
|
Ada
|
stm32f1/drivers/stm32gd-drivers-cdc.adb
|
ekoeppen/STM32_Generic_Ada_Drivers
|
4ff29c3026c4b24280baf22a5b81ea9969375466
|
[
"MIT"
] | 1
|
2021-04-06T07:57:56.000Z
|
2021-04-06T07:57:56.000Z
|
stm32f1/drivers/stm32gd-drivers-cdc.adb
|
ekoeppen/STM32_Generic_Ada_Drivers
|
4ff29c3026c4b24280baf22a5b81ea9969375466
|
[
"MIT"
] | null | null | null |
stm32f1/drivers/stm32gd-drivers-cdc.adb
|
ekoeppen/STM32_Generic_Ada_Drivers
|
4ff29c3026c4b24280baf22a5b81ea9969375466
|
[
"MIT"
] | 2
|
2018-05-29T13:59:31.000Z
|
2019-02-03T19:48:08.000Z
|
with STM32_SVD; use STM32_SVD;
with STM32GD.USB; use STM32GD.USB;
with Ada.Text_IO;
package body STM32GD.Drivers.CDC is
-- TODO: Add functions to read/write data from/to the buffer table
-- TODO: Add record types for control transfers
procedure EP0_Setup;
procedure EP0_Out;
procedure EP0_In;
procedure EP0_Setup is
begin
Ada.Text_IO.Put_Line ("EP0_Setup");
end EP0_Setup;
procedure EP0_Out is
begin
Ada.Text_IO.Put_Line ("EP0_Out");
end EP0_Out;
procedure EP0_In is
begin
Ada.Text_IO.Put_Line ("EP0_In");
end EP0_In;
function EP0_Reset (BTable_Offset : Integer) return Integer is
-- TODO: Set address offsets correctly
-- TODO: Return proper offset
begin
USB_Endpoints (0).EP_Type := Control'Enum_Rep;
USB_BTABLE_Descriptors (0) := (
Addr_TX => 0, Count_TX => 0,
Addr_RX => 16#80#, Count_RX => (BL_SIZE => 1, NUM_BLOCKS => 2, COUNTx_RX => 0));
Set_TX_RX_Status (0, TX_Status => Stall, RX_Status => Valid);
return BTable_Offset + 16#40# * 2;
end EP0_Reset;
procedure EP0_Handler (Out_Transaction : Boolean) is
begin
if USB_Endpoints (0).Setup = 1 then
EP0_Setup;
elsif Out_Transaction then
EP0_Out;
else
EP0_In;
end if;
end EP0_Handler;
end STM32GD.Drivers.CDC;
| 25.509434
| 88
| 0.656805
|
d8e681f6486229a785281399be6b9e15bbb06d24
| 15,537
|
ads
|
Ada
|
bb-runtimes/arm/stm32l/stm32l5x2/svd/i-stm32.ads
|
JCGobbi/Nucleo-STM32G474RE
|
8dc1c4948ffeb11841eed10f1c3708f00fa1d832
|
[
"BSD-3-Clause"
] | null | null | null |
bb-runtimes/arm/stm32l/stm32l5x2/svd/i-stm32.ads
|
JCGobbi/Nucleo-STM32G474RE
|
8dc1c4948ffeb11841eed10f1c3708f00fa1d832
|
[
"BSD-3-Clause"
] | null | null | null |
bb-runtimes/arm/stm32l/stm32l5x2/svd/i-stm32.ads
|
JCGobbi/Nucleo-STM32G474RE
|
8dc1c4948ffeb11841eed10f1c3708f00fa1d832
|
[
"BSD-3-Clause"
] | null | null | null |
--
-- Copyright (C) 2021, AdaCore
--
pragma Style_Checks (Off);
-- This spec has been automatically generated from STM32L562.svd
with System;
-- STM32L562
package Interfaces.STM32 is
pragma Preelaborate;
pragma No_Elaboration_Code_All;
---------------
-- Base type --
---------------
type UInt32 is new Interfaces.Unsigned_32;
type UInt16 is new Interfaces.Unsigned_16;
type Byte is new Interfaces.Unsigned_8;
type Bit is mod 2**1
with Size => 1;
type UInt2 is mod 2**2
with Size => 2;
type UInt3 is mod 2**3
with Size => 3;
type UInt4 is mod 2**4
with Size => 4;
type UInt5 is mod 2**5
with Size => 5;
type UInt6 is mod 2**6
with Size => 6;
type UInt7 is mod 2**7
with Size => 7;
type UInt9 is mod 2**9
with Size => 9;
type UInt10 is mod 2**10
with Size => 10;
type UInt11 is mod 2**11
with Size => 11;
type UInt12 is mod 2**12
with Size => 12;
type UInt13 is mod 2**13
with Size => 13;
type UInt14 is mod 2**14
with Size => 14;
type UInt15 is mod 2**15
with Size => 15;
type UInt17 is mod 2**17
with Size => 17;
type UInt18 is mod 2**18
with Size => 18;
type UInt19 is mod 2**19
with Size => 19;
type UInt20 is mod 2**20
with Size => 20;
type UInt21 is mod 2**21
with Size => 21;
type UInt22 is mod 2**22
with Size => 22;
type UInt23 is mod 2**23
with Size => 23;
type UInt24 is mod 2**24
with Size => 24;
type UInt25 is mod 2**25
with Size => 25;
type UInt26 is mod 2**26
with Size => 26;
type UInt27 is mod 2**27
with Size => 27;
type UInt28 is mod 2**28
with Size => 28;
type UInt29 is mod 2**29
with Size => 29;
type UInt30 is mod 2**30
with Size => 30;
type UInt31 is mod 2**31
with Size => 31;
--------------------
-- Base addresses --
--------------------
DFSDM1_Base : constant System.Address := System'To_Address (16#40016000#);
SEC_DFSDM1_Base : constant System.Address := System'To_Address (16#50016000#);
DMAMUX1_Base : constant System.Address := System'To_Address (16#40020800#);
SEC_DMAMUX1_Base : constant System.Address := System'To_Address (16#50020800#);
EXTI_Base : constant System.Address := System'To_Address (16#4002F400#);
SEC_EXTI_Base : constant System.Address := System'To_Address (16#5002F400#);
FLASH_Base : constant System.Address := System'To_Address (16#40022000#);
SEC_FLASH_Base : constant System.Address := System'To_Address (16#50022000#);
GPIOA_Base : constant System.Address := System'To_Address (16#42020000#);
SEC_GPIOA_Base : constant System.Address := System'To_Address (16#52020000#);
GPIOB_Base : constant System.Address := System'To_Address (16#42020400#);
SEC_GPIOB_Base : constant System.Address := System'To_Address (16#52020400#);
GPIOC_Base : constant System.Address := System'To_Address (16#42020800#);
GPIOD_Base : constant System.Address := System'To_Address (16#42020C00#);
GPIOE_Base : constant System.Address := System'To_Address (16#42021000#);
GPIOF_Base : constant System.Address := System'To_Address (16#42021400#);
GPIOG_Base : constant System.Address := System'To_Address (16#42021800#);
SEC_GPIOC_Base : constant System.Address := System'To_Address (16#52020800#);
SEC_GPIOD_Base : constant System.Address := System'To_Address (16#52020C00#);
SEC_GPIOE_Base : constant System.Address := System'To_Address (16#52021000#);
SEC_GPIOF_Base : constant System.Address := System'To_Address (16#52021400#);
SEC_GPIOG_Base : constant System.Address := System'To_Address (16#52021800#);
GPIOH_Base : constant System.Address := System'To_Address (16#42021C00#);
SEC_GPIOH_Base : constant System.Address := System'To_Address (16#52021C00#);
TAMP_Base : constant System.Address := System'To_Address (16#40003400#);
SEC_TAMP_Base : constant System.Address := System'To_Address (16#50003400#);
I2C1_Base : constant System.Address := System'To_Address (16#40005400#);
I2C2_Base : constant System.Address := System'To_Address (16#40005800#);
I2C3_Base : constant System.Address := System'To_Address (16#40005C00#);
I2C4_Base : constant System.Address := System'To_Address (16#40008400#);
SEC_I2C1_Base : constant System.Address := System'To_Address (16#50005400#);
SEC_I2C2_Base : constant System.Address := System'To_Address (16#50005800#);
SEC_I2C3_Base : constant System.Address := System'To_Address (16#50005C00#);
SEC_I2C4_Base : constant System.Address := System'To_Address (16#50008400#);
ICache_Base : constant System.Address := System'To_Address (16#40030400#);
SEC_ICache_Base : constant System.Address := System'To_Address (16#50030400#);
IWDG_Base : constant System.Address := System'To_Address (16#40003000#);
SEC_IWDG_Base : constant System.Address := System'To_Address (16#50003000#);
LPTIM1_Base : constant System.Address := System'To_Address (16#40007C00#);
LPTIM2_Base : constant System.Address := System'To_Address (16#40009400#);
LPTIM3_Base : constant System.Address := System'To_Address (16#40009800#);
SEC_LPTIM1_Base : constant System.Address := System'To_Address (16#50007C00#);
SEC_LPTIM2_Base : constant System.Address := System'To_Address (16#50009400#);
SEC_LPTIM3_Base : constant System.Address := System'To_Address (16#50009800#);
GTZC_MPCBB1_Base : constant System.Address := System'To_Address (16#40032C00#);
GTZC_MPCBB2_Base : constant System.Address := System'To_Address (16#40033000#);
PWR_Base : constant System.Address := System'To_Address (16#40007000#);
SEC_PWR_Base : constant System.Address := System'To_Address (16#50007000#);
RCC_Base : constant System.Address := System'To_Address (16#40021000#);
SEC_RCC_Base : constant System.Address := System'To_Address (16#50021000#);
RTC_Base : constant System.Address := System'To_Address (16#40002800#);
SEC_RTC_Base : constant System.Address := System'To_Address (16#50002800#);
SAI1_Base : constant System.Address := System'To_Address (16#40015400#);
SAI2_Base : constant System.Address := System'To_Address (16#40015800#);
SEC_SAI1_Base : constant System.Address := System'To_Address (16#50015400#);
SEC_SAI2_Base : constant System.Address := System'To_Address (16#50015800#);
DMA1_Base : constant System.Address := System'To_Address (16#40020000#);
SEC_DMA1_Base : constant System.Address := System'To_Address (16#50020000#);
DMA2_Base : constant System.Address := System'To_Address (16#40020400#);
SEC_DMA2_Base : constant System.Address := System'To_Address (16#50020400#);
SEC_GTZC_MPCBB1_Base : constant System.Address := System'To_Address (16#50032C00#);
SEC_GTZC_MPCBB2_Base : constant System.Address := System'To_Address (16#50033000#);
SPI1_Base : constant System.Address := System'To_Address (16#40013000#);
SPI2_Base : constant System.Address := System'To_Address (16#40003800#);
SPI3_Base : constant System.Address := System'To_Address (16#40003C00#);
SEC_SPI1_Base : constant System.Address := System'To_Address (16#50013000#);
SEC_SPI2_Base : constant System.Address := System'To_Address (16#50003800#);
SEC_SPI3_Base : constant System.Address := System'To_Address (16#50003C00#);
TIM1_Base : constant System.Address := System'To_Address (16#40012C00#);
SEC_TIM1_Base : constant System.Address := System'To_Address (16#50012C00#);
TIM15_Base : constant System.Address := System'To_Address (16#40014000#);
SEC_TIM15_Base : constant System.Address := System'To_Address (16#50014000#);
TIM16_Base : constant System.Address := System'To_Address (16#40014400#);
SEC_TIM16_Base : constant System.Address := System'To_Address (16#50014400#);
TIM17_Base : constant System.Address := System'To_Address (16#40014800#);
SEC_TIM17_Base : constant System.Address := System'To_Address (16#50014800#);
TIM2_Base : constant System.Address := System'To_Address (16#40000000#);
SEC_TIM2_Base : constant System.Address := System'To_Address (16#50000000#);
TIM3_Base : constant System.Address := System'To_Address (16#40000400#);
SEC_TIM3_Base : constant System.Address := System'To_Address (16#50000400#);
TIM4_Base : constant System.Address := System'To_Address (16#40000800#);
SEC_TIM4_Base : constant System.Address := System'To_Address (16#50000800#);
TIM5_Base : constant System.Address := System'To_Address (16#40000C00#);
SEC_TIM5_Base : constant System.Address := System'To_Address (16#50000C00#);
TIM6_Base : constant System.Address := System'To_Address (16#40001000#);
SEC_TIM6_Base : constant System.Address := System'To_Address (16#50001000#);
TIM7_Base : constant System.Address := System'To_Address (16#40001400#);
SEC_TIM7_Base : constant System.Address := System'To_Address (16#50001400#);
DAC_Base : constant System.Address := System'To_Address (16#40007400#);
SEC_DAC_Base : constant System.Address := System'To_Address (16#50007400#);
OPAMP_Base : constant System.Address := System'To_Address (16#40007800#);
SEC_OPAMP_Base : constant System.Address := System'To_Address (16#50007800#);
AES_Base : constant System.Address := System'To_Address (16#420C0000#);
SEC_AES_Base : constant System.Address := System'To_Address (16#520C0000#);
PKA_Base : constant System.Address := System'To_Address (16#420C2000#);
SEC_PKA_Base : constant System.Address := System'To_Address (16#520C2000#);
OTFDEC1_Base : constant System.Address := System'To_Address (16#420C5000#);
SEC_OTFDEC1_Base : constant System.Address := System'To_Address (16#520C5000#);
TIM8_Base : constant System.Address := System'To_Address (16#40013400#);
SEC_TIM8_Base : constant System.Address := System'To_Address (16#50013400#);
GTZC_TZIC_Base : constant System.Address := System'To_Address (16#40032800#);
SEC_GTZC_TZIC_Base : constant System.Address := System'To_Address (16#50032800#);
GTZC_TZSC_Base : constant System.Address := System'To_Address (16#40032400#);
SEC_GTZC_TZSC_Base : constant System.Address := System'To_Address (16#50032400#);
WWDG_Base : constant System.Address := System'To_Address (16#40002C00#);
SEC_WWDG_Base : constant System.Address := System'To_Address (16#50002C00#);
SYSCFG_Base : constant System.Address := System'To_Address (16#40010000#);
SEC_SYSCFG_Base : constant System.Address := System'To_Address (16#50010000#);
DBGMCU_Base : constant System.Address := System'To_Address (16#E0044000#);
USB_Base : constant System.Address := System'To_Address (16#4000D400#);
SEC_USB_Base : constant System.Address := System'To_Address (16#5000D400#);
OCTOSPI1_Base : constant System.Address := System'To_Address (16#44021000#);
SEC_OCTOSPI1_Base : constant System.Address := System'To_Address (16#54021000#);
LPUART1_Base : constant System.Address := System'To_Address (16#40008000#);
SEC_LPUART1_Base : constant System.Address := System'To_Address (16#50008000#);
COMP_Base : constant System.Address := System'To_Address (16#40010200#);
SEC_COMP_Base : constant System.Address := System'To_Address (16#50010200#);
VREFBUF_Base : constant System.Address := System'To_Address (16#40010030#);
SEC_VREFBUF_Base : constant System.Address := System'To_Address (16#50010030#);
TSC_Base : constant System.Address := System'To_Address (16#40024000#);
SEC_TSC_Base : constant System.Address := System'To_Address (16#50024000#);
UCPD1_Base : constant System.Address := System'To_Address (16#4000DC00#);
SEC_UCPD1_Base : constant System.Address := System'To_Address (16#5000DC00#);
FDCAN1_Base : constant System.Address := System'To_Address (16#4000A400#);
SEC_FDCAN1_Base : constant System.Address := System'To_Address (16#5000A400#);
CRC_Base : constant System.Address := System'To_Address (16#40023000#);
SEC_CRC_Base : constant System.Address := System'To_Address (16#50023000#);
CRS_Base : constant System.Address := System'To_Address (16#40006000#);
SEC_CRS_Base : constant System.Address := System'To_Address (16#50006000#);
USART1_Base : constant System.Address := System'To_Address (16#40013800#);
SEC_USART1_Base : constant System.Address := System'To_Address (16#50013800#);
USART2_Base : constant System.Address := System'To_Address (16#40004400#);
SEC_USART2_Base : constant System.Address := System'To_Address (16#50004400#);
USART3_Base : constant System.Address := System'To_Address (16#40004800#);
SEC_USART3_Base : constant System.Address := System'To_Address (16#50004800#);
UART4_Base : constant System.Address := System'To_Address (16#40004C00#);
UART5_Base : constant System.Address := System'To_Address (16#40005000#);
SEC_UART4_Base : constant System.Address := System'To_Address (16#50004C00#);
SEC_UART5_Base : constant System.Address := System'To_Address (16#50005000#);
ADC_Common_Base : constant System.Address := System'To_Address (16#42028300#);
SEC_ADC_Common_Base : constant System.Address := System'To_Address (16#52028300#);
ADC1_Base : constant System.Address := System'To_Address (16#42028000#);
SEC_ADC1_Base : constant System.Address := System'To_Address (16#52028000#);
ADC2_Base : constant System.Address := System'To_Address (16#42028100#);
SEC_ADC2_Base : constant System.Address := System'To_Address (16#52028100#);
NVIC_Base : constant System.Address := System'To_Address (16#E000E100#);
NVIC_STIR_Base : constant System.Address := System'To_Address (16#E000EF00#);
FMC_Base : constant System.Address := System'To_Address (16#44020000#);
SEC_FMC_Base : constant System.Address := System'To_Address (16#54020000#);
RNG_Base : constant System.Address := System'To_Address (16#420C0800#);
SEC_RNG_Base : constant System.Address := System'To_Address (16#520C0800#);
SDMMC1_Base : constant System.Address := System'To_Address (16#420C8000#);
SEC_SDMMC1_Base : constant System.Address := System'To_Address (16#520C8000#);
DCB_Base : constant System.Address := System'To_Address (16#E000EE08#);
HASH_Base : constant System.Address := System'To_Address (16#420C0400#);
SEC_HASH_Base : constant System.Address := System'To_Address (16#520C0400#);
end Interfaces.STM32;
| 63.416327
| 86
| 0.663255
|
b992ba21bc721db9bb14bb2af5b5583b9bc09912
| 4,018
|
ads
|
Ada
|
source/nodes/program-nodes-array_aggregates.ads
|
optikos/oasis
|
9f64d46d26d964790d69f9db681c874cfb3bf96d
|
[
"MIT"
] | null | null | null |
source/nodes/program-nodes-array_aggregates.ads
|
optikos/oasis
|
9f64d46d26d964790d69f9db681c874cfb3bf96d
|
[
"MIT"
] | null | null | null |
source/nodes/program-nodes-array_aggregates.ads
|
optikos/oasis
|
9f64d46d26d964790d69f9db681c874cfb3bf96d
|
[
"MIT"
] | 2
|
2019-09-14T23:18:50.000Z
|
2019-10-02T10:11:40.000Z
|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Lexical_Elements;
with Program.Elements.Array_Component_Associations;
with Program.Elements.Array_Aggregates;
with Program.Element_Visitors;
package Program.Nodes.Array_Aggregates is
pragma Preelaborate;
type Array_Aggregate is
new Program.Nodes.Node
and Program.Elements.Array_Aggregates.Array_Aggregate
and Program.Elements.Array_Aggregates.Array_Aggregate_Text
with private;
function Create
(Left_Bracket_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Components : Program.Elements.Array_Component_Associations
.Array_Component_Association_Vector_Access;
Right_Bracket_Token : not null Program.Lexical_Elements
.Lexical_Element_Access)
return Array_Aggregate;
type Implicit_Array_Aggregate is
new Program.Nodes.Node
and Program.Elements.Array_Aggregates.Array_Aggregate
with private;
function Create
(Components : Program.Elements.Array_Component_Associations
.Array_Component_Association_Vector_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Array_Aggregate
with Pre =>
Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance;
private
type Base_Array_Aggregate is
abstract new Program.Nodes.Node
and Program.Elements.Array_Aggregates.Array_Aggregate
with record
Components : Program.Elements.Array_Component_Associations
.Array_Component_Association_Vector_Access;
end record;
procedure Initialize (Self : aliased in out Base_Array_Aggregate'Class);
overriding procedure Visit
(Self : not null access Base_Array_Aggregate;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class);
overriding function Components
(Self : Base_Array_Aggregate)
return Program.Elements.Array_Component_Associations
.Array_Component_Association_Vector_Access;
overriding function Is_Array_Aggregate_Element
(Self : Base_Array_Aggregate)
return Boolean;
overriding function Is_Expression_Element
(Self : Base_Array_Aggregate)
return Boolean;
type Array_Aggregate is
new Base_Array_Aggregate
and Program.Elements.Array_Aggregates.Array_Aggregate_Text
with record
Left_Bracket_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Right_Bracket_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
end record;
overriding function To_Array_Aggregate_Text
(Self : aliased in out Array_Aggregate)
return Program.Elements.Array_Aggregates.Array_Aggregate_Text_Access;
overriding function Left_Bracket_Token
(Self : Array_Aggregate)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function Right_Bracket_Token
(Self : Array_Aggregate)
return not null Program.Lexical_Elements.Lexical_Element_Access;
type Implicit_Array_Aggregate is
new Base_Array_Aggregate
with record
Is_Part_Of_Implicit : Boolean;
Is_Part_Of_Inherited : Boolean;
Is_Part_Of_Instance : Boolean;
end record;
overriding function To_Array_Aggregate_Text
(Self : aliased in out Implicit_Array_Aggregate)
return Program.Elements.Array_Aggregates.Array_Aggregate_Text_Access;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Array_Aggregate)
return Boolean;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Array_Aggregate)
return Boolean;
overriding function Is_Part_Of_Instance
(Self : Implicit_Array_Aggregate)
return Boolean;
end Program.Nodes.Array_Aggregates;
| 33.206612
| 75
| 0.744649
|
b7c3f8704232ce4e4533e37d5afe8afa28155dda
| 4,964
|
ads
|
Ada
|
tools/scitools/conf/understand/ada/ada95/s-finimp.ads
|
brucegua/moocos
|
575c161cfa35e220f10d042e2e5ca18773691695
|
[
"Apache-2.0"
] | 1
|
2020-01-20T21:26:46.000Z
|
2020-01-20T21:26:46.000Z
|
tools/scitools/conf/understand/ada/ada95/s-finimp.ads
|
brucegua/moocos
|
575c161cfa35e220f10d042e2e5ca18773691695
|
[
"Apache-2.0"
] | null | null | null |
tools/scitools/conf/understand/ada/ada95/s-finimp.ads
|
brucegua/moocos
|
575c161cfa35e220f10d042e2e5ca18773691695
|
[
"Apache-2.0"
] | null | null | null |
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . F I N A L I Z A T I O N _ I M P L E M E N T A T I O N --
-- --
-- S p e c --
-- --
-- $Revision: 2 $ --
-- --
-- Copyright (c) 1992,1993,1994 NYU, All Rights Reserved --
-- --
-- The GNAT library is free software; you can redistribute it and/or modify --
-- it under terms of the GNU Library General Public License as published by --
-- the Free Software Foundation; either version 2, or (at your option) any --
-- later version. The GNAT library is distributed in the hope that it will --
-- be useful, but WITHOUT ANY WARRANTY; without even the implied warranty --
-- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- Library General Public License for more details. You should have --
-- received a copy of the GNU Library General Public License along with --
-- the GNAT library; see the file COPYING.LIB. If not, write to the Free --
-- Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. --
-- --
------------------------------------------------------------------------------
-- ??? this package should be a private package. It is set as public for now
-- in order to simplify testing
package System.Finalization_Implementation is
pragma Preelaborate (Finalization_Implementation);
type Root;
subtype Finalizable is Root'Class;
type Finalizable_Ptr is access all Root'Class;
type Root is abstract tagged record
Prev : Finalizable_Ptr;
Next : Finalizable_Ptr;
end record;
procedure Initialize (Object : in out Root) is abstract;
procedure Finalize (Object : in out Root) is abstract;
procedure Adjust (Object : in out Root);
-------------------------------------------------
-- Finalization Management Abstract Interface --
-------------------------------------------------
Global_Final_List : Finalizable_Ptr;
-- This list stores the controlled objects defined in library-level
-- packages. They will be finalized after the main program completion.
procedure Finalize_Global_List;
-- The procedure to be called in order to finalize the global list;
procedure Attach_To_Final_List
(L : in out Finalizable_Ptr;
Obj : in out Finalizable);
-- Put the finalizable object on a list of finalizable elements.
procedure Detach_From_Final_List
(L : in out Finalizable_Ptr;
Obj : in out Finalizable);
-- Remove the specified object from the Final list and reset its
-- pointers to null.
procedure Finalize_List (L : Finalizable_Ptr);
-- Call Finalize on each element of the list L;
procedure Finalize_One
(From : in out Finalizable_Ptr;
Obj : in out Finalizable);
-- Call Finalize on Obj and remove it from the list From.
-----------------------------
-- Record Controller Types --
-----------------------------
-- Definition of the types of the controller component that is included
-- in records containing controlled components. This controller is
-- attached to the finalization chain of the upper-level and carries
-- the pointer of the finalization chain for the lower level
type Limited_Record_Controller is new Root with record
F : System.Finalization_Implementation.Finalizable_Ptr;
end record;
procedure Initialize (Object : in out Limited_Record_Controller);
-- Does nothing
procedure Finalize (Object : in out Limited_Record_Controller);
-- Finalize the controlled components of the enclosing record by
-- following the list starting at Object.F
type Record_Controller is
new Limited_Record_Controller with record
My_Address : System.Address;
end record;
procedure Initialize (Object : in out Record_Controller);
-- Initialize the field My_Address to the Object'Address
procedure Adjust (Object : in out Record_Controller);
-- Adjust the components and their finalization pointers by substracting
-- by the offset of the target and the source addresses of the assignment
-- Inherit Finalize from Limited_Record_Controller
end System.Finalization_Implementation;
| 44.720721
| 78
| 0.560435
|
863a610f12e94abc3883cc4336ec05b8d81ea0b3
| 3,991
|
adb
|
Ada
|
src/apsepp-test_node_class-suite_stub.adb
|
thierr26/ada-apsepp
|
6eb87079ea57707db4ee1e2215fa170af66b1913
|
[
"MIT"
] | null | null | null |
src/apsepp-test_node_class-suite_stub.adb
|
thierr26/ada-apsepp
|
6eb87079ea57707db4ee1e2215fa170af66b1913
|
[
"MIT"
] | null | null | null |
src/apsepp-test_node_class-suite_stub.adb
|
thierr26/ada-apsepp
|
6eb87079ea57707db4ee1e2215fa170af66b1913
|
[
"MIT"
] | null | null | null |
-- Copyright (C) 2019 Thierry Rascle <thierr26@free.fr>
-- MIT license. Please refer to the LICENSE file.
with Apsepp.Test_Node_Class.Private_Test_Reporter;
package body Apsepp.Test_Node_Class.Suite_Stub is
T_S_S : aliased Test_Suite_Stub;
----------------------------------------------------------------------------
procedure Run_Children (Obj : Test_Node_Interfa'Class;
Outcome : out Test_Outcome;
Kind : Run_Kind) is
use Private_Test_Reporter;
T : constant Tag := Obj'Tag;
Current_Child : Test_Node_Access := T_S_S'Access;
Child_Run_Outcome : Test_Outcome;
begin
Outcome := Passed;
for K in 1 .. Obj.Child_Count loop
begin
Current_Child := Obj.Child (K);
begin
Current_Child.Run (Child_Run_Outcome, Kind);
case Child_Run_Outcome is
when Passed => null;
when Failed => Outcome := Failed;
end case;
exception
when E : others =>
Outcome := Failed;
case Kind is
when Check_Cond =>
Test_Reporter.Report_Unexpected_Node_Cond_Check_Error
(T, E);
when Assert_Cond_And_Run_Test =>
Test_Reporter.Report_Unexpected_Node_Run_Error (T, E);
end case;
end;
exception
when Access_E : others =>
Test_Reporter.Report_Failed_Child_Test_Node_Access
(T, (if K = 1 then No_Tag else Current_Child'Tag), Access_E);
end;
end loop;
end Run_Children;
----------------------------------------------------------------------------
overriding
procedure Run (Obj : in out Test_Suite_Stub;
Outcome : out Test_Outcome;
Kind : Run_Kind := Assert_Cond_And_Run_Test)
is
-----------------------------------------------------
function Cond return Boolean is
Outc : Test_Outcome := Passed;
begin
case Kind is
when Check_Cond => Run_Children (Obj, Outc, Kind);
when Assert_Cond_And_Run_Test => null;
end case;
return (case Outc is
when Failed => False,
when Passed => True);
end Cond;
-----------------------------------------------------
begin
Run_Body (Obj, Outcome, Kind, Cond'Access);
case Kind is
when Check_Cond => null;
when Assert_Cond_And_Run_Test => Obj.Early_Run_Done_Flag := False;
end case;
end Run;
----------------------------------------------------------------------------
overriding
function Child (Obj : Test_Suite_Stub;
K : Test_Node_Index) return Test_Node_Access
is (T_S_S'Access); -- Raises because of class-wide pre-condition violation
-- (K <= Obj.Child_Count).
----------------------------------------------------------------------------
overriding
function Early_Run_Done (Obj : Test_Suite_Stub) return Boolean
is (Obj.Early_Run_Done_Flag);
----------------------------------------------------------------------------
overriding
procedure Early_Run (Obj : in out Test_Suite_Stub) is
begin
Obj.Early_Run_Done_Flag := True;
for K in 1 .. Test_Suite_Stub'Class (Obj).Child_Count loop
declare
Ch : constant Test_Node_Access
:= Test_Suite_Stub'Class (Obj).Child (K);
begin
if not Ch.Early_Run_Done then
Ch.Early_Run;
end if;
end;
end loop;
end Early_Run;
----------------------------------------------------------------------------
end Apsepp.Test_Node_Class.Suite_Stub;
| 27.909091
| 79
| 0.468304
|
3d22f466c0e90842da35d0df56155d9dd40d1ff1
| 3,907
|
adb
|
Ada
|
apps/bootloader/main_direct.adb
|
ekoeppen/MSP430_Generic_Ada_Drivers
|
12b8238ea22dbb0c0c6c63ca46bfa7e2cb80334a
|
[
"MIT"
] | null | null | null |
apps/bootloader/main_direct.adb
|
ekoeppen/MSP430_Generic_Ada_Drivers
|
12b8238ea22dbb0c0c6c63ca46bfa7e2cb80334a
|
[
"MIT"
] | null | null | null |
apps/bootloader/main_direct.adb
|
ekoeppen/MSP430_Generic_Ada_Drivers
|
12b8238ea22dbb0c0c6c63ca46bfa7e2cb80334a
|
[
"MIT"
] | null | null | null |
with System.Machine_Code; use System.Machine_Code;
with System.Storage_Elements; use System.Storage_Elements;
with System.Address_To_Access_Conversions;
with System; use System;
with Interfaces; use Interfaces;
with MSPGD.Board; use MSPGD.Board;
with MSP430_SVD; use MSP430_SVD;
with MSP430_SVD.FLASH; use MSP430_SVD.FLASH;
with MSP430_SVD.SYSTEM_CLOCK; use MSP430_SVD.SYSTEM_CLOCK;
procedure Main is
pragma Preelaborate;
Flash_Start : Unsigned_16
with Import, External_Name => "__flash_start";
Flash_Segment_Size : constant Unsigned_16 := 512;
type Flash_Memory_Type is array (Unsigned_16 range 0 .. 65535) of Unsigned_8;
type Flash_Memory_Pointer is access all Flash_Memory_Type;
package Convert is new System.Address_To_Access_Conversions (Flash_Memory_Type);
Flash_Memory : constant Convert.Object_Pointer := Convert.To_Pointer (System'To_Address (0));
Line : array (Unsigned_16 range 0 .. 47) of Unsigned_8;
Write_Addr : Unsigned_16;
Count : Unsigned_8;
XON : constant Byte := 17;
XOFF : constant Byte := 19;
FCTL1 : Unsigned_16 with Import, Address => System'To_Address (16#0128#);
FCTL2 : Unsigned_16 with Import, Address => System'To_Address (16#012A#);
FCTL3 : Unsigned_16 with Import, Address => System'To_Address (16#012C#);
function Nibble (N : Unsigned_8) return Unsigned_8 is
begin
return (if N >= 65 then N - 65 + 10 else N - 48);
end Nibble;
function From_Hex (I : Unsigned_16) return Unsigned_8 is
begin
return 16 * Nibble (Line (I)) + Nibble (Line (I + 1));
end From_Hex;
procedure Erase_Flash is
Addr : Unsigned_16 := Flash_Start;
R_Low : Unsigned_8 := Flash_Memory (65534);
R_High : Unsigned_8 := Flash_Memory (65535);
begin
FCTL3 := 16#A500#;
FCTL1 := 16#A502#;
Flash_Memory (65534) := 0;
while Addr <= 65535 loop
if Addr /= 16#FA00# then Flash_Memory (Addr) := 0; end if;
Addr := Addr + Flash_Segment_Size;
end loop;
Flash_Memory (65534) := R_Low;
Flash_Memory (65535) := R_High;
FCTL1 := 16#A500#;
FCTL3 := 16#A510#;
end Erase_Flash;
procedure Write_Flash is
begin
FCTL3 := 16#A500#;
FCTL1 := 16#A540#;
for I in Unsigned_8 range 0 .. Count loop
Flash_Memory (Write_Addr) := From_Hex (Unsigned_16 (I) * 2);
Write_Addr := Write_Addr + Unsigned_16 (1);
end loop;
FCTL1 := 16#A500#;
FCTL3 := 16#A510#;
end Write_Flash;
procedure Reset is
begin
UART.Transmit (XON);
FCTL1 := 16#0000#;
end Reset;
procedure Read_Line is
Record_Type : Unsigned_8;
begin
UART.Transmit (XON);
for I in Line'Range loop
Line (I) := Unsigned_8 (UART.Receive);
exit when Line (I) = 10;
end loop;
UART.Transmit (XOFF);
Count := From_Hex (1);
Write_Addr := (Unsigned_16 (From_Hex (3)) * 256 + Unsigned_16 (From_Hex (5)));
Record_Type := From_Hex (7);
case Record_Type is
when 16#00# => Write_Flash;
when 16#01# => Reset;
when 16#80# => Erase_Flash;
when others => null;
end case;
end Read_Line;
procedure Init is
CALDCO_8MHz : DCOCTL_Register with Import, Address => System'To_Address (16#10FC#);
CALBC1_8MHz : BCSCTL1_Register with Import, Address => System'To_Address (16#10FD#);
begin
BUTTON.Init;
if BUTTON.Is_Set then
null;
end if;
-- SYSTEM_CLOCK_Periph.DCOCTL.MOD_k.Val := 0;
-- SYSTEM_CLOCK_Periph.DCOCTL.DCO.Val := 0;
SYSTEM_CLOCK_Periph.BCSCTL1 := CALBC1_8MHz;
SYSTEM_CLOCK_Periph.DCOCTL := CALDCO_8MHz;
RX.Init;
TX.Init;
UART.Init;
FCTL2 := 16#A554#;
-- FLASH_Periph.FCTL2 := (FWKEY => 16#A5#, FSSEL => Fssel_1, FN => 20);
end Init;
begin
Init;
loop
Read_Line;
end loop;
end Main;
| 30.523438
| 96
| 0.645252
|
72a2710ad481f8759a037daf870ed9c45850fb47
| 3,710
|
adb
|
Ada
|
tier-1/xcb/applet/demo/simple/simple.adb
|
charlie5/cBound
|
741be08197a61ad9c72553e3302f3b669902216d
|
[
"0BSD"
] | 2
|
2015-11-12T11:16:20.000Z
|
2021-08-24T22:32:04.000Z
|
tier-1/xcb/applet/demo/simple/simple.adb
|
charlie5/cBound
|
741be08197a61ad9c72553e3302f3b669902216d
|
[
"0BSD"
] | 1
|
2018-06-05T05:19:35.000Z
|
2021-11-20T01:13:23.000Z
|
tier-1/xcb/applet/demo/simple/simple.adb
|
charlie5/cBound
|
741be08197a61ad9c72553e3302f3b669902216d
|
[
"0BSD"
] | null | null | null |
with xcb.Binding; use xcb.Binding;
with xcb.Pointers; use xcb.Pointers;
with xcb.xcb_Screen_t;
with xcb.xcb_screen_Iterator_t;
with xcb.xcb_void_cookie_t;
with xcb.xcb_generic_event_t;
with Swig; use Swig;
with Swig.Pointers;
with interfaces.C.Strings; use Interfaces, interfaces.C, interfaces.C.Strings;
with ada.Text_IO; use ada.Text_IO;
with ada.unchecked_Deallocation;
with Ada.unchecked_Conversion;
procedure Simple
is
the_Connection : xcb_connection_t_Pointer;
the_Screen : xcb.xcb_screen_t.Pointer;
the_screen_Id : swig.Pointers.int_Pointer := new c.int;
the_Window : xcb.xcb_window_t;
void_Cookie : xcb.xcb_void_cookie_t.item;
Status : C.int;
Mask : swig.uint32_t;
Values : swig.uint32_t_array (1 .. 2);
E : xcb.xcb_generic_event_t.Pointer;
use type xcb.xcb_generic_event_t.Pointer;
procedure free is new ada.Unchecked_Deallocation (xcb.xcb_generic_event_t.item, xcb.xcb_generic_event_t.Pointer);
function to_Flag is new ada.Unchecked_Conversion (xcb.xcb_event_mask_t, swig.uint32_t);
function to_Flag is new ada.Unchecked_Conversion (xcb.xcb_cw_t, swig.uint32_t);
begin
-- Open the connection to the X server.
--
the_Connection := xcb_connect (c.strings.null_Ptr, -- Use the DISPLAY environment variable as the default display name.
the_screen_Id);
-- Get the screen id.
--
the_Screen := xcb_setup_roots_iterator (xcb_get_setup (the_Connection)).data.all'access;
-- Display some screen details.
--
new_Line;
put_Line ("Informations of screen:" & Unsigned_32'image (the_Screen.root));
new_Line;
put_Line (" width :" & Unsigned_16'image (the_Screen.width_in_pixels ));
put_Line (" height :" & Unsigned_16'image (the_Screen.height_in_pixels));
put_Line (" white pixel:" & Unsigned_32'image (the_Screen.white_pixel ));
put_Line (" black pixel:" & Unsigned_32'image (the_Screen.black_pixel ));
new_Line;
-- Create the window.
--
-- Ask for our window's Id.
--
the_Window := xcb_generate_id (the_Connection);
Mask := to_Flag (xcb.XCB_CW_BACK_PIXEL) or to_Flag (xcb.XCB_CW_EVENT_MASK);
put_Line ("FLAG: " & swig.uint32_t'Image (Mask));
Values := (1 => the_Screen.white_pixel, 2 => to_Flag (xcb.XCB_EVENT_MASK_EXPOSURE));
void_Cookie := xcb_create_window (the_Connection,
Unsigned_8 (xcb.XCB_COPY_FROM_PARENT),
the_Window,
the_screen.Root,
0, 0,
150, 150,
10,
xcb.xcb_window_class_t'Pos (xcb.XCB_WINDOW_CLASS_INPUT_OUTPUT),
the_Screen.root_Visual,
Mask,
Values (1)'Address);
-- Map the window on the screen.
--
void_Cookie := xcb_map_window (the_Connection, the_Window);
-- Make sure commands are sent before we pause, so window is shown.
--
Status := xcb_flush (the_Connection);
loop
put_Line ("fetch event:");
E := xcb_wait_for_event (the_Connection);
exit when E = null;
put_Line ("Got event:" & integer'image (Integer (E.response_type)));
free (E);
end loop;
-- Close the X server connection.
--
xcb_disconnect (the_Connection);
new_Line;
put_Line ("End.");
end Simple;
| 32.54386
| 137
| 0.60027
|
1566e3eb17dc379ede2b9e43b0e10b897490f0cb
| 6,934
|
adb
|
Ada
|
adm/code/src/admbase.adb
|
leo-brewin/adm-bssn-numerical
|
9e32c201272e9a41e7535475fe381e450b99b058
|
[
"MIT"
] | 1
|
2022-01-25T11:36:06.000Z
|
2022-01-25T11:36:06.000Z
|
adm/code/src/admbase.adb
|
leo-brewin/adm-bssn-numerical
|
9e32c201272e9a41e7535475fe381e450b99b058
|
[
"MIT"
] | null | null | null |
adm/code/src/admbase.adb
|
leo-brewin/adm-bssn-numerical
|
9e32c201272e9a41e7535475fe381e450b99b058
|
[
"MIT"
] | null | null | null |
package body ADMBase is
-- overloaded operators for MetricPointArray
function "-" (Right : MetricPointArray) return MetricPointArray
is
tmp : MetricPointArray := Right;
begin
for i in Right'range(1) loop
tmp (i) := - Right (i);
end loop;
return tmp;
end "-";
function "-" (Left : MetricPointArray; Right : MetricPointArray) return MetricPointArray
is
tmp : MetricPointArray := Right;
begin
for i in Left'range(1) loop
tmp (i) := Left (i) - Right (i);
end loop;
return tmp;
end "-";
function "+" (Left : MetricPointArray; Right : MetricPointArray) return MetricPointArray
is
tmp : MetricPointArray := Right;
begin
for i in Left'range(1) loop
tmp (i) := Left (i) + Right (i);
end loop;
return tmp;
end "+";
function "*" (Left : Real; Right : MetricPointArray) return MetricPointArray
is
tmp : MetricPointArray := Right;
begin
for i in Right'Range(1) loop
tmp (i) := Left * Right (i);
end loop;
return tmp;
end "*";
function "/" (Left : MetricPointArray; Right : Real) return MetricPointArray
is
tmp : MetricPointArray := left;
begin
for i in Left'Range loop
tmp (i) := Left (i) / Right;
end loop;
return tmp;
end "/";
-- overloaded operators for ExtcurvPointArray
function "-" (Right : ExtcurvPointArray) return ExtcurvPointArray
is
tmp : ExtcurvPointArray := Right;
begin
for i in Right'range(1) loop
tmp (i) := - Right (i);
end loop;
return tmp;
end "-";
function "-" (Left : ExtcurvPointArray; Right : ExtcurvPointArray) return ExtcurvPointArray
is
tmp : ExtcurvPointArray := Right;
begin
for i in Left'range(1) loop
tmp (i) := Left (i) - Right (i);
end loop;
return tmp;
end "-";
function "+" (Left : ExtcurvPointArray; Right : ExtcurvPointArray) return ExtcurvPointArray
is
tmp : ExtcurvPointArray := Right;
begin
for i in Left'range(1) loop
tmp (i) := Left (i) + Right (i);
end loop;
return tmp;
end "+";
function "*" (Left : Real; Right : ExtcurvPointArray) return ExtcurvPointArray
is
tmp : ExtcurvPointArray := Right;
begin
for i in Right'Range(1) loop
tmp (i) := Left * Right (i);
end loop;
return tmp;
end "*";
function "/" (Left : ExtcurvPointArray; Right : Real) return ExtcurvPointArray
is
tmp : ExtcurvPointArray := left;
begin
for i in Left'Range loop
tmp (i) := Left (i) / Right;
end loop;
return tmp;
end "/";
-- elementary operations on symmetric 3x3 matrices gab and Kab
Function symm_inverse (gab : MetricPointArray)
Return MetricPointArray
is
inv : MetricPointArray;
det : Real;
begin
inv (xx) := gab (yy) * gab (zz) - gab (yz) * gab (yz);
inv (xy) := - gab (xy) * gab (zz) + gab (xz) * gab (yz);
inv (xz) := gab (xy) * gab (yz) - gab (xz) * gab (yy);
inv (yy) := gab (xx) * gab (zz) - gab (xz) * gab (xz);
inv (yz) := - gab (xx) * gab (yz) + gab (xy) * gab (xz);
inv (zz) := gab (xx) * gab (yy) - gab (xy) * gab (xy);
det := inv(xx)*gab(xx) + inv(xy)*gab(xy) + inv(xz)*gab(xz);
inv (xx) := inv (xx) / det;
inv (xy) := inv (xy) / det;
inv (xz) := inv (xz) / det;
inv (yy) := inv (yy) / det;
inv (yz) := inv (yz) / det;
inv (zz) := inv (zz) / det;
Return inv;
end symm_inverse;
Function symm_det (gab : MetricPointArray)
Return Real
is
tmp_xx, tmp_xy, tmp_xz : Real;
begin
tmp_xx := gab (yy) * gab (zz) - gab (yz) * gab (yz);
tmp_xy := - gab (xy) * gab (zz) + gab (xz) * gab (yz);
tmp_xz := gab (xy) * gab (yz) - gab (xz) * gab (yy);
Return tmp_xx*gab(xx) + tmp_xy*gab(xy) + tmp_xz*gab(xz);
end symm_det;
Function symm_trace (mat : ExtcurvPointArray;
iab : MetricPointArray)
Return Real
is
trace : Real;
begin
trace := iab(xx)*mat(xx) + iab(yy)*mat(yy) + iab(zz)*mat(zz)
+ 2.0*(iab(xy)*mat(xy) + iab(xz)*mat(xz) + iab(yz)*mat(yz));
Return trace;
end symm_trace;
Function symm_raise_indices (Mdn : MetricPointArray;
iab : MetricPointArray)
Return MetricPointArray
is
t01, t02, t03, t04, t05, t06, t07, t08, t09 : Real;
Mup : MetricPointArray;
begin
t01 := Mdn(xx)*iab(xx) + Mdn(xy)*iab(xy) + Mdn(xz)*iab(xz);
t02 := Mdn(yy)*iab(yy) + Mdn(xy)*iab(xy) + Mdn(yz)*iab(yz);
t03 := Mdn(zz)*iab(zz) + Mdn(xz)*iab(xz) + Mdn(yz)*iab(yz);
t04 := Mdn(xy)*iab(xx) + Mdn(yy)*iab(xy) + Mdn(yz)*iab(xz);
t05 := Mdn(xz)*iab(xx) + Mdn(yz)*iab(xy) + Mdn(zz)*iab(xz);
t06 := Mdn(xx)*iab(xy) + Mdn(xy)*iab(yy) + Mdn(xz)*iab(yz);
t07 := Mdn(xz)*iab(xy) + Mdn(yz)*iab(yy) + Mdn(zz)*iab(yz);
t08 := Mdn(xx)*iab(xz) + Mdn(xy)*iab(yz) + Mdn(xz)*iab(zz);
t09 := Mdn(xy)*iab(xz) + Mdn(yy)*iab(yz) + Mdn(yz)*iab(zz);
Mup (xx) := iab(xx)*t01 + iab(xy)*t04 + iab(xz)*t05;
Mup (xy) := iab(xy)*t01 + iab(yy)*t04 + iab(yz)*t05;
Mup (xz) := iab(xz)*t01 + iab(yz)*t04 + iab(zz)*t05;
Mup (yy) := iab(xy)*t06 + iab(yy)*t02 + iab(yz)*t07;
Mup (yz) := iab(xz)*t06 + iab(yz)*t02 + iab(zz)*t07;
Mup (zz) := iab(xz)*t08 + iab(yz)*t09 + iab(zz)*t03;
return Mup;
end symm_raise_indices;
Function symm_raise_indices (Mdn : ExtcurvPointArray;
iab : MetricPointArray)
Return ExtcurvPointArray
is
t01, t02, t03, t04, t05, t06, t07, t08, t09 : Real;
Mup : ExtcurvPointArray;
begin
t01 := Mdn(xx)*iab(xx) + Mdn(xy)*iab(xy) + Mdn(xz)*iab(xz);
t02 := Mdn(yy)*iab(yy) + Mdn(xy)*iab(xy) + Mdn(yz)*iab(yz);
t03 := Mdn(zz)*iab(zz) + Mdn(xz)*iab(xz) + Mdn(yz)*iab(yz);
t04 := Mdn(xy)*iab(xx) + Mdn(yy)*iab(xy) + Mdn(yz)*iab(xz);
t05 := Mdn(xz)*iab(xx) + Mdn(yz)*iab(xy) + Mdn(zz)*iab(xz);
t06 := Mdn(xx)*iab(xy) + Mdn(xy)*iab(yy) + Mdn(xz)*iab(yz);
t07 := Mdn(xz)*iab(xy) + Mdn(yz)*iab(yy) + Mdn(zz)*iab(yz);
t08 := Mdn(xx)*iab(xz) + Mdn(xy)*iab(yz) + Mdn(xz)*iab(zz);
t09 := Mdn(xy)*iab(xz) + Mdn(yy)*iab(yz) + Mdn(yz)*iab(zz);
Mup (xx) := iab(xx)*t01 + iab(xy)*t04 + iab(xz)*t05;
Mup (xy) := iab(xy)*t01 + iab(yy)*t04 + iab(yz)*t05;
Mup (xz) := iab(xz)*t01 + iab(yz)*t04 + iab(zz)*t05;
Mup (yy) := iab(xy)*t06 + iab(yy)*t02 + iab(yz)*t07;
Mup (yz) := iab(xz)*t06 + iab(yz)*t02 + iab(zz)*t07;
Mup (zz) := iab(xz)*t08 + iab(yz)*t09 + iab(zz)*t03;
return Mup;
end symm_raise_indices;
end ADMBase;
| 31.09417
| 94
| 0.530574
|
1c8d80ada38731739702a8b2fb7ea46872d8510f
| 6,284
|
ads
|
Ada
|
src/sdl-events-touches.ads
|
Fabien-Chouteau/sdlada
|
f08d72e3f5dcec228d68fb5b6681ea831f81ef47
|
[
"Zlib"
] | 1
|
2021-10-30T14:41:56.000Z
|
2021-10-30T14:41:56.000Z
|
src/sdl-events-touches.ads
|
Fabien-Chouteau/sdlada
|
f08d72e3f5dcec228d68fb5b6681ea831f81ef47
|
[
"Zlib"
] | null | null | null |
src/sdl-events-touches.ads
|
Fabien-Chouteau/sdlada
|
f08d72e3f5dcec228d68fb5b6681ea831f81ef47
|
[
"Zlib"
] | null | null | null |
--------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2013-2020, Luke A. Guest
--
-- 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.
--------------------------------------------------------------------------------------------------------------------
-- SDL.Events.Touches
--
-- WARNING!! A lot of the data bindings in this specification is guess-work, especially the ranges for things. There
-- also an inconsistency in the usage of Fingers_Touching within SDL itself.
--
-- See:
-- https://bugzilla.libsdl.org/show_bug.cgi?id=3060
-- http://lists.libsdl.org/pipermail/sdl-libsdl.org/2015-July/098468.html
--------------------------------------------------------------------------------------------------------------------
with Interfaces.C;
package SDL.Events.Touches is
-- Touch events.
Finger_Down : constant Event_Types := 16#0000_0700#;
Finger_Up : constant Event_Types := Finger_Down + 1;
Finger_Motion : constant Event_Types := Finger_Down + 2;
-- Gesture events.
Dollar_Gesture : constant Event_Types := 16#0000_0800#;
Dollar_Record : constant Event_Types := Dollar_Gesture + 1;
Dollar_Multi_Gesture : constant Event_Types := Dollar_Gesture + 2;
-- TODO: Find out if these really should be signed or not, the C version uses Sint64 for both.
type Touch_IDs is range -1 .. 2 ** 63 - 1 with
Convention => C,
Size => 64;
type Finger_IDs is range 0 .. 2 ** 63 - 1 with
Convention => C,
Size => 64;
type Gesture_IDs is range 0 .. 2 ** 63 - 1 with
Convention => C,
Size => 64;
type Touch_Locations is digits 3 range 0.0 .. 1.0 with
Convention => C,
Size => 32;
type Touch_Distances is digits 3 range -1.0 .. 1.0 with
Convention => C,
Size => 32;
type Touch_Pressures is digits 3 range 0.0 .. 1.0 with
Convention => C,
Size => 32;
type Finger_Events is
record
Event_Type : Event_Types; -- Will be set to Finger_Down, Finger_Up or Finger_Motion.
Time_Stamp : Time_Stamps;
Touch_ID : Touch_IDs;
Finger_ID : Finger_IDs;
X : Touch_Locations;
Y : Touch_Locations;
Delta_X : Touch_Distances;
Delta_Y : Touch_Distances;
Pressure : Touch_Pressures;
end record with
Convention => C;
type Finger_Rotations is digits 3 range -360.0 .. 360.0 with
Convention => C,
Size => 32;
subtype Finger_Pinches is Interfaces.C.C_float;
type Fingers_Touching is range 0 .. 2 ** 16 - 1 with
Convention => C,
Size => 16;
type Multi_Gesture_Events is
record
Event_Type : Event_Types; -- Will be set to Dollar_Multi_Gesture.
Time_Stamp : Time_Stamps;
Touch_ID : Touch_IDs;
Theta : Finger_Rotations;
Distance : Finger_Pinches;
Centre_X : Touch_Locations;
Centre_Y : Touch_Locations;
Fingers : Fingers_Touching;
Padding : Padding_16;
end record with
Convention => C;
subtype Dollar_Errors is Interfaces.C.C_float;
type Dollar_Events is
record
Event_Type : Event_Types; -- Will be set to Dollar_Gesture or Dollar_Record.
Time_Stamp : Time_Stamps;
Touch_ID : Touch_IDs;
Gesture_ID : Gesture_IDs;
Fingers : Fingers_Touching;
Error : Dollar_Errors;
Centre_X : Touch_Locations;
Centre_Y : Touch_Locations;
end record with
Convention => C;
private
for Finger_Events use
record
Event_Type at 0 * SDL.Word range 0 .. 31;
Time_Stamp at 1 * SDL.Word range 0 .. 31;
Touch_ID at 2 * SDL.Word range 0 .. 63;
Finger_ID at 4 * SDL.Word range 0 .. 63;
X at 6 * SDL.Word range 0 .. 31;
Y at 7 * SDL.Word range 0 .. 31;
Delta_X at 8 * SDL.Word range 0 .. 31;
Delta_Y at 9 * SDL.Word range 0 .. 31;
Pressure at 10 * SDL.Word range 0 .. 31;
end record;
for Multi_Gesture_Events use
record
Event_Type at 0 * SDL.Word range 0 .. 31;
Time_Stamp at 1 * SDL.Word range 0 .. 31;
Touch_ID at 2 * SDL.Word range 0 .. 63;
Theta at 4 * SDL.Word range 0 .. 31;
Distance at 5 * SDL.Word range 0 .. 31;
Centre_X at 6 * SDL.Word range 0 .. 31;
Centre_Y at 7 * SDL.Word range 0 .. 31;
Fingers at 8 * SDL.Word range 0 .. 15;
Padding at 8 * SDL.Word range 16 .. 31;
end record;
for Dollar_Events use
record
Event_Type at 0 * SDL.Word range 0 .. 31;
Time_Stamp at 1 * SDL.Word range 0 .. 31;
Touch_ID at 2 * SDL.Word range 0 .. 63;
Gesture_ID at 4 * SDL.Word range 0 .. 63;
Fingers at 6 * SDL.Word range 0 .. 31; -- Inconsistent, type is 16 bits, but SDL uses 32 here.
Error at 7 * SDL.Word range 0 .. 31;
Centre_X at 8 * SDL.Word range 0 .. 31;
Centre_Y at 9 * SDL.Word range 0 .. 31;
end record;
end SDL.Events.Touches;
| 37.628743
| 117
| 0.558721
|
886c333164702ba92378a9ccb3f802543df410b7
| 48,828
|
adb
|
Ada
|
src/ui/utils-ui.adb
|
thindil/steamsky
|
d5d7fea622f7994c91017c4cd7ba5e188153556c
|
[
"TCL",
"MIT"
] | 80
|
2017-04-08T23:14:07.000Z
|
2022-02-10T22:30:51.000Z
|
src/ui/utils-ui.adb
|
thindil/steamsky
|
d5d7fea622f7994c91017c4cd7ba5e188153556c
|
[
"TCL",
"MIT"
] | 89
|
2017-06-24T08:18:26.000Z
|
2021-11-12T04:37:36.000Z
|
src/ui/utils-ui.adb
|
thindil/steamsky
|
d5d7fea622f7994c91017c4cd7ba5e188153556c
|
[
"TCL",
"MIT"
] | 9
|
2018-04-14T16:37:25.000Z
|
2020-03-21T14:33:49.000Z
|
-- Copyright (c) 2020-2021 Bartek thindil Jasicki <thindil@laeran.pl>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with Ada.Characters.Handling; use Ada.Characters.Handling;
with Ada.Characters.Latin_1; use Ada.Characters.Latin_1;
with Ada.Directories; use Ada.Directories;
with Ada.Strings; use Ada.Strings;
with Ada.Strings.Fixed; use Ada.Strings.Fixed;
with Interfaces.C.Strings; use Interfaces.C.Strings;
with GNAT.String_Split; use GNAT.String_Split;
with Tcl; use Tcl;
with Tcl.Ada; use Tcl.Ada;
with Tcl.Tk.Ada; use Tcl.Tk.Ada;
with Tcl.Tk.Ada.Grid;
with Tcl.Tk.Ada.Widgets.Text; use Tcl.Tk.Ada.Widgets.Text;
with Tcl.Tk.Ada.Widgets.Menu; use Tcl.Tk.Ada.Widgets.Menu;
with Tcl.Tk.Ada.Widgets.TtkButton; use Tcl.Tk.Ada.Widgets.TtkButton;
with Tcl.Tk.Ada.Widgets.TtkEntry; use Tcl.Tk.Ada.Widgets.TtkEntry;
with Tcl.Tk.Ada.Widgets.TtkEntry.TtkComboBox;
use Tcl.Tk.Ada.Widgets.TtkEntry.TtkComboBox;
with Tcl.Tk.Ada.Widgets.TtkEntry.TtkSpinBox;
use Tcl.Tk.Ada.Widgets.TtkEntry.TtkSpinBox;
with Tcl.Tk.Ada.Widgets.TtkFrame; use Tcl.Tk.Ada.Widgets.TtkFrame;
with Tcl.Tk.Ada.Widgets.TtkLabel; use Tcl.Tk.Ada.Widgets.TtkLabel;
with Tcl.Tk.Ada.Widgets.TtkPanedWindow; use Tcl.Tk.Ada.Widgets.TtkPanedWindow;
with Tcl.Tk.Ada.Widgets.TtkScrollbar; use Tcl.Tk.Ada.Widgets.TtkScrollbar;
with Tcl.Tk.Ada.Winfo; use Tcl.Tk.Ada.Winfo;
with Bases; use Bases;
with Combat.UI; use Combat.UI;
with Config; use Config;
with CoreUI; use CoreUI;
with Crew; use Crew;
with Dialogs; use Dialogs;
with Events; use Events;
with Factions; use Factions;
with Maps; use Maps;
with Maps.UI; use Maps.UI;
with MainMenu; use MainMenu;
with Messages; use Messages;
with Missions; use Missions;
with Ships.Cargo; use Ships.Cargo;
with Ships.Crew; use Ships.Crew;
with Ships.Movement; use Ships.Movement;
with Ships.UI.Crew; use Ships.UI.Crew;
with Ships.UI.Modules; use Ships.UI.Modules;
with Statistics.UI; use Statistics.UI;
package body Utils.UI is
procedure Add_Command
(Name: String; Ada_Command: not null CreateCommands.Tcl_CmdProc) is
Command: Tcl.Tcl_Command;
Steam_Sky_Add_Command_Error: exception;
begin
Tcl_Eval(interp => Get_Context, strng => "info commands " & Name);
if Tcl_GetResult(interp => Get_Context) /= "" then
raise Steam_Sky_Add_Command_Error
with "Command with name " & Name & " exists";
end if;
Command :=
CreateCommands.Tcl_CreateCommand
(interp => Get_Context, cmdName => Name, proc => Ada_Command,
data => 0, deleteProc => null);
if Command = null then
raise Steam_Sky_Add_Command_Error with "Can't add command " & Name;
end if;
end Add_Command;
-- ****o* UUI/UUI.Resize_Canvas_Command
-- PARAMETERS
-- Resize the selected canvas
-- Client_Data - Custom data send to the command. Unused
-- Interp - Tcl interpreter in which command was executed.
-- Argc - Number of arguments passed to the command. Unused
-- Argv - Values of arguments passed to the command.
-- RESULT
-- This function always return TCL_OK
-- COMMANDS
-- ResizeCanvas name width height
-- Name is the name of the canvas to resize, width it a new width, height
-- is a new height
-- SOURCE
function Resize_Canvas_Command
(Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int;
Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int with
Convention => C;
-- ****
function Resize_Canvas_Command
(Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int;
Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int is
pragma Unreferenced(Client_Data, Argc);
Canvas: constant Ttk_Frame :=
Get_Widget
(pathName => CArgv.Arg(Argv => Argv, N => 1), Interp => Interp);
Parent_Frame: Ttk_Frame;
begin
if Winfo_Get(Widgt => Canvas, Info => "exists") = "0" then
return TCL_OK;
end if;
Parent_Frame :=
Get_Widget
(pathName => Winfo_Get(Widgt => Canvas, Info => "parent"),
Interp => Interp);
Unbind(Widgt => Parent_Frame, Sequence => "<Configure>");
Widgets.configure
(Widgt => Canvas,
options =>
"-width " & CArgv.Arg(Argv => Argv, N => 2) & " -height [expr " &
CArgv.Arg(Argv => Argv, N => 3) & " - 20]");
Bind
(Widgt => Parent_Frame, Sequence => "<Configure>",
Script => "{ResizeCanvas %W.canvas %w %h}");
return TCL_OK;
end Resize_Canvas_Command;
-- ****o* UUI/UUI.Check_Amount_Command
-- PARAMETERS
-- Check amount of the item, if it is not below low level warning or if
-- entered amount is a proper number
-- ClientData - Custom data send to the command. Unused
-- Interp - Tcl interpreter in which command was executed.
-- Argc - Number of arguments passed to the command. Unused
-- Argv - Values of arguments passed to the command.
-- RESULT
-- This function always return TCL_OK
-- COMMANDS
-- CheckAmount name cargoindex value
-- Name is the name of spinbox which value will be checked, cargoindex is
-- the index of the item in the cargo
-- SOURCE
function Check_Amount_Command
(Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int;
Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int with
Convention => C;
-- ****
function Check_Amount_Command
(Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int;
Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int is
pragma Unreferenced(Client_Data);
Cargo_Index: constant Natural :=
Natural'Value(CArgv.Arg(Argv => Argv, N => 2));
Warning_Text: Unbounded_String := Null_Unbounded_String;
Amount: Integer := 0;
Label: Ttk_Label :=
Get_Widget(pathName => ".itemdialog.errorlbl", Interp => Interp);
Value: Integer := 0;
Spin_Box: constant Ttk_SpinBox :=
Get_Widget
(pathName => CArgv.Arg(Argv => Argv, N => 1), Interp => Interp);
Max_Value: constant Positive :=
Positive'Value(Widgets.cget(Widgt => Spin_Box, option => "-to"));
begin
if CArgv.Arg(Argv => Argv, N => 3)'Length > 0 then
Check_Argument_Loop :
for Char of CArgv.Arg(Argv => Argv, N => 3) loop
if not Is_Decimal_Digit(Item => Char) then
Tcl_SetResult(interp => Interp, str => "0");
return TCL_OK;
end if;
end loop Check_Argument_Loop;
Value := Integer'Value(CArgv.Arg(Argv => Argv, N => 3));
end if;
if CArgv.Arg(Argv => Argv, N => 1) = ".itemdialog.giveamount" then
Warning_Text :=
To_Unbounded_String
(Source => "You will give amount below low level of ");
else
Warning_Text :=
To_Unbounded_String
(Source =>
"You will " & CArgv.Arg(Argv => Argv, N => 4) &
" amount below low level of ");
end if;
if Value < 1 then
Set(SpinBox => Spin_Box, Value => "1");
Value := 1;
elsif Value > Max_Value then
Set(SpinBox => Spin_Box, Value => Positive'Image(Max_Value));
Value := Max_Value;
end if;
if Argc > 4 then
if CArgv.Arg(Argv => Argv, N => 4) = "take" then
Tcl_SetResult(interp => Interp, str => "1");
return TCL_OK;
elsif CArgv.Arg(Argv => Argv, N => 4) in "buy" | "sell" then
Set_Price_Info_Block :
declare
Cost: Natural :=
Value * Positive'Value(CArgv.Arg(Argv => Argv, N => 5));
begin
Label :=
Get_Widget
(pathName => ".itemdialog.costlbl", Interp => Interp);
Count_Price
(Price => Cost, Trader_Index => FindMember(Order => Talk),
Reduce =>
(if CArgv.Arg(Argv => Argv, N => 4) = "buy" then True
else False));
configure
(Widgt => Label,
options =>
"-text {" &
(if CArgv.Arg(Argv => Argv, N => 4) = "buy" then "Cost:"
else "Gain:") &
Natural'Image(Cost) & " " &
To_String(Source => Money_Name) & "}");
if CArgv.Arg(Argv => Argv, N => 4) = "buy" then
Tcl_SetResult(interp => Interp, str => "1");
return TCL_OK;
end if;
end Set_Price_Info_Block;
end if;
end if;
Label :=
Get_Widget(pathName => ".itemdialog.errorlbl", Interp => Interp);
if Items_List(Player_Ship.Cargo(Cargo_Index).ProtoIndex).IType =
Fuel_Type then
Amount := GetItemAmount(ItemType => Fuel_Type) - Value;
if Amount <= Game_Settings.Low_Fuel then
Widgets.configure
(Widgt => Label,
options =>
"-text {" & To_String(Source => Warning_Text) & "fuel.}");
Tcl.Tk.Ada.Grid.Grid(Slave => Label);
Tcl_SetResult(interp => Interp, str => "1");
return TCL_OK;
end if;
end if;
Check_Food_And_Drinks_Loop :
for Member of Player_Ship.Crew loop
if Factions_List(Member.Faction).DrinksTypes.Contains
(Item =>
Items_List(Player_Ship.Cargo(Cargo_Index).ProtoIndex)
.IType) then
Amount := GetItemsAmount(IType => "Drinks") - Value;
if Amount <= Game_Settings.Low_Drinks then
Widgets.configure
(Widgt => Label,
options =>
"-text {" & To_String(Source => Warning_Text) &
"drinks.}");
Tcl.Tk.Ada.Grid.Grid(Slave => Label);
Tcl_SetResult(interp => Interp, str => "1");
return TCL_OK;
end if;
exit Check_Food_And_Drinks_Loop;
elsif Factions_List(Member.Faction).FoodTypes.Contains
(Item =>
Items_List(Player_Ship.Cargo(Cargo_Index).ProtoIndex)
.IType) then
Amount := GetItemsAmount(IType => "Food") - Value;
if Amount <= Game_Settings.Low_Food then
Widgets.configure
(Widgt => Label,
options =>
"-text {" & To_String(Source => Warning_Text) & "food.}");
Tcl.Tk.Ada.Grid.Grid(Slave => Label);
Tcl_SetResult(interp => Interp, str => "1");
return TCL_OK;
end if;
exit Check_Food_And_Drinks_Loop;
end if;
end loop Check_Food_And_Drinks_Loop;
Tcl.Tk.Ada.Grid.Grid_Remove(Slave => Label);
Tcl_SetResult(interp => Interp, str => "1");
return TCL_OK;
exception
when Constraint_Error =>
Tcl_SetResult(interp => Interp, str => "0");
return TCL_OK;
end Check_Amount_Command;
-- ****o* UUI/UUI.Validate_Amount_Command
-- PARAMETERS
-- Validate amount of the item when button to increase or decrease the
-- amount was pressed
-- ClientData - Custom data send to the command.
-- Interp - Tcl interpreter in which command was executed.
-- Argc - Number of arguments passed to the command.
-- Argv - Values of arguments passed to the command.
-- RESULT
-- This function always return TCL_OK
-- COMMANDS
-- ValidateAmount name
-- Name is the name of spinbox which value will be validated
-- SOURCE
function Validate_Amount_Command
(Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int;
Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int with
Convention => C;
-- ****
function Validate_Amount_Command
(Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int;
Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int is
Spin_Box: constant Ttk_SpinBox :=
Get_Widget
(pathName => CArgv.Arg(Argv => Argv, N => 1), Interp => Interp);
New_Argv: constant CArgv.Chars_Ptr_Ptr :=
(if Argc < 4 then Argv & Get(Widgt => Spin_Box)
elsif Argc = 4 then
CArgv.Empty & CArgv.Arg(Argv => Argv, N => 0) &
CArgv.Arg(Argv => Argv, N => 1) & CArgv.Arg(Argv => Argv, N => 2) &
Get(Widgt => Spin_Box) & CArgv.Arg(Argv => Argv, N => 3)
else CArgv.Empty & CArgv.Arg(Argv => Argv, N => 0) &
CArgv.Arg(Argv => Argv, N => 1) & CArgv.Arg(Argv => Argv, N => 2) &
Get(Widgt => Spin_Box) & CArgv.Arg(Argv => Argv, N => 3) &
CArgv.Arg(Argv => Argv, N => 4));
begin
return
Check_Amount_Command
(Client_Data => Client_Data, Interp => Interp,
Argc => CArgv.Argc(Argv => New_Argv), Argv => New_Argv);
end Validate_Amount_Command;
-- ****o* UUI/UUI.Set_Text_Variable_Command
-- FUNCTION
-- Set the selected Tcl text variable and the proper the Ada its equivalent
-- PARAMETERS
-- ClientData - Custom data send to the command. Unused
-- Interp - Tcl interpreter in which command was executed. Unused
-- Argc - Number of arguments passed to the command. Unused
-- Argv - Values of arguments passed to the command.
-- RESULT
-- This function always return TCL_OK
-- COMMANDS
-- SetTextVariable variablename
-- Variablename is the name of variable to set
-- SOURCE
function Set_Text_Variable_Command
(Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int;
Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int with
Convention => C;
-- ****
function Set_Text_Variable_Command
(Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int;
Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int is
pragma Unreferenced(Client_Data, Argc);
T_Entry: constant Ttk_Entry :=
Get_Widget(pathName => ".getstring.entry", Interp => Interp);
Value: constant String := Get(Widgt => T_Entry);
Var_Name: constant String := CArgv.Arg(Argv => Argv, N => 1);
begin
Tcl_SetVar(interp => Interp, varName => Var_Name, newValue => Value);
if Var_Name = "shipname" then
Player_Ship.Name := To_Unbounded_String(Source => Value);
elsif Var_Name'Length > 10 and then Var_Name(1 .. 10) = "modulename" then
Rename_Module_Block :
declare
Module_Index: constant Positive :=
Positive'Value(Var_Name(11 .. Var_Name'Last));
begin
Player_Ship.Modules(Module_Index).Name :=
To_Unbounded_String(Source => Value);
Tcl_UnsetVar(interp => Interp, varName => Var_Name);
UpdateModulesInfo;
end Rename_Module_Block;
elsif Var_Name'Length > 8 and then Var_Name(1 .. 8) = "crewname" then
Rename_Crew_Member_Block :
declare
Crew_Index: constant Positive :=
Positive'Value(Var_Name(9 .. Var_Name'Last));
begin
Player_Ship.Crew(Crew_Index).Name :=
To_Unbounded_String(Source => Value);
Tcl_UnsetVar(interp => Interp, varName => Var_Name);
UpdateCrewInfo;
end Rename_Crew_Member_Block;
end if;
return TCL_OK;
end Set_Text_Variable_Command;
-- ****o* UUI/UUI.Process_Question_Command
-- FUNCTION
-- Process question from dialog when the player answer Yes there
-- PARAMETERS
-- ClientData - Custom data send to the command. Unused
-- Interp - Tcl interpreter in which command was executed.
-- Argc - Number of arguments passed to the command. Unused
-- Argv - Values of arguments passed to the command.
-- RESULT
-- This function always return TCL_OK
-- COMMANDS
-- ProcessQuestion answer
-- Answer is the answer set for the selected question
-- SOURCE
function Process_Question_Command
(Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int;
Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int with
Convention => C;
-- ****
function Process_Question_Command
(Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int;
Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int is
pragma Unreferenced(Client_Data, Argc);
Result: constant String := CArgv.Arg(Argv => Argv, N => 1);
begin
if Result = "deletesave" then
Delete_File
(Name =>
To_String
(Source =>
Save_Directory &
Tcl_GetVar(interp => Interp, varName => "deletesave")));
Tcl_UnsetVar(interp => Interp, varName => "deletesave");
Tcl_Eval(interp => Interp, strng => "ShowLoadGame");
elsif Result = "sethomebase" then
Set_Home_Base_Block :
declare
Trader_Index: constant Natural := FindMember(Order => Talk);
Price: Positive := 1_000;
Money_Index2: constant Natural :=
FindItem
(Inventory => Player_Ship.Cargo, ProtoIndex => Money_Index);
begin
if Money_Index2 = 0 then
ShowMessage
(Text =>
"You don't have any " & To_String(Source => Money_Name) &
" for change ship home base.",
Title => "No money");
return TCL_OK;
end if;
Count_Price(Price => Price, Trader_Index => Trader_Index);
if Player_Ship.Cargo(Money_Index2).Amount < Price then
ShowMessage
(Text =>
"You don't have enough " &
To_String(Source => Money_Name) &
" for change ship home base.",
Title => "No money");
return TCL_OK;
end if;
Player_Ship.Home_Base :=
SkyMap(Player_Ship.Sky_X, Player_Ship.Sky_Y).BaseIndex;
UpdateCargo
(Ship => Player_Ship, CargoIndex => Money_Index2,
Amount => -Price);
AddMessage
(Message =>
"You changed your ship home base to: " &
To_String(Source => Sky_Bases(Player_Ship.Home_Base).Name),
MType => OtherMessage);
GainExp
(Amount => 1, SkillNumber => Talking_Skill,
CrewIndex => Trader_Index);
Update_Game(Minutes => 10);
ShowSkyMap;
end Set_Home_Base_Block;
elsif Result = "nopilot" then
WaitForRest;
Check_For_Combat_Block :
declare
Starts_Combat: constant Boolean := CheckForEvent;
Message: Unbounded_String := Null_Unbounded_String;
begin
if not Starts_Combat and Game_Settings.Auto_Finish then
Message := To_Unbounded_String(Source => AutoFinishMissions);
end if;
if Message /= Null_Unbounded_String then
ShowMessage
(Text => To_String(Source => Message), Title => "Error");
end if;
CenterX := Player_Ship.Sky_X;
CenterY := Player_Ship.Sky_Y;
if Starts_Combat then
ShowCombatUI;
else
ShowSkyMap;
end if;
end Check_For_Combat_Block;
elsif Result = "quit" then
Game_Settings.Messages_Position :=
Game_Settings.Window_Height -
Natural'Value(SashPos(Paned => Main_Paned, Index => "0"));
End_Game(Save => True);
Show_Main_Menu;
elsif Result = "resign" then
Death
(MemberIndex => 1,
Reason => To_Unbounded_String(Source => "resignation"),
Ship => Player_Ship);
ShowQuestion
(Question =>
"You are dead. Would you like to see your game statistics?",
Result => "showstats");
elsif Result = "showstats" then
Show_Game_Stats_Block :
declare
Button: constant Ttk_Button :=
Get_Widget(pathName => Game_Header & ".menubutton");
begin
Tcl.Tk.Ada.Grid.Grid(Slave => Button);
Widgets.configure
(Widgt => Close_Button, options => "-command ShowMainMenu");
Tcl.Tk.Ada.Grid.Grid
(Slave => Close_Button, Options => "-row 0 -column 1");
Delete(MenuWidget => GameMenu, StartIndex => "3", EndIndex => "4");
Delete
(MenuWidget => GameMenu, StartIndex => "6", EndIndex => "14");
ShowStatistics;
end Show_Game_Stats_Block;
elsif Result = "mainmenu" then
Game_Settings.Messages_Position :=
Game_Settings.Window_Height -
Natural'Value(SashPos(Paned => Main_Paned, Index => "0"));
End_Game(Save => False);
Show_Main_Menu;
elsif Result = "messages" then
Show_Last_Messages_Block :
declare
Type_Box: constant Ttk_ComboBox :=
Get_Widget
(pathName =>
Main_Paned & ".messagesframe.canvas.messages.options.types",
Interp => Get_Context);
begin
ClearMessages;
Current(ComboBox => Type_Box, NewIndex => "0");
Tcl_Eval(interp => Get_Context, strng => "ShowLastMessages");
end Show_Last_Messages_Block;
elsif Result = "retire" then
Death
(MemberIndex => 1,
Reason =>
To_Unbounded_String(Source => "retired after finished the game"),
Ship => Player_Ship);
ShowQuestion
(Question =>
"You are dead. Would you like to see your game statistics?",
Result => "showstats");
else
Dismiss_Member_Block :
declare
Base_Index: constant Positive :=
SkyMap(Player_Ship.Sky_X, Player_Ship.Sky_Y).BaseIndex;
Member_Index: constant Positive :=
Positive'Value(CArgv.Arg(Argv => Argv, N => 1));
begin
AddMessage
(Message =>
"You dismissed " &
To_String(Source => Player_Ship.Crew(Member_Index).Name) &
".",
MType => OrderMessage);
DeleteMember(MemberIndex => Member_Index, Ship => Player_Ship);
Sky_Bases(Base_Index).Population :=
Sky_Bases(Base_Index).Population + 1;
Update_Morale_Loop :
for I in Player_Ship.Crew.Iterate loop
UpdateMorale
(Ship => Player_Ship,
MemberIndex => Crew_Container.To_Index(Position => I),
Value => Get_Random(Min => -5, Max => -1));
end loop Update_Morale_Loop;
UpdateCrewInfo;
UpdateHeader;
Update_Messages;
end Dismiss_Member_Block;
end if;
return TCL_OK;
end Process_Question_Command;
-- ****o* UUI/UUI.Set_Scrollbar_Bindings_Command
-- FUNCTION
-- Assign scrolling events with mouse wheel to the selected vertical
-- scrollbar from the selected widget
-- PARAMETERS
-- ClientData - Custom data send to the command. Unused
-- Interp - Tcl interpreter in which command was executed. Unused
-- Argc - Number of arguments passed to the command. Unused
-- Argv - Values of arguments passed to the command.
-- RESULT
-- This function always return TCL_OK
-- COMMANDS
-- SetScrollbarBindings widget scrollbar
-- Widget is the widget from which events will be fired, scrollbar is
-- Ttk::scrollbar which to which bindings will be added
-- SOURCE
function Set_Scrollbar_Bindings_Command
(Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int;
Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int with
Convention => C;
-- ****
function Set_Scrollbar_Bindings_Command
(Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int;
Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int is
pragma Unreferenced(Client_Data, Argc);
Widget: constant Ttk_Frame :=
Get_Widget
(pathName => CArgv.Arg(Argv => Argv, N => 1), Interp => Interp);
Scrollbar: constant Ttk_Scrollbar :=
Get_Widget
(pathName => CArgv.Arg(Argv => Argv, N => 2), Interp => Interp);
begin
Bind
(Widgt => Widget, Sequence => "<Button-4>",
Script =>
"{if {[winfo ismapped " & Scrollbar & "]} {event generate " &
Scrollbar & " <Button-4>}}");
Bind
(Widgt => Widget, Sequence => "<Key-Prior>",
Script =>
"{if {[winfo ismapped " & Scrollbar & "]} {event generate " &
Scrollbar & " <Button-4>}}");
Bind
(Widgt => Widget, Sequence => "<Button-5>",
Script =>
"{if {[winfo ismapped " & Scrollbar & "]} {event generate " &
Scrollbar & " <Button-5>}}");
Bind
(Widgt => Widget, Sequence => "<Key-Next>",
Script =>
"{if {[winfo ismapped " & Scrollbar & "]} {event generate " &
Scrollbar & " <Button-5>}}");
Bind
(Widgt => Widget, Sequence => "<MouseWheel>",
Script =>
"{if {[winfo ismapped " & Scrollbar & "]} {event generate " &
Scrollbar & " <MouseWheel>}}");
return TCL_OK;
end Set_Scrollbar_Bindings_Command;
function Show_On_Map_Command
(Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int;
Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int is
pragma Unreferenced(Client_Data, Argc);
begin
CenterX := Positive'Value(CArgv.Arg(Argv => Argv, N => 1));
CenterY := Positive'Value(CArgv.Arg(Argv => Argv, N => 2));
Entry_Configure
(MenuWidget => GameMenu, Index => "Help",
Options => "-command {ShowHelp general}");
Tcl_Eval(interp => Interp, strng => "InvokeButton " & Close_Button);
Tcl.Tk.Ada.Grid.Grid_Remove(Slave => Close_Button);
return TCL_OK;
end Show_On_Map_Command;
function Set_Destination_Command
(Client_Data: Integer; Interp: Tcl.Tcl_Interp; Argc: Interfaces.C.int;
Argv: CArgv.Chars_Ptr_Ptr) return Interfaces.C.int is
pragma Unreferenced(Client_Data, Argc);
begin
if Positive'Value(CArgv.Arg(Argv => Argv, N => 1)) =
Player_Ship.Sky_X and
Positive'Value(CArgv.Arg(Argv => Argv, N => 2)) =
Player_Ship.Sky_Y then
ShowMessage
(Text => "You are at this location now.",
Title => "Can't set destination");
return TCL_OK;
end if;
Player_Ship.Destination_X :=
Positive'Value(CArgv.Arg(Argv => Argv, N => 1));
Player_Ship.Destination_Y :=
Positive'Value(CArgv.Arg(Argv => Argv, N => 2));
AddMessage
(Message => "You set the travel destination for your ship.",
MType => OrderMessage);
Entry_Configure
(MenuWidget => GameMenu, Index => "Help",
Options => "-command {ShowHelp general}");
Tcl_Eval(interp => Interp, strng => "InvokeButton " & Close_Button);
Tcl.Tk.Ada.Grid.Grid_Remove(Slave => Close_Button);
return TCL_OK;
end Set_Destination_Command;
procedure Add_Commands is
begin
Add_Command
(Name => "ResizeCanvas", Ada_Command => Resize_Canvas_Command'Access);
Add_Command
(Name => "CheckAmount", Ada_Command => Check_Amount_Command'Access);
Add_Command
(Name => "ValidateAmount",
Ada_Command => Validate_Amount_Command'Access);
Add_Command
(Name => "SetTextVariable",
Ada_Command => Set_Text_Variable_Command'Access);
Add_Command
(Name => "ProcessQuestion",
Ada_Command => Process_Question_Command'Access);
Add_Command
(Name => "SetScrollbarBindings",
Ada_Command => Set_Scrollbar_Bindings_Command'Access);
Add_Command
(Name => "ShowOnMap", Ada_Command => Show_On_Map_Command'Access);
Add_Command
(Name => "SetDestination2",
Ada_Command => Set_Destination_Command'Access);
end Add_Commands;
procedure Minutes_To_Date
(Minutes: Natural; Info_Text: in out Unbounded_String) with
SPARK_Mode
is
Travel_Time: Date_Record := (others => 0);
Minutes_Diff: Integer := Minutes;
begin
Count_Time_Loop :
while Minutes_Diff > 0 loop
pragma Loop_Invariant
(Travel_Time.Year < 4_000_000 and Travel_Time.Month < 13 and
Travel_Time.Day < 32 and Travel_Time.Hour < 24);
case Minutes_Diff is
when 518_401 .. Integer'Last =>
Travel_Time.Year := Travel_Time.Year + 1;
Minutes_Diff := Minutes_Diff - 518_400;
when 43_201 .. 518_400 =>
Travel_Time.Month := Travel_Time.Month + 1;
if Travel_Time.Month > 12 then
Travel_Time.Month := 1;
Travel_Time.Year := Travel_Time.Year + 1;
end if;
Minutes_Diff := Minutes_Diff - 43_200;
when 1_441 .. 43_200 =>
Travel_Time.Day := Travel_Time.Day + 1;
if Travel_Time.Day > 31 then
Travel_Time.Day := 1;
Travel_Time.Month := Travel_Time.Month + 1;
if Travel_Time.Month > 12 then
Travel_Time.Month := 1;
Travel_Time.Year := Travel_Time.Year + 1;
end if;
end if;
Minutes_Diff := Minutes_Diff - 1_440;
when 61 .. 1_440 =>
Travel_Time.Hour := Travel_Time.Hour + 1;
if Travel_Time.Hour > 23 then
Travel_Time.Hour := 0;
Travel_Time.Day := Travel_Time.Day + 1;
if Travel_Time.Day > 31 then
Travel_Time.Day := 1;
Travel_Time.Month := Travel_Time.Month + 1;
if Travel_Time.Month > 12 then
Travel_Time.Month := 1;
Travel_Time.Year := Travel_Time.Year + 1;
end if;
end if;
end if;
Minutes_Diff := Minutes_Diff - 60;
when others =>
Travel_Time.Minutes := Minutes_Diff;
Minutes_Diff := 0;
end case;
exit Count_Time_Loop when Travel_Time.Year = 4_000_000;
end loop Count_Time_Loop;
if Travel_Time.Year > 0
and then Length(Source => Info_Text) <
Natural'Last - (Positive'Image(Travel_Time.Year)'Length + 1) then
Append
(Source => Info_Text,
New_Item => Positive'Image(Travel_Time.Year) & "y");
end if;
if Travel_Time.Month > 0
and then Length(Source => Info_Text) <
Natural'Last - (Positive'Image(Travel_Time.Month)'Length + 1) then
Append
(Source => Info_Text,
New_Item => Positive'Image(Travel_Time.Month) & "m");
end if;
if Travel_Time.Day > 0
and then Length(Source => Info_Text) <
Natural'Last - (Positive'Image(Travel_Time.Day)'Length + 1) then
Append
(Source => Info_Text,
New_Item => Positive'Image(Travel_Time.Day) & "d");
end if;
if Travel_Time.Hour > 0
and then Length(Source => Info_Text) <
Natural'Last - (Positive'Image(Travel_Time.Hour)'Length + 1) then
Append
(Source => Info_Text,
New_Item => Positive'Image(Travel_Time.Hour) & "h");
end if;
if Travel_Time.Minutes > 0
and then Length(Source => Info_Text) <
Natural'Last - (Positive'Image(Travel_Time.Minutes)'Length + 4) then
Append
(Source => Info_Text,
New_Item => Positive'Image(Travel_Time.Minutes) & "mins");
end if;
end Minutes_To_Date;
procedure Travel_Info
(Info_Text: in out Unbounded_String; Distance: Positive;
Show_Fuel_Name: Boolean := False) is
type Speed_Type is digits 2;
Speed: constant Speed_Type :=
Speed_Type(RealSpeed(Ship => Player_Ship, InfoOnly => True)) / 1_000.0;
Minutes_Diff: Integer;
Rests, Cabin_Index, Rest_Time, Tired, Cabin_Bonus, Temp_Time: Natural :=
0;
Damage: Damage_Factor := 0.0;
begin
if Speed = 0.0 then
Append(Source => Info_Text, New_Item => LF & "ETA: Never");
return;
end if;
Minutes_Diff := Integer(100.0 / Speed);
case Player_Ship.Speed is
when QUARTER_SPEED =>
if Minutes_Diff < 60 then
Minutes_Diff := 60;
end if;
when HALF_SPEED =>
if Minutes_Diff < 30 then
Minutes_Diff := 30;
end if;
when FULL_SPEED =>
if Minutes_Diff < 15 then
Minutes_Diff := 15;
end if;
when others =>
null;
end case;
Append(Source => Info_Text, New_Item => LF & "ETA:");
Minutes_Diff := Minutes_Diff * Distance;
Count_Rest_Time_Loop :
for I in Player_Ship.Crew.Iterate loop
if Player_Ship.Crew(I).Order not in Pilot | Engineer then
goto End_Of_Count_Loop;
end if;
Tired := (Minutes_Diff / 15) + Player_Ship.Crew(I).Tired;
if
(Tired /
(80 +
Player_Ship.Crew(I).Attributes(Integer(Condition_Index)).Level)) >
Rests then
Rests :=
(Tired /
(80 +
Player_Ship.Crew(I).Attributes(Integer(Condition_Index))
.Level));
end if;
if Rests > 0 then
Cabin_Index :=
FindCabin(MemberIndex => Crew_Container.To_Index(Position => I));
if Cabin_Index > 0 then
Damage :=
1.0 -
Damage_Factor
(Float(Player_Ship.Modules(Cabin_Index).Durability) /
Float(Player_Ship.Modules(Cabin_Index).Max_Durability));
Cabin_Bonus :=
Player_Ship.Modules(Cabin_Index).Cleanliness -
Natural
(Float(Player_Ship.Modules(Cabin_Index).Cleanliness) *
Float(Damage));
if Cabin_Bonus = 0 then
Cabin_Bonus := 1;
end if;
Temp_Time :=
((80 +
Player_Ship.Crew(I).Attributes(Integer(Condition_Index))
.Level) /
Cabin_Bonus) *
15;
if Temp_Time = 0 then
Temp_Time := 15;
end if;
else
Temp_Time :=
(80 +
Player_Ship.Crew(I).Attributes(Integer(Condition_Index))
.Level) *
15;
end if;
Temp_Time := Temp_Time + 15;
if Temp_Time > Rest_Time then
Rest_Time := Temp_Time;
end if;
end if;
<<End_Of_Count_Loop>>
end loop Count_Rest_Time_Loop;
Minutes_Diff := Minutes_Diff + (Rests * Rest_Time);
Minutes_To_Date(Minutes => Minutes_Diff, Info_Text => Info_Text);
Append
(Source => Info_Text,
New_Item =>
LF & "Approx fuel usage:" &
Natural'Image
(abs (Distance * CountFuelNeeded) + (Rests * (Rest_Time / 10))) &
" ");
if Show_Fuel_Name then
Append
(Source => Info_Text,
New_Item => Items_List(FindProtoItem(ItemType => Fuel_Type)).Name);
end if;
end Travel_Info;
procedure Update_Messages with
SPARK_Mode
is
Loop_Start: Integer := 0 - MessagesAmount;
Message: Message_Data;
Tag_Names: constant array(1 .. 5) of Unbounded_String :=
(1 => To_Unbounded_String(Source => "yellow"),
2 => To_Unbounded_String(Source => "green"),
3 => To_Unbounded_String(Source => "red"),
4 => To_Unbounded_String(Source => "blue"),
5 => To_Unbounded_String(Source => "cyan"));
Messages_View: constant Tk_Text :=
Get_Widget(pathName => ".gameframe.paned.controls.messages.view");
procedure Show_Message is
begin
if Message.Color = WHITE then
Insert
(TextWidget => Messages_View, Index => "end",
Text => "{" & To_String(Source => Message.Message) & "}");
else
Insert
(TextWidget => Messages_View, Index => "end",
Text =>
"{" & To_String(Source => Message.Message) & "} [list " &
To_String
(Source => Tag_Names(Message_Color'Pos(Message.Color))) &
"]");
end if;
end Show_Message;
begin
Tcl.Tk.Ada.Widgets.configure
(Widgt => Messages_View, options => "-state normal");
Delete
(TextWidget => Messages_View, StartIndex => "1.0", Indexes => "end");
if Loop_Start = 0 then
return;
end if;
if Loop_Start < -10 then
Loop_Start := -10;
end if;
if Game_Settings.Messages_Order = OLDER_FIRST then
Show_Older_First_Loop :
for I in Loop_Start .. -1 loop
Message := GetMessage(MessageIndex => I + 1);
Show_Message;
if I < -1 then
Insert
(TextWidget => Messages_View, Index => "end",
Text => "{" & LF & "}");
end if;
end loop Show_Older_First_Loop;
Tcl_Eval(interp => Get_Context, strng => "update");
See(TextWidget => Messages_View, Index => "end");
else
Show_Newer_First_Loop :
for I in reverse Loop_Start .. -1 loop
Message := GetMessage(MessageIndex => I + 1);
Show_Message;
if I > Loop_Start then
Insert
(TextWidget => Messages_View, Index => "end",
Text => "{" & LF & "}");
end if;
end loop Show_Newer_First_Loop;
end if;
Tcl.Tk.Ada.Widgets.configure
(Widgt => Messages_View, options => "-state disable");
end Update_Messages;
procedure Show_Screen(New_Screen_Name: String) with
SPARK_Mode
is
Sub_Window, Old_Sub_Window: Ttk_Frame;
Sub_Windows: Unbounded_String;
Messages_Frame: constant Ttk_Frame :=
Get_Widget(pathName => Main_Paned & ".controls.messages");
Paned: constant Ttk_PanedWindow :=
Get_Widget(pathName => Main_Paned & ".controls.buttons");
begin
Sub_Windows := To_Unbounded_String(Source => Panes(Paned => Main_Paned));
Old_Sub_Window :=
(if Index(Source => Sub_Windows, Pattern => " ") = 0 then
Get_Widget(pathName => To_String(Source => Sub_Windows))
else Get_Widget
(pathName =>
Slice
(Source => Sub_Windows, Low => 1,
High => Index(Source => Sub_Windows, Pattern => " "))));
Forget(Paned => Main_Paned, SubWindow => Old_Sub_Window);
Sub_Window.Name :=
New_String(Str => ".gameframe.paned." & New_Screen_Name);
Insert
(Paned => Main_Paned, Position => "0", SubWindow => Sub_Window,
Options => "-weight 1");
if New_Screen_Name in "optionsframe" | "messagesframe" or
not Game_Settings.Show_Last_Messages then
Tcl.Tk.Ada.Grid.Grid_Remove(Slave => Messages_Frame);
if New_Screen_Name /= "mapframe" then
SashPos
(Paned => Main_Paned, Index => "0",
NewPos => Winfo_Get(Widgt => Main_Paned, Info => "height"));
end if;
else
if Trim
(Source => Widget_Image(Win => Old_Sub_Window), Side => Both) in
Main_Paned & ".messagesframe" | Main_Paned & ".optionsframe" then
SashPos
(Paned => Main_Paned, Index => "0",
NewPos =>
Natural'Image
(Game_Settings.Window_Height -
Game_Settings.Messages_Position));
end if;
Tcl.Tk.Ada.Grid.Grid(Slave => Messages_Frame);
end if;
if New_Screen_Name = "mapframe" then
Tcl.Tk.Ada.Grid.Grid(Slave => Paned);
else
Tcl.Tk.Ada.Grid.Grid_Remove(Slave => Paned);
end if;
end Show_Screen;
procedure Show_Inventory_Item_Info
(Parent: String; Item_Index: Positive; Member_Index: Natural) is
Proto_Index, Item_Info: Unbounded_String;
Item_Types: constant array(1 .. 6) of Unbounded_String :=
(1 => Weapon_Type, 2 => Chest_Armor, 3 => Head_Armor, 4 => Arms_Armor,
5 => Legs_Armor, 6 => Shield_Type);
use Tiny_String;
begin
if Member_Index > 0 then
Proto_Index :=
Player_Ship.Crew(Member_Index).Inventory(Item_Index).ProtoIndex;
if Player_Ship.Crew(Member_Index).Inventory(Item_Index).Durability <
Default_Item_Durability then
Append
(Source => Item_Info,
New_Item =>
GetItemDamage
(ItemDurability =>
Player_Ship.Crew(Member_Index).Inventory(Item_Index)
.Durability) &
LF);
end if;
else
Proto_Index := Player_Ship.Cargo(Item_Index).ProtoIndex;
if Player_Ship.Cargo(Item_Index).Durability <
Default_Item_Durability then
Append
(Source => Item_Info,
New_Item =>
GetItemDamage
(ItemDurability =>
Player_Ship.Cargo(Item_Index).Durability) &
LF);
end if;
end if;
Append
(Source => Item_Info,
New_Item =>
"Weight:" & Positive'Image(Items_List(Proto_Index).Weight) & " kg");
if Items_List(Proto_Index).IType = Weapon_Type then
Append
(Source => Item_Info,
New_Item =>
LF & "Skill: " &
To_String
(Source =>
SkillsData_Container.Element
(Container => Skills_List,
Index => Items_List(Proto_Index).Value(3))
.Name) &
"/" &
To_String
(Source =>
AttributesData_Container.Element
(Container => Attributes_List,
Index =>
(SkillsData_Container.Element
(Container => Skills_List,
Index => Items_List(Proto_Index).Value(3))
.Attribute))
.Name));
if Items_List(Proto_Index).Value(4) = 1 then
Append
(Source => Item_Info,
New_Item => LF & "Can be used with shield.");
else
Append
(Source => Item_Info,
New_Item =>
LF & "Can't be used with shield (two-handed weapon).");
end if;
Append
(Source => Item_Info,
New_Item =>
LF & "Damage type: " &
(case Items_List(Proto_Index).Value(5) is when 1 => "cutting",
when 2 => "impaling", when 3 => "blunt", when others => ""));
end if;
Show_More_Item_Info_Loop :
for ItemType of Item_Types loop
if Items_List(Proto_Index).IType = ItemType then
Append
(Source => Item_Info,
New_Item =>
LF & "Damage chance: " & LF & "Strength:" &
Integer'Image(Items_List(Proto_Index).Value(2)));
exit Show_More_Item_Info_Loop;
end if;
end loop Show_More_Item_Info_Loop;
if Tools_List.Contains(Item => Items_List(Proto_Index).IType) then
Append
(Source => Item_Info,
New_Item =>
LF & "Damage chance: " &
GetItemChanceToDamage
(ItemData => Items_List(Proto_Index).Value(1)));
end if;
if Length(Source => Items_List(Proto_Index).IType) > 4
and then
(Slice(Source => Items_List(Proto_Index).IType, Low => 1, High => 4) =
"Ammo" or
Items_List(Proto_Index).IType =
To_Unbounded_String(Source => "Harpoon")) then
Append
(Source => Item_Info,
New_Item =>
LF & "Strength:" &
Integer'Image(Items_List(Proto_Index).Value(1)));
end if;
if Items_List(Proto_Index).Description /= Null_Unbounded_String then
Append
(Source => Item_Info,
New_Item =>
LF & LF &
To_String(Source => Items_List(Proto_Index).Description));
end if;
if Parent = "." then
ShowInfo
(Text => To_String(Source => Item_Info),
Title =>
(if Member_Index > 0 then
GetItemName
(Item =>
Player_Ship.Crew(Member_Index).Inventory(Item_Index),
DamageInfo => False, ToLower => False)
else GetItemName
(Item => Player_Ship.Cargo(Item_Index), DamageInfo => False,
ToLower => False)));
else
ShowInfo
(Text => To_String(Source => Item_Info), ParentName => Parent,
Title =>
(if Member_Index > 0 then
GetItemName
(Item =>
Player_Ship.Crew(Member_Index).Inventory(Item_Index),
DamageInfo => False, ToLower => False)
else GetItemName
(Item => Player_Ship.Cargo(Item_Index), DamageInfo => False,
ToLower => False)));
end if;
end Show_Inventory_Item_Info;
procedure Delete_Widgets
(Start_Index, End_Index: Integer; Frame: Tk_Widget'Class) with
SPARK_Mode
is
Tokens: Slice_Set;
Item: Ttk_Frame;
begin
if End_Index < Start_Index then
return;
end if;
Delete_Widgets_Loop :
for I in Start_Index .. End_Index loop
Create
(S => Tokens,
From =>
Tcl.Tk.Ada.Grid.Grid_Slaves
(Master => Frame, Option => "-row" & Positive'Image(I)),
Separators => " ");
Delete_Row_Loop :
for J in 1 .. Slice_Count(S => Tokens) loop
Item := Get_Widget(pathName => Slice(S => Tokens, Index => J));
Destroy(Widgt => Item);
end loop Delete_Row_Loop;
end loop Delete_Widgets_Loop;
end Delete_Widgets;
function Get_Skill_Marks
(Skill_Index: Skills_Amount_Range; Member_Index: Positive)
return String is
Skill_Value, Crew_Index: Natural := 0;
Skill_String: Unbounded_String := Null_Unbounded_String;
begin
Get_Highest_Skills_Loop :
for I in Player_Ship.Crew.First_Index .. Player_Ship.Crew.Last_Index loop
if GetSkillLevel
(Member => Player_Ship.Crew(I), SkillIndex => Skill_Index) >
Skill_Value then
Crew_Index := I;
Skill_Value :=
GetSkillLevel
(Member => Player_Ship.Crew(I), SkillIndex => Skill_Index);
end if;
end loop Get_Highest_Skills_Loop;
if GetSkillLevel
(Member => Player_Ship.Crew(Member_Index),
SkillIndex => Skill_Index) >
0 then
Skill_String := To_Unbounded_String(Source => " +");
end if;
if Member_Index = Crew_Index then
Skill_String := Skill_String & To_Unbounded_String(Source => "+");
end if;
return To_String(Source => Skill_String);
end Get_Skill_Marks;
end Utils.UI;
| 39.697561
| 79
| 0.56828
|
59792fdcb1ebc65c39c6d1d4ccbf8a97415abce3
| 463
|
adb
|
Ada
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/discr25_pkg.adb
|
best08618/asylo
|
5a520a9f5c461ede0f32acc284017b737a43898c
|
[
"Apache-2.0"
] | 7
|
2020-05-02T17:34:05.000Z
|
2021-10-17T10:15:18.000Z
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/discr25_pkg.adb
|
best08618/asylo
|
5a520a9f5c461ede0f32acc284017b737a43898c
|
[
"Apache-2.0"
] | null | null | null |
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/discr25_pkg.adb
|
best08618/asylo
|
5a520a9f5c461ede0f32acc284017b737a43898c
|
[
"Apache-2.0"
] | 2
|
2020-07-27T00:22:36.000Z
|
2021-04-01T09:41:02.000Z
|
package body Discr25_Pkg is
type Arr1 is array (Natural range <>) of Integer;
B : constant Boolean := N > 0;
type Arr2 is array (True .. B) of Integer;
type Obj_T (Size_Max : Natural) is record
A2 : Arr2;
A1 : Arr1 (0 .. Size_Max);
end record;
procedure Proc1 (Set : in out T) is
begin
Set := new Obj_T'(Set.all);
end;
procedure Proc2 (Obj : in out T; L : Natural) is
begin
Obj := new Obj_T (L);
end;
end Discr25_Pkg;
| 18.52
| 51
| 0.617711
|
5ebee358d5fce61e152fddb07a8e4af184cae599
| 2,511
|
ada
|
Ada
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c3/c35a02a.ada
|
best08618/asylo
|
5a520a9f5c461ede0f32acc284017b737a43898c
|
[
"Apache-2.0"
] | 7
|
2020-05-02T17:34:05.000Z
|
2021-10-17T10:15:18.000Z
|
llvm-gcc-4.2-2.9/gcc/testsuite/ada/acats/tests/c3/c35a02a.ada
|
vidkidz/crossbridge
|
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
|
[
"MIT"
] | null | null | null |
llvm-gcc-4.2-2.9/gcc/testsuite/ada/acats/tests/c3/c35a02a.ada
|
vidkidz/crossbridge
|
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
|
[
"MIT"
] | 2
|
2020-07-27T00:22:36.000Z
|
2021-04-01T09:41:02.000Z
|
-- C35A02A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- CHECK THAT T'DELTA YIELDS CORRECT VALUES FOR SUBTYPE T.
-- RJW 2/27/86
WITH REPORT; USE REPORT;
PROCEDURE C35A02A IS
BEGIN
TEST ( "C35A02A", "CHECK THAT T'DELTA YIELDS CORRECT VALUES " &
"FOR SUBTYPE T" );
DECLARE
D : CONSTANT := 0.125;
SD : CONSTANT := 1.0;
TYPE VOLT IS DELTA D RANGE 0.0 .. 255.0;
SUBTYPE ROUGH_VOLTAGE IS VOLT DELTA SD;
GENERIC
TYPE FIXED IS DELTA <> ;
FUNCTION F RETURN FIXED;
FUNCTION F RETURN FIXED IS
BEGIN
RETURN FIXED'DELTA;
END F;
FUNCTION VF IS NEW F (VOLT);
FUNCTION RF IS NEW F (ROUGH_VOLTAGE);
BEGIN
IF VOLT'DELTA /= D THEN
FAILED ( "INCORRECT VALUE FOR VOLT'DELTA" );
END IF;
IF ROUGH_VOLTAGE'DELTA /= SD THEN
FAILED ( "INCORRECT VALUE FOR ROUGH_VOLTAGE'DELTA" );
END IF;
IF VF /= D THEN
FAILED ( "INCORRECT VALUE FOR VF" );
END IF;
IF RF /= SD THEN
FAILED ( "INCORRECT VALUE FOR RF" );
END IF;
END;
RESULT;
END C35A02A;
| 33.039474
| 79
| 0.582636
|
c89e0925ef6aaa5a4ee74399bdc6fd06a4d27c86
| 144
|
ads
|
Ada
|
1-base/math/source/precision/float/pure/float_math-arithmetic.ads
|
charlie5/lace
|
e9b7dc751d500ff3f559617a6fc3089ace9dc134
|
[
"0BSD"
] | 20
|
2015-11-04T09:23:59.000Z
|
2022-01-14T10:21:42.000Z
|
1-base/math/source/precision/float/pure/float_math-arithmetic.ads
|
charlie5/lace-alire
|
9ace9682cf4daac7adb9f980c2868d6225b8111c
|
[
"0BSD"
] | 2
|
2015-11-04T17:05:56.000Z
|
2015-12-08T03:16:13.000Z
|
1-base/math/source/precision/float/pure/float_math-arithmetic.ads
|
charlie5/lace-alire
|
9ace9682cf4daac7adb9f980c2868d6225b8111c
|
[
"0BSD"
] | 1
|
2015-12-07T12:53:52.000Z
|
2015-12-07T12:53:52.000Z
|
with
any_Math.any_Arithmetic;
package float_Math.Arithmetic is new float_Math.any_Arithmetic;
pragma Pure (float_Math.Arithmetic);
| 18
| 68
| 0.777778
|
92a3a02404cf94405735913f27ea8780887bb807
| 482
|
ads
|
Ada
|
src/rejuvenation-indentation.ads
|
TNO/Rejuvenation-Ada
|
8113ec28da3923ccde40d76cbab70e0e614f4b75
|
[
"BSD-3-Clause"
] | 1
|
2022-03-08T13:00:47.000Z
|
2022-03-08T13:00:47.000Z
|
src/rejuvenation-indentation.ads
|
TNO/Rejuvenation-Ada
|
8113ec28da3923ccde40d76cbab70e0e614f4b75
|
[
"BSD-3-Clause"
] | null | null | null |
src/rejuvenation-indentation.ads
|
TNO/Rejuvenation-Ada
|
8113ec28da3923ccde40d76cbab70e0e614f4b75
|
[
"BSD-3-Clause"
] | null | null | null |
package Rejuvenation.Indentation is
No_Indentation : constant Integer := -1;
function Indentation_Of_Node (Node : Ada_Node'Class) return Integer;
-- Note: No_Indentation signals that another non-white-space element
-- is earlier on the same line
function Node_On_Separate_Lines (Node : Ada_Node'Class) return Boolean;
-- Is Node on separate lines defined.
-- Useful for line-based pretty printing (e.g. offered by gnatpp).
end Rejuvenation.Indentation;
| 34.428571
| 74
| 0.746888
|
92ce116e61502729510335d3e41ab2f4d5c70479
| 4,583
|
ads
|
Ada
|
src/libriscv.ads
|
Fabien-Chouteau/libriscv
|
eed3ddf24a9682a95f9d315650b753577853eb92
|
[
"BSD-3-Clause"
] | null | null | null |
src/libriscv.ads
|
Fabien-Chouteau/libriscv
|
eed3ddf24a9682a95f9d315650b753577853eb92
|
[
"BSD-3-Clause"
] | null | null | null |
src/libriscv.ads
|
Fabien-Chouteau/libriscv
|
eed3ddf24a9682a95f9d315650b753577853eb92
|
[
"BSD-3-Clause"
] | null | null | null |
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2019, Fabien Chouteau --
-- --
-- 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. Neither the name of the copyright holder 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 --
-- HOLDER 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. --
-- --
------------------------------------------------------------------------------
with ESF;
package LibRISCV is
XLEN : constant := 32;
type Byte is mod 2 ** 8
with Size => 8;
type Halfword is mod 2 ** 16
with Size => 16;
type Word is mod 2 ** 32
with Size => 32;
type Dword is mod 2 ** 64
with Size => 64;
type U_Register is mod 2 ** XLEN
with Size => XLEN;
-- Unsigned representation of an XLEN register
type S_Register is range -(2 ** (XLEN - 1)) .. (2 ** (XLEN - 1)) - 1
with Size => XLEN;
-- Signed representation of an XLEN register
type Register (Signed : Boolean := False) is record
case Signed is
when True => S : S_Register;
when False => U : U_Register;
end case;
end record
with
Pack, Size => XLEN,
Unchecked_Union;
subtype Address is U_Register;
type GPR_Id is mod 2 ** 5
with Size => 5;
function Img (Id : GPR_Id) return String;
function Sign_Extend (Value : Byte) return U_Register;
function Sign_Extend (Value : Halfword) return U_Register;
function Sign_Extend (Value : Word) return U_Register;
function Shift_Right (Value : Byte; Amount : Natural) return Byte;
function Shift_Right (Value : Halfword; Amount : Natural) return Halfword;
function Shift_Right (Value : Word; Amount : Natural) return Word;
function Shift_Right (Value : U_Register; Amount : Natural)
return U_Register;
function Shift_Right_Arithmetic (Value : U_Register; Amount : Natural)
return U_Register;
function Shift_Left (Value : Byte; Amount : Natural) return Byte;
function Shift_Left (Value : Halfword; Amount : Natural) return Halfword;
function Shift_Left (Value : Word; Amount : Natural) return Word;
function Shift_Left (Value : U_Register; Amount : Natural)
return U_Register;
pragma Import (Intrinsic, Shift_Right);
pragma Import (Intrinsic, Shift_Right_Arithmetic);
pragma Import (Intrinsic, Shift_Left);
function Hex is new ESF.Hex_Image (Byte);
function Hex is new ESF.Hex_Image (Halfword);
function Hex is new ESF.Hex_Image (Word);
function Hex is new ESF.Hex_Image (U_Register);
end LibRISCV;
| 44.067308
| 78
| 0.573205
|
5dcf0482e176a0befb12b007356f83377bdaaff9
| 877
|
ada
|
Ada
|
Task/Closures-Value-capture/Ada/closures-value-capture.ada
|
LaudateCorpus1/RosettaCodeData
|
9ad63ea473a958506c041077f1d810c0c7c8c18d
|
[
"Info-ZIP"
] | 1
|
2018-11-09T22:08:38.000Z
|
2018-11-09T22:08:38.000Z
|
Task/Closures-Value-capture/Ada/closures-value-capture.ada
|
seanwallawalla-forks/RosettaCodeData
|
9ad63ea473a958506c041077f1d810c0c7c8c18d
|
[
"Info-ZIP"
] | null | null | null |
Task/Closures-Value-capture/Ada/closures-value-capture.ada
|
seanwallawalla-forks/RosettaCodeData
|
9ad63ea473a958506c041077f1d810c0c7c8c18d
|
[
"Info-ZIP"
] | 1
|
2018-11-09T22:08:40.000Z
|
2018-11-09T22:08:40.000Z
|
with Ada.Text_IO;
procedure Value_Capture is
protected type Fun is -- declaration of the type of a protected object
entry Init(Index: Natural);
function Result return Natural;
private
N: Natural := 0;
end Fun;
protected body Fun is -- the implementation of a protected object
entry Init(Index: Natural) when N=0 is
begin -- after N has been set to a nonzero value, it cannot be changed any more
N := Index;
end Init;
function Result return Natural is (N*N);
end Fun;
A: array (1 .. 10) of Fun; -- an array holding 10 protected objects
begin
for I in A'Range loop -- initialize the protected objects
A(I).Init(I);
end loop;
for I in A'First .. A'Last-1 loop -- evaluate the functions, except for the last
Ada.Text_IO.Put(Integer'Image(A(I).Result));
end loop;
end Value_Capture;
| 28.290323
| 85
| 0.661345
|
079a1cf59e74c95a572f72dca5af9d6dcdd0d8ce
| 4,274
|
adb
|
Ada
|
demo/adainclude/s-textio.adb
|
e3l6/SSMDev
|
2929757aab3842aefd84debb2d7c3e8b28c2b340
|
[
"MIT"
] | null | null | null |
demo/adainclude/s-textio.adb
|
e3l6/SSMDev
|
2929757aab3842aefd84debb2d7c3e8b28c2b340
|
[
"MIT"
] | null | null | null |
demo/adainclude/s-textio.adb
|
e3l6/SSMDev
|
2929757aab3842aefd84debb2d7c3e8b28c2b340
|
[
"MIT"
] | null | null | null |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . T E X T _ I O --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- Minimal version of Text_IO body for use on STM32F4xxx, using USART1
with Interfaces; use Interfaces;
package body System.Text_IO is
USART1_Base : constant := 16#4001_1000#;
type USART_Registers is record
SR : Unsigned_16; -- USART Status register
Reserved_0 : Unsigned_16;
DR : Unsigned_16; -- USART Data register
Reserved_1 : Unsigned_16;
BRR : Unsigned_16; -- USART Baud rate register
Reserved_2 : Unsigned_16;
CR1 : Unsigned_16; -- USART Control register 1
Reserved_3 : Unsigned_16;
CR2 : Unsigned_16; -- USART Control register 2
Reserved_4 : Unsigned_16;
CR3 : Unsigned_16; -- USART Control register 3
Reserved_5 : Unsigned_16;
GTPR : Unsigned_16; -- USART Guard time and prescaler register
Reserved_6 : Unsigned_16;
end record;
USART1 : USART_Registers;
for USART1'Address use USART1_Base;
pragma Volatile (USART1);
TX_Ready : constant := 2**6;
RX_Ready : constant := 2**5;
---------
-- Get --
---------
function Get return Character is (Character'Val (USART1.DR and 16#FF#));
----------------
-- Initialize --
----------------
procedure Initialize is
begin
Initialized := True;
end Initialize;
-----------------
-- Is_Tx_Ready --
-----------------
function Is_Tx_Ready return Boolean is ((USART1.SR and TX_Ready) /= 0);
-----------------
-- Is_Rx_Ready --
-----------------
function Is_Rx_Ready return Boolean is ((USART1.SR and RX_Ready) /= 0);
---------
-- Put --
---------
procedure Put (C : Character) is
begin
USART1.DR := Character'Pos (C);
end Put;
----------------------------
-- Use_Cr_Lf_For_New_Line --
----------------------------
function Use_Cr_Lf_For_New_Line return Boolean is (True);
end System.Text_IO;
| 40.320755
| 78
| 0.415536
|
f05330a34123d6d4e243cc0043f27ee5e10eb2fb
| 5,432
|
ada
|
Ada
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/ce/ce2402a.ada
|
best08618/asylo
|
5a520a9f5c461ede0f32acc284017b737a43898c
|
[
"Apache-2.0"
] | 7
|
2020-05-02T17:34:05.000Z
|
2021-10-17T10:15:18.000Z
|
llvm-gcc-4.2-2.9/gcc/testsuite/ada/acats/tests/ce/ce2402a.ada
|
vidkidz/crossbridge
|
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
|
[
"MIT"
] | null | null | null |
llvm-gcc-4.2-2.9/gcc/testsuite/ada/acats/tests/ce/ce2402a.ada
|
vidkidz/crossbridge
|
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
|
[
"MIT"
] | 2
|
2020-07-27T00:22:36.000Z
|
2021-04-01T09:41:02.000Z
|
-- CE2402A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- OBJECTIVE:
-- CHECK THAT READ, WRITE, INDEX, SET_INDEX, SIZE, AND
-- END_OF_FILE RAISE STATUS_ERROR WHEN APPLIED TO A NON-OPEN
-- DIRECT FILE. USE_ERROR IS NOT PERMITTED.
-- HISTORY:
-- ABW 08/17/82
-- SPS 09/16/82
-- SPS 11/09/82
-- JBG 08/30/83
-- EG 11/26/84
-- EG 06/04/85
-- GMT 08/03/87 CLARIFIED SOME OF THE FAILED MESSAGES, AND
-- REMOVED THE EXCEPTION FOR CONSTRAINT_ERROR.
WITH REPORT; USE REPORT;
WITH DIRECT_IO;
PROCEDURE CE2402A IS
PACKAGE DIR IS NEW DIRECT_IO (INTEGER);
USE DIR;
FILE1 : FILE_TYPE;
CNST : CONSTANT INTEGER := 101;
IVAL : INTEGER;
BOOL : BOOLEAN;
X_COUNT : COUNT;
P_COUNT : POSITIVE_COUNT;
BEGIN
TEST ("CE2402A","CHECK THAT READ, WRITE, INDEX, " &
"SET_INDEX, SIZE, AND END_OF_FILE " &
"RAISE STATUS_ERROR WHEN APPLIED " &
"A NON-OPEN DIRECT FILE");
BEGIN
WRITE (FILE1, CNST);
FAILED ("STATUS_ERROR WAS NOT RAISED ON WRITE - 1");
EXCEPTION
WHEN STATUS_ERROR =>
NULL;
WHEN USE_ERROR =>
FAILED ("USE_ERROR RAISED ON WRITE - 2");
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED ON WRITE - 3");
END;
BEGIN
X_COUNT := SIZE (FILE1);
FAILED ("STATUS_ERROR NOT RAISED ON SIZE - 4");
EXCEPTION
WHEN STATUS_ERROR =>
NULL;
WHEN USE_ERROR =>
FAILED ("USE_ERROR RAISED ON SIZE - 5");
WHEN OTHERS =>
FAILED ("UNEXPECTED EXCEPTION RAISED ON SIZE - 6");
END;
BEGIN
BOOL := END_OF_FILE (FILE1);
FAILED ("STATUS_ERROR WAS NOT RAISED ON END_OF_FILE - 7");
EXCEPTION
WHEN STATUS_ERROR =>
NULL;
WHEN USE_ERROR =>
FAILED ("USE_ERROR RAISED ON END_OF_FILE - 8");
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED ON END_OF_FILE - 9");
END;
BEGIN
P_COUNT := INDEX (FILE1);
FAILED ("STATUS_ERROR WAS NOT RAISED ON INDEX - 10");
EXCEPTION
WHEN STATUS_ERROR =>
NULL;
WHEN USE_ERROR =>
FAILED ("USE_ERROR RAISED ON INDEX - 11");
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED ON INDEX - 12");
END;
BEGIN
READ (FILE1, IVAL);
FAILED ("STATUS_ERROR WAS NOT RAISED ON READ - 13");
EXCEPTION
WHEN STATUS_ERROR =>
NULL;
WHEN USE_ERROR =>
FAILED ("USE_ERROR RAISED ON READ - 14");
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED ON READ - 15");
END;
DECLARE
ONE : POSITIVE_COUNT := POSITIVE_COUNT (IDENT_INT(1));
BEGIN
BEGIN
WRITE (FILE1, CNST, ONE);
FAILED ("STATUS_ERROR NOT RAISED ON WRITE - 16");
EXCEPTION
WHEN STATUS_ERROR =>
NULL;
WHEN USE_ERROR =>
FAILED ("USE_ERROR RAISED ON WRITE - 17");
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED ON WRITE - 18");
END;
BEGIN
SET_INDEX (FILE1,ONE);
FAILED ("STATUS_ERROR NOT RAISED ON SET_INDEX - 19");
EXCEPTION
WHEN STATUS_ERROR =>
NULL;
WHEN USE_ERROR =>
FAILED ("USE_ERROR RAISED ON SET_INDEX - 20");
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED ON SET_INDEX - 21");
END;
BEGIN
READ (FILE1, IVAL, ONE);
FAILED ("STATUS_ERROR WAS NOT RAISED ON READ - 22");
EXCEPTION
WHEN STATUS_ERROR =>
NULL;
WHEN USE_ERROR =>
FAILED ("USE_ERROR RAISED ON READ - 23");
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED ON READ - 24");
END;
END;
RESULT;
END CE2402A;
| 33.530864
| 79
| 0.541421
|
e58878f96b14df989e67c812244a1de2115a3d01
| 3,856
|
ads
|
Ada
|
3-mid/opengl/private/freetype/source/thin/freetype_c.ads
|
charlie5/lace-alire
|
9ace9682cf4daac7adb9f980c2868d6225b8111c
|
[
"0BSD"
] | 1
|
2022-01-20T07:13:42.000Z
|
2022-01-20T07:13:42.000Z
|
3-mid/opengl/private/freetype/source/thin/freetype_c.ads
|
charlie5/lace-alire
|
9ace9682cf4daac7adb9f980c2868d6225b8111c
|
[
"0BSD"
] | null | null | null |
3-mid/opengl/private/freetype/source/thin/freetype_c.ads
|
charlie5/lace-alire
|
9ace9682cf4daac7adb9f980c2868d6225b8111c
|
[
"0BSD"
] | null | null | null |
with
interfaces.C,
System;
package Freetype_C
--
-- Provides core types for the Freetype C library.
--
is
use Interfaces;
-- FT_UShort
--
subtype FT_UShort is C.unsigned_short;
type FT_UShort_array is array (C.Size_t range <>) of aliased FT_UShort;
-- FT_Int
--
subtype FT_Int is C.int;
type FT_Int_array is array (C.Size_t range <>) of aliased FT_Int;
-- FT_UInt
--
subtype FT_UInt is C.unsigned;
type FT_UInt_array is array (C.Size_t range <>) of aliased FT_UInt;
-- FT_Long
--
subtype FT_Long is C.long;
type FT_Long_array is array (C.Size_t range <>) of aliased FT_Long;
-- FT_ULong
--
subtype FT_ULong is C.unsigned_long;
type FT_ULong_array is array (C.Size_t range <>) of aliased FT_ULong;
-- FT_Fixed
--
subtype FT_Fixed is C.long;
type FT_Fixed_array is array (C.Size_t range <>) of aliased FT_Fixed;
-- FT_Pos
--
subtype FT_Pos is C.long;
type FT_Pos_array is array (C.Size_t range <>) of aliased FT_Pos;
-- FT_Error
--
subtype FT_Error is C.int;
type FT_Error_array is array (C.Size_t range <>) of aliased FT_Error;
-- FT_Encoding
--
subtype FT_Encoding is C.unsigned;
type FT_Encoding_array is array (C.Size_t range <>) of aliased FT_Encoding;
-- FT_F26Dot6
--
subtype FT_F26Dot6 is C.long;
type FT_F26Dot6_array is array (C.Size_t range <>) of aliased FT_F26Dot6;
-- FT_Int32
--
subtype FT_Int32 is C.int;
type FT_Int32_array is array (C.Size_t range <>) of aliased FT_Int32;
-- FT_UInt32
--
subtype FT_UInt32 is C.unsigned;
type FT_UInt32_array is array (C.Size_t range <>) of aliased FT_UInt32;
-- FT_Render_Mode
--
type FT_Render_Mode is (FT_RENDER_MODE_NORMAL,
FT_RENDER_MODE_LIGHT,
FT_RENDER_MODE_MONO,
FT_RENDER_MODE_LCD,
FT_RENDER_MODE_LCD_V,
FT_RENDER_MODE_MAX);
type FT_Render_Mode_array is array (C.Size_t range <>) of aliased FT_Render_Mode;
-- FT_Outline
--
subtype FT_Outline is System.Address;
type FT_Outline_array is array (C.Size_t range <>) of aliased FT_Outline;
-- FT_LibraryRec
--
subtype FT_LibraryRec is System.Address;
type FT_LibraryRec_array is array (C.Size_t range <>) of aliased FT_LibraryRec;
-- FT_GlyphSlotRec
--
subtype FT_GlyphSlotRec is System.Address;
type FT_GlyphSlotRec_array is array (C.Size_t range <>) of aliased FT_GlyphSlotRec;
-- FT_FaceRec
--
subtype FT_FaceRec is System.Address;
type FT_FaceRec_array is array (C.Size_t range <>) of aliased FT_FaceRec;
-- FT_Kerning_Mode
--
type FT_Kerning_Mode is (FT_KERNING_DEFAULT,
FT_KERNING_UNFITTED,
FT_KERNING_UNSCALED);
type FT_Kerning_Mode_array is array (C.Size_t range <>) of aliased FT_Kerning_Mode;
-- FT_SizeRec
--
subtype FT_SizeRec is System.Address;
type FT_SizeRec_array is array (C.Size_t range <>) of aliased FT_SizeRec;
private
for FT_Render_Mode use (FT_RENDER_MODE_NORMAL => 0,
FT_RENDER_MODE_LIGHT => 1,
FT_RENDER_MODE_MONO => 2,
FT_RENDER_MODE_LCD => 3,
FT_RENDER_MODE_LCD_V => 4,
FT_RENDER_MODE_MAX => 5);
pragma Convention (C, FT_Render_Mode);
for FT_Kerning_Mode use (FT_KERNING_DEFAULT => 0,
FT_KERNING_UNFITTED => 1,
FT_KERNING_UNSCALED => 2);
pragma Convention (C, FT_Kerning_Mode);
end Freetype_C;
| 28.352941
| 89
| 0.608143
|
599e4b4083edd4693f5c5871534a5c8a6b5db1ee
| 2,832
|
ads
|
Ada
|
src/construct_conversion_array.ads
|
joffreyhuguet/curve25519-spark2014
|
0cfdcd54ba112b135050391a8de260ee7a4ba6c6
|
[
"BSD-3-Clause"
] | 4
|
2019-02-25T11:02:34.000Z
|
2019-08-08T11:54:04.000Z
|
src/construct_conversion_array.ads
|
joffreyhuguet/curve25519-spark2014
|
0cfdcd54ba112b135050391a8de260ee7a4ba6c6
|
[
"BSD-3-Clause"
] | null | null | null |
src/construct_conversion_array.ads
|
joffreyhuguet/curve25519-spark2014
|
0cfdcd54ba112b135050391a8de260ee7a4ba6c6
|
[
"BSD-3-Clause"
] | null | null | null |
with Big_Integers; use Big_Integers;
with Types ; use Types;
package Construct_Conversion_Array with
SPARK_Mode,
Ghost
is
function Property
(Conversion_Array : Conversion_Array_Type;
J, K : Index_Type)
return Boolean
is
(if J mod 2 = 1 and then K mod 2 = 1
then Conversion_Array (J + K) * (+2)
= Conversion_Array (J) * Conversion_Array (K)
else Conversion_Array (J + K)
= Conversion_Array (J) * Conversion_Array (K));
-- The conversion array has a property that helps to prove
-- the product function. This function verifies the property
-- at index J + K.
--------------------------
-- Functions and lemmas --
--------------------------
function Two_Power (Expon : Natural) return Big_Integer is
((+2) ** Expon);
-- Returns a big integer equal to 2 to the power Expon.
procedure Two_Power_Lemma (A, B : Natural) with
Pre => A <= Natural'Last - B,
Post => Two_Power (A + B) = Two_Power (A) * Two_Power (B);
procedure Two_Power_Lemma (A, B : Natural) is null;
-- Basic property of exponentiation used in proof.
function Exposant (J : Product_Index_Type) return Natural is
(Natural (J) / 2 * 51 + (if J mod 2 = 1 then 26 else 0))
with
Post => Exposant'Result <= Natural (J) * 51;
-- Returns the exposant of 2 at J index of conversion array.
-- (i.e Conversion_Array (J) = Two_Power (Exposant (J)))
procedure Exposant_Lemma (J, K : Index_Type) with
Contract_Cases =>
(J mod 2 = 1 and then K mod 2 = 1 => Exposant (J + K) + 1 = Exposant (J) + Exposant (K),
others => Exposant (J + K) = Exposant (J) + Exposant (K));
procedure Exposant_Lemma (J, K : Index_Type) is null;
-- Specificity of Exposant function, that helps to prove
-- the property.
----------------------------------------------------------------
-- Computation and proof of Conversion array and its property --
----------------------------------------------------------------
function Conversion_Array return Conversion_Array_Type with
Post => (for all J in Index_Type =>
(for all K in Index_Type =>
Property (Conversion_Array'Result, J, K)));
-- Computes the conversion array
procedure Prove_Property (Conversion_Array : Conversion_Array_Type) with
Pre => (for all J in Product_Index_Type => Conversion_Array (J) = Two_Power (Exposant (J))),
Post => (for all L in Index_Type =>
(for all M in Index_Type =>
Property (Conversion_Array, L, M)));
-- Helps to prove the property for all indexes of
-- Conversion_Array. Preconditions states that
-- the input array has the right content.
end Construct_Conversion_Array;
| 40.457143
| 97
| 0.588277
|
b50382781d3864e1ae5515c66e91fade6de7faac
| 2,267
|
adb
|
Ada
|
src/dds-request_reply-requester2.adb
|
alexcamposruiz/dds-requestreply
|
9f29d34554b5d3e9291151c6e92d2ce6cc31bb71
|
[
"MIT"
] | null | null | null |
src/dds-request_reply-requester2.adb
|
alexcamposruiz/dds-requestreply
|
9f29d34554b5d3e9291151c6e92d2ce6cc31bb71
|
[
"MIT"
] | null | null | null |
src/dds-request_reply-requester2.adb
|
alexcamposruiz/dds-requestreply
|
9f29d34554b5d3e9291151c6e92d2ce6cc31bb71
|
[
"MIT"
] | 2
|
2020-04-06T19:34:15.000Z
|
2020-04-06T19:50:03.000Z
|
package body DDS.Request_Reply.requester is
-- DDS_ReturnCode_t RTI_Connext_Requester_delete(RTI_Connext_Requester * self)
-- {
-- DDS_ReturnCode_t retCode = DDS_RETCODE_OK;
--
-- if(self == NULL) {
-- DDSLog_exception(&DDS_LOG_BAD_PARAMETER_s,
-- "self");
-- return DDS_RETCODE_BAD_PARAMETER;
-- }
--
-- if(self->_impl != NULL) {
-- retCode = RTI_Connext_EntityUntypedImpl_delete(self->_impl);
-- }
--
-- if(retCode != DDS_RETCODE_OK) {
-- DDSLog_exception(&RTI_LOG_ANY_FAILURE_s,
-- "delete RequesterUntypedImpl");
-- }
--
-- RTIOsapiHeap_free(self);
-- return retCode;
-- }
--
-- DDS_ReturnCode_t RTI_Connext_Requester_wait_for_replies_for_related_request(
-- RTI_Connext_Requester* self,
-- DDS_Long min_reply_count,
-- const struct DDS_Duration_t* max_wait,
-- const struct DDS_SampleIdentity_t* related_request_info)
-- {
-- DDS_ReturnCode_t retCode = DDS_RETCODE_OK;
--
--
-- if (related_request_info != NULL) {
-- retCode = RTI_Connext_RequesterUntypedImpl_wait_for_replies(
-- self->_impl, max_wait, min_reply_count, related_request_info);
-- } else {
-- retCode = RTI_Connext_EntityUntypedImpl_wait_for_any_sample(
-- self->_impl, max_wait, min_reply_count);
-- }
--
-- if(retCode != DDS_RETCODE_OK && retCode != DDS_RETCODE_TIMEOUT) {
-- DDSLog_exception(&RTI_LOG_ANY_FAILURE_s,
-- "wait for samples");
-- }
-- return retCode;
-- }
--
-- DDS_ReturnCode_t RTI_Connext_Requester_wait_for_replies(
-- RTI_Connext_Requester* self,
-- DDS_Long min_reply_count,
-- const struct DDS_Duration_t* max_wait)
-- {
-- return RTI_Connext_Requester_wait_for_replies_for_related_request(
-- self, min_reply_count, max_wait, NULL);
-- }
--
-- /* ----------------------------------------------------------------- */
-- /* End of $Id$ */
end DDS.Request_Reply.requester;
| 36.564516
| 83
| 0.556683
|
3c29c2a5d4e3c8526d100dd8bc68c5ea36d3dbec
| 2,057
|
adb
|
Ada
|
tests/saatana-crypto-stream_tools.adb
|
HeisenbugLtd/Saatana
|
d6f4b4d68f4c80c1872deeb2df3e8762df0c627b
|
[
"WTFPL"
] | 10
|
2020-03-19T13:40:04.000Z
|
2021-08-03T00:17:02.000Z
|
tests/saatana-crypto-stream_tools.adb
|
HeisenbugLtd/security
|
69458f6039f89ea9e56995a9378d33b133dd4aff
|
[
"WTFPL"
] | 8
|
2017-10-04T08:42:03.000Z
|
2020-02-10T09:56:29.000Z
|
tests/saatana-crypto-stream_tools.adb
|
HeisenbugLtd/Saatana
|
d6f4b4d68f4c80c1872deeb2df3e8762df0c627b
|
[
"WTFPL"
] | null | null | null |
------------------------------------------------------------------------------
-- Copyright (C) 2017-2020 by Heisenbug Ltd. (gh+saatana@heisenbug.eu)
--
-- This work is free. You can redistribute it and/or modify it under the
-- terms of the Do What The Fuck You Want To Public License, Version 2,
-- as published by Sam Hocevar. See the LICENSE file for more details.
------------------------------------------------------------------------------
pragma License (Unrestricted);
package body Saatana.Crypto.Stream_Tools with
SPARK_Mode => Off
is
function To_Stream (Value : in String) return General_Stream;
function To_Stream (Value : in String) return General_Stream is
Result : General_Stream (0 .. Value'Length / 2 - 1);
begin
for I in Result'Range loop
Convert_Hex_Byte :
declare
Str_Idx : constant Positive := Value'First + Natural (I) * 2;
begin
Result (I) := Byte'Value ("16#" & Value (Str_Idx .. Str_Idx + 1) & "#");
end Convert_Hex_Byte;
end loop;
return Result;
end To_Stream;
function To_Stream (Value : in String) return Ciphertext_Stream_Access is
begin
return new Ciphertext_Stream'(Ciphertext_Stream (General_Stream'(To_Stream (Value))));
end To_Stream;
function To_Stream (Value : in String) return Key_Stream_Access is
begin
return new Key_Stream'(Key_Stream (General_Stream'(To_Stream (Value))));
end To_Stream;
function To_Stream (Value : in String) return MAC_Stream_Access is
begin
return new MAC_Stream'(MAC_Stream (General_Stream'(To_Stream (Value))));
end To_Stream;
function To_Stream (Value : in String) return Nonce_Stream_Access is
begin
return new Nonce_Stream'(Nonce_Stream (General_Stream'(To_Stream (Value))));
end To_Stream;
function To_Stream (Value : in String) return Plaintext_Stream_Access is
begin
return new Plaintext_Stream'(Plaintext_Stream (General_Stream'(To_Stream (Value))));
end To_Stream;
end Saatana.Crypto.Stream_Tools;
| 36.732143
| 92
| 0.647545
|
ec4e4c8aa286a7e3b20bae2585b2caef7140e1ad
| 140
|
adb
|
Ada
|
tests/nonsmoke/functional/CompileTests/experimental_ada_tests/tests/goto_loop_v2.adb
|
ouankou/rose
|
76f2a004bd6d8036bc24be2c566a14e33ba4f825
|
[
"BSD-3-Clause"
] | 488
|
2015-01-09T08:54:48.000Z
|
2022-03-30T07:15:46.000Z
|
tests/nonsmoke/functional/CompileTests/experimental_ada_tests/tests/goto_loop_v2.adb
|
ouankou/rose
|
76f2a004bd6d8036bc24be2c566a14e33ba4f825
|
[
"BSD-3-Clause"
] | 174
|
2015-01-28T18:41:32.000Z
|
2022-03-31T16:51:05.000Z
|
tests/nonsmoke/functional/CompileTests/experimental_ada_tests/tests/goto_loop_v2.adb
|
ouankou/rose
|
76f2a004bd6d8036bc24be2c566a14e33ba4f825
|
[
"BSD-3-Clause"
] | 146
|
2015-04-27T02:48:34.000Z
|
2022-03-04T07:32:53.000Z
|
with Ada.Text_IO;
procedure goto_loop_Text_IO is
begin
<<Start>>
Ada.Text_IO.Put_Line ("Goto Loop!");
goto Start;
end goto_loop_Text_IO;
| 17.5
| 39
| 0.764286
|
5dceb128f90ea6d5bd6115885b2775f500fb61bd
| 4,765
|
adb
|
Ada
|
gcc-gcc-7_3_0-release/gcc/ada/a-tideio.adb
|
best08618/asylo
|
5a520a9f5c461ede0f32acc284017b737a43898c
|
[
"Apache-2.0"
] | 7
|
2020-05-02T17:34:05.000Z
|
2021-10-17T10:15:18.000Z
|
gcc-gcc-7_3_0-release/gcc/ada/a-tideio.adb
|
best08618/asylo
|
5a520a9f5c461ede0f32acc284017b737a43898c
|
[
"Apache-2.0"
] | null | null | null |
gcc-gcc-7_3_0-release/gcc/ada/a-tideio.adb
|
best08618/asylo
|
5a520a9f5c461ede0f32acc284017b737a43898c
|
[
"Apache-2.0"
] | 2
|
2020-07-27T00:22:36.000Z
|
2021-04-01T09:41:02.000Z
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . T E X T _ I O . D E C I M A L _ I O --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Text_IO.Decimal_Aux;
package body Ada.Text_IO.Decimal_IO is
package Aux renames Ada.Text_IO.Decimal_Aux;
Scale : constant Integer := Num'Scale;
---------
-- Get --
---------
procedure Get
(File : File_Type;
Item : out Num;
Width : Field := 0)
is
pragma Unsuppress (Range_Check);
begin
if Num'Size > Integer'Size then
Item := Num'Fixed_Value (Aux.Get_LLD (File, Width, Scale));
else
Item := Num'Fixed_Value (Aux.Get_Dec (File, Width, Scale));
end if;
exception
when Constraint_Error => raise Data_Error;
end Get;
procedure Get
(Item : out Num;
Width : Field := 0)
is
begin
Get (Current_In, Item, Width);
end Get;
procedure Get
(From : String;
Item : out Num;
Last : out Positive)
is
pragma Unsuppress (Range_Check);
begin
if Num'Size > Integer'Size then
Item := Num'Fixed_Value
(Aux.Gets_LLD (From, Last'Unrestricted_Access, Scale));
else
Item := Num'Fixed_Value
(Aux.Gets_Dec (From, Last'Unrestricted_Access, Scale));
end if;
exception
when Constraint_Error => raise Data_Error;
end Get;
---------
-- Put --
---------
procedure Put
(File : File_Type;
Item : Num;
Fore : Field := Default_Fore;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp)
is
begin
if Num'Size > Integer'Size then
Aux.Put_LLD
(File, Long_Long_Integer'Integer_Value (Item),
Fore, Aft, Exp, Scale);
else
Aux.Put_Dec
(File, Integer'Integer_Value (Item), Fore, Aft, Exp, Scale);
end if;
end Put;
procedure Put
(Item : Num;
Fore : Field := Default_Fore;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp)
is
begin
Put (Current_Out, Item, Fore, Aft, Exp);
end Put;
procedure Put
(To : out String;
Item : Num;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp)
is
begin
if Num'Size > Integer'Size then
Aux.Puts_LLD
(To, Long_Long_Integer'Integer_Value (Item), Aft, Exp, Scale);
else
Aux.Puts_Dec (To, Integer'Integer_Value (Item), Aft, Exp, Scale);
end if;
end Put;
end Ada.Text_IO.Decimal_IO;
| 34.528986
| 78
| 0.465268
|
c19dc8f5b31a8cad778718e9d0d75e96df546602
| 7,485
|
ads
|
Ada
|
src/interface/cl-memory-images.ads
|
flyx/OpenCLAda
|
a03a82842b11edda44c8a85f737f5111d1a522a4
|
[
"0BSD"
] | 8
|
2015-02-10T20:04:25.000Z
|
2021-06-25T07:46:31.000Z
|
src/interface/cl-memory-images.ads
|
flyx/OpenCLAda
|
a03a82842b11edda44c8a85f737f5111d1a522a4
|
[
"0BSD"
] | 1
|
2015-09-10T00:01:55.000Z
|
2015-09-10T10:42:23.000Z
|
src/interface/cl-memory-images.ads
|
flyx/OpenCLAda
|
a03a82842b11edda44c8a85f737f5111d1a522a4
|
[
"0BSD"
] | 1
|
2017-02-13T23:07:06.000Z
|
2017-02-13T23:07:06.000Z
|
--------------------------------------------------------------------------------
-- Copyright (c) 2013, Felix Krause <contact@flyx.org>
--
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby granted, provided that the above
-- copyright notice and this permission notice appear in all copies.
--
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--------------------------------------------------------------------------------
package CL.Memory.Images is
type Channel_Order is (R, A, RG, RA, RGB, RGBA, BGRA, ARGB, Intensity,
Luminance, Rx, RGx, RGBx);
-- Full_Float is used here to avoid confusion with the Float type
type Channel_Type is (SNorm_Int8, SNorm_Int16, UNorm_Int8, UNorm_Int16,
UNorm_Short_565, UNorm_Short_555, UNorm_Int_101010,
Signed_Int8, Signed_Int16, Signed_Int32,
Unsigned_Int8, Unsigned_Int16, Unsigned_Int32,
Half_Float, Full_Float);
type Image_Type is (T_Image2D, T_Image3D);
type Image_Format is
record
Order : Channel_Order;
Data_Type : Channel_Type;
end record;
type Image_Format_List is array (Positive range <>) of aliased Image_Format;
-- raised when a source object is passed to Create_Image* that does not
-- have the minimum required size
Invalid_Source_Size : exception;
function Supported_Image_Formats (Context : Contexts.Context;
Mode : Access_Kind;
Img_Type : Image_Type;
Use_Host_Memory : Boolean := False)
return Image_Format_List;
type Image is abstract new Memory_Object with null record;
function Format (Source : Image) return Image_Format;
function Element_Size (Source : Image) return CL.Size;
function Row_Pitch (Source : Image) return CL.Size;
function Width (Source : Image) return CL.Size;
function Height (Source : Image) return CL.Size;
type Image2D is new Image with null record;
type Image3D is new Image with null record;
package Constructors is
-- Analogous to Create_Buffer
function Create_Image2D (Context : Contexts.Context'Class;
Mode : Access_Kind;
Format : Image_Format;
Width : CL.Size;
Height : CL.Size;
Row_Pitch : CL.Size;
Use_Host_Memory : Boolean := False) return Image2D;
-- Analogous to Create_Buffer
function Create_Image3D (Context : Contexts.Context'Class;
Mode : Access_Kind;
Format : Image_Format;
Width : CL.Size;
Height : CL.Size;
Depth : CL.Size;
Row_Pitch : CL.Size;
Slice_Pitch : CL.Size;
Use_Host_Memory : Boolean := False) return Image3D;
generic
type Element is private;
type Element_List is array (Integer range <>) of Element;
function Create_Image2D_From_Source (Context : Contexts.Context'Class;
Mode : Access_Kind;
Format : Image_Format;
Width : CL.Size;
Height : CL.Size;
Row_Pitch : CL.Size;
Source : Element_List;
Use_Source_As_Image : Boolean := False;
Use_Host_Memory : Boolean := False)
return Image2D;
generic
type Element is private;
type Element_List is array (Integer range <>) of Element;
function Create_Image3D_From_Source (Context : Contexts.Context'Class;
Mode : Access_Kind;
Format : Image_Format;
Width : CL.Size;
Height : CL.Size;
Depth : CL.Size;
Row_Pitch : CL.Size;
Slice_Pitch : CL.Size;
Source : Element_List;
Use_Source_As_Image : Boolean := False;
Use_Host_Memory : Boolean := False)
return Image3D;
end Constructors;
function Slice_Pitch (Source : Image3D) return CL.Size;
function Depth (Source : Image3D) return CL.Size;
private
for Channel_Order use (R => 16#10B0#,
A => 16#10B1#,
RG => 16#10B2#,
RA => 16#10B3#,
RGB => 16#10B4#,
RGBA => 16#10B5#,
BGRA => 16#10B6#,
ARGB => 16#10B7#,
Intensity => 16#10B8#,
Luminance => 16#10B9#,
Rx => 16#10BA#,
RGx => 16#10BB#,
RGBx => 16#10BC#);
for Channel_Order'Size use UInt'Size;
for Channel_Type use (SNorm_Int8 => 16#10D0#,
SNorm_Int16 => 16#10D1#,
UNorm_Int8 => 16#10D2#,
UNorm_Int16 => 16#10D3#,
UNorm_Short_565 => 16#10D4#,
UNorm_Short_555 => 16#10D5#,
UNorm_Int_101010 => 16#10D6#,
Signed_Int8 => 16#10D7#,
Signed_Int16 => 16#10D8#,
Signed_Int32 => 16#10D9#,
Unsigned_Int8 => 16#10DA#,
Unsigned_Int16 => 16#10DB#,
Unsigned_Int32 => 16#10DC#,
Half_Float => 16#10DD#,
Full_Float => 16#10DE#);
for Channel_Type'Size use UInt'Size;
for Image_Type use (T_Image2D => 16#10F1#,
T_Image3D => 16#10f2#);
for Image_Type'Size use UInt'Size;
pragma Convention (C, Image_Format);
pragma Convention (C, Image_Format_List);
end CL.Memory.Images;
| 46.78125
| 82
| 0.463327
|
033c219b98cf9fc2724208cacd13d025656741d1
| 499
|
adb
|
Ada
|
tests/examplefiles/ada/test_ada2022.adb
|
psaris/pygments
|
cbcbffea1b1f8edf4b824edadbb181f5143ce9ab
|
[
"BSD-2-Clause"
] | null | null | null |
tests/examplefiles/ada/test_ada2022.adb
|
psaris/pygments
|
cbcbffea1b1f8edf4b824edadbb181f5143ce9ab
|
[
"BSD-2-Clause"
] | 1,242
|
2019-08-31T16:03:19.000Z
|
2019-08-31T18:00:46.000Z
|
tests/examplefiles/ada/test_ada2022.adb
|
psaris/pygments
|
cbcbffea1b1f8edf4b824edadbb181f5143ce9ab
|
[
"BSD-2-Clause"
] | 1
|
2019-10-04T01:56:03.000Z
|
2019-10-04T01:56:03.000Z
|
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Containers.Vectors;
procedure Test_Ada2022 is
package Integer_Vectors is new
Ada.Containers.Vectors
(Index_Type => Natural,
Element_Type => Integer);
use Integer_Vectors;
procedure Increment_All (V : in out Vector) is
begin
for E of V loop
E := @ + 1;
end loop;
end Increment_All;
V : Vector := [0, 0, 0];
begin
Increment_All (V);
Put_Line (V'Image);
end Test_Ada2022;
| 17.821429
| 49
| 0.621242
|
8f3c554a308a1f1fec4982a0d054ee49a9b5b313
| 131
|
ads
|
Ada
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/pack20_pkg.ads
|
best08618/asylo
|
5a520a9f5c461ede0f32acc284017b737a43898c
|
[
"Apache-2.0"
] | 7
|
2020-05-02T17:34:05.000Z
|
2021-10-17T10:15:18.000Z
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/pack20_pkg.ads
|
best08618/asylo
|
5a520a9f5c461ede0f32acc284017b737a43898c
|
[
"Apache-2.0"
] | null | null | null |
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/pack20_pkg.ads
|
best08618/asylo
|
5a520a9f5c461ede0f32acc284017b737a43898c
|
[
"Apache-2.0"
] | 2
|
2020-07-27T00:22:36.000Z
|
2021-04-01T09:41:02.000Z
|
package Pack20_Pkg is
type String_Ptr is access all String;
procedure Modify (Fixed : in out String_Ptr);
end Pack20_Pkg;
| 16.375
| 48
| 0.748092
|
52c7c07c841b564e0ef85c681413ea1b573d3c60
| 34,412
|
ads
|
Ada
|
source/amf/dd/amf-internals-tables-dg_string_data_01.ads
|
svn2github/matreshka
|
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
|
[
"BSD-3-Clause"
] | 24
|
2016-11-29T06:59:41.000Z
|
2021-08-30T11:55:16.000Z
|
source/amf/dd/amf-internals-tables-dg_string_data_01.ads
|
svn2github/matreshka
|
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
|
[
"BSD-3-Clause"
] | 2
|
2019-01-16T05:15:20.000Z
|
2019-02-03T10:03:32.000Z
|
source/amf/dd/amf-internals-tables-dg_string_data_01.ads
|
svn2github/matreshka
|
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
|
[
"BSD-3-Clause"
] | 4
|
2017-07-18T07:11:05.000Z
|
2020-06-21T03:02:25.000Z
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2010-2017, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE 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 --
-- HOLDER 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. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with Matreshka.Internals.Strings;
package AMF.Internals.Tables.DG_String_Data_01 is
-- "LineTo"
MS_0100 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 7,
Unused => 6,
Length => 6,
Value =>
(16#004C#, 16#0069#, 16#006E#, 16#0065#,
16#0054#, 16#006F#,
others => 16#0000#),
others => <>);
-- "a"
MS_0101 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 7,
Unused => 1,
Length => 1,
Value =>
(16#0061#,
others => 16#0000#),
others => <>);
-- "a real number (>=0 and >=1) representing a ratio of the graphical element's width that is the x end point of the gradient."
MS_0102 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 127,
Unused => 122,
Length => 122,
Value =>
(16#0061#, 16#0020#, 16#0072#, 16#0065#,
16#0061#, 16#006C#, 16#0020#, 16#006E#,
16#0075#, 16#006D#, 16#0062#, 16#0065#,
16#0072#, 16#0020#, 16#0028#, 16#003E#,
16#003D#, 16#0030#, 16#0020#, 16#0061#,
16#006E#, 16#0064#, 16#0020#, 16#003E#,
16#003D#, 16#0031#, 16#0029#, 16#0020#,
16#0072#, 16#0065#, 16#0070#, 16#0072#,
16#0065#, 16#0073#, 16#0065#, 16#006E#,
16#0074#, 16#0069#, 16#006E#, 16#0067#,
16#0020#, 16#0061#, 16#0020#, 16#0072#,
16#0061#, 16#0074#, 16#0069#, 16#006F#,
16#0020#, 16#006F#, 16#0066#, 16#0020#,
16#0074#, 16#0068#, 16#0065#, 16#0020#,
16#0067#, 16#0072#, 16#0061#, 16#0070#,
16#0068#, 16#0069#, 16#0063#, 16#0061#,
16#006C#, 16#0020#, 16#0065#, 16#006C#,
16#0065#, 16#006D#, 16#0065#, 16#006E#,
16#0074#, 16#0027#, 16#0073#, 16#0020#,
16#0077#, 16#0069#, 16#0064#, 16#0074#,
16#0068#, 16#0020#, 16#0074#, 16#0068#,
16#0061#, 16#0074#, 16#0020#, 16#0069#,
16#0073#, 16#0020#, 16#0074#, 16#0068#,
16#0065#, 16#0020#, 16#0078#, 16#0020#,
16#0065#, 16#006E#, 16#0064#, 16#0020#,
16#0070#, 16#006F#, 16#0069#, 16#006E#,
16#0074#, 16#0020#, 16#006F#, 16#0066#,
16#0020#, 16#0074#, 16#0068#, 16#0065#,
16#0020#, 16#0067#, 16#0072#, 16#0061#,
16#0064#, 16#0069#, 16#0065#, 16#006E#,
16#0074#, 16#002E#,
others => 16#0000#),
others => <>);
-- "RadialGradient is a kind of gradient that fills a graphical element by smoothly changing color values in a circle."
MS_0103 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 119,
Unused => 114,
Length => 114,
Value =>
(16#0052#, 16#0061#, 16#0064#, 16#0069#,
16#0061#, 16#006C#, 16#0047#, 16#0072#,
16#0061#, 16#0064#, 16#0069#, 16#0065#,
16#006E#, 16#0074#, 16#0020#, 16#0069#,
16#0073#, 16#0020#, 16#0061#, 16#0020#,
16#006B#, 16#0069#, 16#006E#, 16#0064#,
16#0020#, 16#006F#, 16#0066#, 16#0020#,
16#0067#, 16#0072#, 16#0061#, 16#0064#,
16#0069#, 16#0065#, 16#006E#, 16#0074#,
16#0020#, 16#0074#, 16#0068#, 16#0061#,
16#0074#, 16#0020#, 16#0066#, 16#0069#,
16#006C#, 16#006C#, 16#0073#, 16#0020#,
16#0061#, 16#0020#, 16#0067#, 16#0072#,
16#0061#, 16#0070#, 16#0068#, 16#0069#,
16#0063#, 16#0061#, 16#006C#, 16#0020#,
16#0065#, 16#006C#, 16#0065#, 16#006D#,
16#0065#, 16#006E#, 16#0074#, 16#0020#,
16#0062#, 16#0079#, 16#0020#, 16#0073#,
16#006D#, 16#006F#, 16#006F#, 16#0074#,
16#0068#, 16#006C#, 16#0079#, 16#0020#,
16#0063#, 16#0068#, 16#0061#, 16#006E#,
16#0067#, 16#0069#, 16#006E#, 16#0067#,
16#0020#, 16#0063#, 16#006F#, 16#006C#,
16#006F#, 16#0072#, 16#0020#, 16#0076#,
16#0061#, 16#006C#, 16#0075#, 16#0065#,
16#0073#, 16#0020#, 16#0069#, 16#006E#,
16#0020#, 16#0061#, 16#0020#, 16#0063#,
16#0069#, 16#0072#, 16#0063#, 16#006C#,
16#0065#, 16#002E#,
others => 16#0000#),
others => <>);
-- "a list of path commands that define the geometry of the custom shape."
MS_0104 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 71,
Unused => 69,
Length => 69,
Value =>
(16#0061#, 16#0020#, 16#006C#, 16#0069#,
16#0073#, 16#0074#, 16#0020#, 16#006F#,
16#0066#, 16#0020#, 16#0070#, 16#0061#,
16#0074#, 16#0068#, 16#0020#, 16#0063#,
16#006F#, 16#006D#, 16#006D#, 16#0061#,
16#006E#, 16#0064#, 16#0073#, 16#0020#,
16#0074#, 16#0068#, 16#0061#, 16#0074#,
16#0020#, 16#0064#, 16#0065#, 16#0066#,
16#0069#, 16#006E#, 16#0065#, 16#0020#,
16#0074#, 16#0068#, 16#0065#, 16#0020#,
16#0067#, 16#0065#, 16#006F#, 16#006D#,
16#0065#, 16#0074#, 16#0072#, 16#0079#,
16#0020#, 16#006F#, 16#0066#, 16#0020#,
16#0074#, 16#0068#, 16#0065#, 16#0020#,
16#0063#, 16#0075#, 16#0073#, 16#0074#,
16#006F#, 16#006D#, 16#0020#, 16#0073#,
16#0068#, 16#0061#, 16#0070#, 16#0065#,
16#002E#,
others => 16#0000#),
others => <>);
-- "a real number (>=0 and <=1) representing the opacity of the stroke used for a graphical element. A value of 0 means totally transparent, while a value of 1 means totally opaque. The default is 1."
MS_0105 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 207,
Unused => 195,
Length => 195,
Value =>
(16#0061#, 16#0020#, 16#0072#, 16#0065#,
16#0061#, 16#006C#, 16#0020#, 16#006E#,
16#0075#, 16#006D#, 16#0062#, 16#0065#,
16#0072#, 16#0020#, 16#0028#, 16#003E#,
16#003D#, 16#0030#, 16#0020#, 16#0061#,
16#006E#, 16#0064#, 16#0020#, 16#003C#,
16#003D#, 16#0031#, 16#0029#, 16#0020#,
16#0072#, 16#0065#, 16#0070#, 16#0072#,
16#0065#, 16#0073#, 16#0065#, 16#006E#,
16#0074#, 16#0069#, 16#006E#, 16#0067#,
16#0020#, 16#0074#, 16#0068#, 16#0065#,
16#0020#, 16#006F#, 16#0070#, 16#0061#,
16#0063#, 16#0069#, 16#0074#, 16#0079#,
16#0020#, 16#006F#, 16#0066#, 16#0020#,
16#0074#, 16#0068#, 16#0065#, 16#0020#,
16#0073#, 16#0074#, 16#0072#, 16#006F#,
16#006B#, 16#0065#, 16#0020#, 16#0075#,
16#0073#, 16#0065#, 16#0064#, 16#0020#,
16#0066#, 16#006F#, 16#0072#, 16#0020#,
16#0061#, 16#0020#, 16#0067#, 16#0072#,
16#0061#, 16#0070#, 16#0068#, 16#0069#,
16#0063#, 16#0061#, 16#006C#, 16#0020#,
16#0065#, 16#006C#, 16#0065#, 16#006D#,
16#0065#, 16#006E#, 16#0074#, 16#002E#,
16#0020#, 16#0041#, 16#0020#, 16#0076#,
16#0061#, 16#006C#, 16#0075#, 16#0065#,
16#0020#, 16#006F#, 16#0066#, 16#0020#,
16#0030#, 16#0020#, 16#006D#, 16#0065#,
16#0061#, 16#006E#, 16#0073#, 16#0020#,
16#0074#, 16#006F#, 16#0074#, 16#0061#,
16#006C#, 16#006C#, 16#0079#, 16#0020#,
16#0074#, 16#0072#, 16#0061#, 16#006E#,
16#0073#, 16#0070#, 16#0061#, 16#0072#,
16#0065#, 16#006E#, 16#0074#, 16#002C#,
16#0020#, 16#0077#, 16#0068#, 16#0069#,
16#006C#, 16#0065#, 16#0020#, 16#0061#,
16#0020#, 16#0076#, 16#0061#, 16#006C#,
16#0075#, 16#0065#, 16#0020#, 16#006F#,
16#0066#, 16#0020#, 16#0031#, 16#0020#,
16#006D#, 16#0065#, 16#0061#, 16#006E#,
16#0073#, 16#0020#, 16#0074#, 16#006F#,
16#0074#, 16#0061#, 16#006C#, 16#006C#,
16#0079#, 16#0020#, 16#006F#, 16#0070#,
16#0061#, 16#0071#, 16#0075#, 16#0065#,
16#002E#, 16#0020#, 16#0054#, 16#0068#,
16#0065#, 16#0020#, 16#0064#, 16#0065#,
16#0066#, 16#0061#, 16#0075#, 16#006C#,
16#0074#, 16#0020#, 16#0069#, 16#0073#,
16#0020#, 16#0031#, 16#002E#,
others => 16#0000#),
others => <>);
-- "a reference to a fill that is used to paint the enclosed regions of a graphical element. A fill value is exclusive with a fillColor value. If both are specified, the fill value is used. If none is specified, no fill is applied (i.e. the element becomes see-through)."
MS_0106 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 279,
Unused => 266,
Length => 266,
Value =>
(16#0061#, 16#0020#, 16#0072#, 16#0065#,
16#0066#, 16#0065#, 16#0072#, 16#0065#,
16#006E#, 16#0063#, 16#0065#, 16#0020#,
16#0074#, 16#006F#, 16#0020#, 16#0061#,
16#0020#, 16#0066#, 16#0069#, 16#006C#,
16#006C#, 16#0020#, 16#0074#, 16#0068#,
16#0061#, 16#0074#, 16#0020#, 16#0069#,
16#0073#, 16#0020#, 16#0075#, 16#0073#,
16#0065#, 16#0064#, 16#0020#, 16#0074#,
16#006F#, 16#0020#, 16#0070#, 16#0061#,
16#0069#, 16#006E#, 16#0074#, 16#0020#,
16#0074#, 16#0068#, 16#0065#, 16#0020#,
16#0065#, 16#006E#, 16#0063#, 16#006C#,
16#006F#, 16#0073#, 16#0065#, 16#0064#,
16#0020#, 16#0072#, 16#0065#, 16#0067#,
16#0069#, 16#006F#, 16#006E#, 16#0073#,
16#0020#, 16#006F#, 16#0066#, 16#0020#,
16#0061#, 16#0020#, 16#0067#, 16#0072#,
16#0061#, 16#0070#, 16#0068#, 16#0069#,
16#0063#, 16#0061#, 16#006C#, 16#0020#,
16#0065#, 16#006C#, 16#0065#, 16#006D#,
16#0065#, 16#006E#, 16#0074#, 16#002E#,
16#0020#, 16#0041#, 16#0020#, 16#0066#,
16#0069#, 16#006C#, 16#006C#, 16#0020#,
16#0076#, 16#0061#, 16#006C#, 16#0075#,
16#0065#, 16#0020#, 16#0069#, 16#0073#,
16#0020#, 16#0065#, 16#0078#, 16#0063#,
16#006C#, 16#0075#, 16#0073#, 16#0069#,
16#0076#, 16#0065#, 16#0020#, 16#0077#,
16#0069#, 16#0074#, 16#0068#, 16#0020#,
16#0061#, 16#0020#, 16#0066#, 16#0069#,
16#006C#, 16#006C#, 16#0043#, 16#006F#,
16#006C#, 16#006F#, 16#0072#, 16#0020#,
16#0076#, 16#0061#, 16#006C#, 16#0075#,
16#0065#, 16#002E#, 16#0020#, 16#0049#,
16#0066#, 16#0020#, 16#0062#, 16#006F#,
16#0074#, 16#0068#, 16#0020#, 16#0061#,
16#0072#, 16#0065#, 16#0020#, 16#0073#,
16#0070#, 16#0065#, 16#0063#, 16#0069#,
16#0066#, 16#0069#, 16#0065#, 16#0064#,
16#002C#, 16#0020#, 16#0074#, 16#0068#,
16#0065#, 16#0020#, 16#0066#, 16#0069#,
16#006C#, 16#006C#, 16#0020#, 16#0076#,
16#0061#, 16#006C#, 16#0075#, 16#0065#,
16#0020#, 16#0069#, 16#0073#, 16#0020#,
16#0075#, 16#0073#, 16#0065#, 16#0064#,
16#002E#, 16#0020#, 16#0049#, 16#0066#,
16#0020#, 16#006E#, 16#006F#, 16#006E#,
16#0065#, 16#0020#, 16#0069#, 16#0073#,
16#0020#, 16#0073#, 16#0070#, 16#0065#,
16#0063#, 16#0069#, 16#0066#, 16#0069#,
16#0065#, 16#0064#, 16#002C#, 16#0020#,
16#006E#, 16#006F#, 16#0020#, 16#0066#,
16#0069#, 16#006C#, 16#006C#, 16#0020#,
16#0069#, 16#0073#, 16#0020#, 16#0061#,
16#0070#, 16#0070#, 16#006C#, 16#0069#,
16#0065#, 16#0064#, 16#0020#, 16#0028#,
16#0069#, 16#002E#, 16#0065#, 16#002E#,
16#0020#, 16#0074#, 16#0068#, 16#0065#,
16#0020#, 16#0065#, 16#006C#, 16#0065#,
16#006D#, 16#0065#, 16#006E#, 16#0074#,
16#0020#, 16#0062#, 16#0065#, 16#0063#,
16#006F#, 16#006D#, 16#0065#, 16#0073#,
16#0020#, 16#0073#, 16#0065#, 16#0065#,
16#002D#, 16#0074#, 16#0068#, 16#0072#,
16#006F#, 16#0075#, 16#0067#, 16#0068#,
16#0029#, 16#002E#,
others => 16#0000#),
others => <>);
-- "packagedFill"
MS_0107 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 15,
Unused => 12,
Length => 12,
Value =>
(16#0070#, 16#0061#, 16#0063#, 16#006B#,
16#0061#, 16#0067#, 16#0065#, 16#0064#,
16#0046#, 16#0069#, 16#006C#, 16#006C#,
others => 16#0000#),
others => <>);
-- "packagedStyle"
MS_0108 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 15,
Unused => 13,
Length => 13,
Value =>
(16#0070#, 16#0061#, 16#0063#, 16#006B#,
16#0061#, 16#0067#, 16#0065#, 16#0064#,
16#0053#, 16#0074#, 16#0079#, 16#006C#,
16#0065#,
others => 16#0000#),
others => <>);
-- "Group defines a group of graphical elements that can be styled, clipped and/or transformed together."
MS_0109 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 103,
Unused => 100,
Length => 100,
Value =>
(16#0047#, 16#0072#, 16#006F#, 16#0075#,
16#0070#, 16#0020#, 16#0064#, 16#0065#,
16#0066#, 16#0069#, 16#006E#, 16#0065#,
16#0073#, 16#0020#, 16#0061#, 16#0020#,
16#0067#, 16#0072#, 16#006F#, 16#0075#,
16#0070#, 16#0020#, 16#006F#, 16#0066#,
16#0020#, 16#0067#, 16#0072#, 16#0061#,
16#0070#, 16#0068#, 16#0069#, 16#0063#,
16#0061#, 16#006C#, 16#0020#, 16#0065#,
16#006C#, 16#0065#, 16#006D#, 16#0065#,
16#006E#, 16#0074#, 16#0073#, 16#0020#,
16#0074#, 16#0068#, 16#0061#, 16#0074#,
16#0020#, 16#0063#, 16#0061#, 16#006E#,
16#0020#, 16#0062#, 16#0065#, 16#0020#,
16#0073#, 16#0074#, 16#0079#, 16#006C#,
16#0065#, 16#0064#, 16#002C#, 16#0020#,
16#0063#, 16#006C#, 16#0069#, 16#0070#,
16#0070#, 16#0065#, 16#0064#, 16#0020#,
16#0061#, 16#006E#, 16#0064#, 16#002F#,
16#006F#, 16#0072#, 16#0020#, 16#0074#,
16#0072#, 16#0061#, 16#006E#, 16#0073#,
16#0066#, 16#006F#, 16#0072#, 16#006D#,
16#0065#, 16#0064#, 16#0020#, 16#0074#,
16#006F#, 16#0067#, 16#0065#, 16#0074#,
16#0068#, 16#0065#, 16#0072#, 16#002E#,
others => 16#0000#),
others => <>);
-- "command"
MS_010A : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 15,
Unused => 7,
Length => 7,
Value =>
(16#0063#, 16#006F#, 16#006D#, 16#006D#,
16#0061#, 16#006E#, 16#0064#,
others => 16#0000#),
others => <>);
-- "angle"
MS_010B : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 7,
Unused => 5,
Length => 5,
Value =>
(16#0061#, 16#006E#, 16#0067#, 16#006C#,
16#0065#,
others => 16#0000#),
others => <>);
-- "Canvas"
MS_010C : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 7,
Unused => 6,
Length => 6,
Value =>
(16#0043#, 16#0061#, 16#006E#, 16#0076#,
16#0061#, 16#0073#,
others => 16#0000#),
others => <>);
-- "fill"
MS_010D : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 7,
Unused => 4,
Length => 4,
Value =>
(16#0066#, 16#0069#, 16#006C#, 16#006C#,
others => 16#0000#),
others => <>);
-- "a real number (>=0 and >=1) representing a ratio of the graphical element's height that is the y end point of the gradient."
MS_010E : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 127,
Unused => 123,
Length => 123,
Value =>
(16#0061#, 16#0020#, 16#0072#, 16#0065#,
16#0061#, 16#006C#, 16#0020#, 16#006E#,
16#0075#, 16#006D#, 16#0062#, 16#0065#,
16#0072#, 16#0020#, 16#0028#, 16#003E#,
16#003D#, 16#0030#, 16#0020#, 16#0061#,
16#006E#, 16#0064#, 16#0020#, 16#003E#,
16#003D#, 16#0031#, 16#0029#, 16#0020#,
16#0072#, 16#0065#, 16#0070#, 16#0072#,
16#0065#, 16#0073#, 16#0065#, 16#006E#,
16#0074#, 16#0069#, 16#006E#, 16#0067#,
16#0020#, 16#0061#, 16#0020#, 16#0072#,
16#0061#, 16#0074#, 16#0069#, 16#006F#,
16#0020#, 16#006F#, 16#0066#, 16#0020#,
16#0074#, 16#0068#, 16#0065#, 16#0020#,
16#0067#, 16#0072#, 16#0061#, 16#0070#,
16#0068#, 16#0069#, 16#0063#, 16#0061#,
16#006C#, 16#0020#, 16#0065#, 16#006C#,
16#0065#, 16#006D#, 16#0065#, 16#006E#,
16#0074#, 16#0027#, 16#0073#, 16#0020#,
16#0068#, 16#0065#, 16#0069#, 16#0067#,
16#0068#, 16#0074#, 16#0020#, 16#0074#,
16#0068#, 16#0061#, 16#0074#, 16#0020#,
16#0069#, 16#0073#, 16#0020#, 16#0074#,
16#0068#, 16#0065#, 16#0020#, 16#0079#,
16#0020#, 16#0065#, 16#006E#, 16#0064#,
16#0020#, 16#0070#, 16#006F#, 16#0069#,
16#006E#, 16#0074#, 16#0020#, 16#006F#,
16#0066#, 16#0020#, 16#0074#, 16#0068#,
16#0065#, 16#0020#, 16#0067#, 16#0072#,
16#0061#, 16#0064#, 16#0069#, 16#0065#,
16#006E#, 16#0074#, 16#002E#,
others => 16#0000#),
others => <>);
-- "A_startMarker_markedElement"
MS_010F : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 31,
Unused => 27,
Length => 27,
Value =>
(16#0041#, 16#005F#, 16#0073#, 16#0074#,
16#0061#, 16#0072#, 16#0074#, 16#004D#,
16#0061#, 16#0072#, 16#006B#, 16#0065#,
16#0072#, 16#005F#, 16#006D#, 16#0061#,
16#0072#, 16#006B#, 16#0065#, 16#0064#,
16#0045#, 16#006C#, 16#0065#, 16#006D#,
16#0065#, 16#006E#, 16#0074#,
others => 16#0000#),
others => <>);
-- "Rotate"
MS_0110 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 7,
Unused => 6,
Length => 6,
Value =>
(16#0052#, 16#006F#, 16#0074#, 16#0061#,
16#0074#, 16#0065#,
others => 16#0000#),
others => <>);
-- "the center point of the circle in the x-y coordinate system."
MS_0111 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 63,
Unused => 60,
Length => 60,
Value =>
(16#0074#, 16#0068#, 16#0065#, 16#0020#,
16#0063#, 16#0065#, 16#006E#, 16#0074#,
16#0065#, 16#0072#, 16#0020#, 16#0070#,
16#006F#, 16#0069#, 16#006E#, 16#0074#,
16#0020#, 16#006F#, 16#0066#, 16#0020#,
16#0074#, 16#0068#, 16#0065#, 16#0020#,
16#0063#, 16#0069#, 16#0072#, 16#0063#,
16#006C#, 16#0065#, 16#0020#, 16#0069#,
16#006E#, 16#0020#, 16#0074#, 16#0068#,
16#0065#, 16#0020#, 16#0078#, 16#002D#,
16#0079#, 16#0020#, 16#0063#, 16#006F#,
16#006F#, 16#0072#, 16#0064#, 16#0069#,
16#006E#, 16#0061#, 16#0074#, 16#0065#,
16#0020#, 16#0073#, 16#0079#, 16#0073#,
16#0074#, 16#0065#, 16#006D#, 16#002E#,
others => 16#0000#),
others => <>);
-- "scale factors cannot be negative."
MS_0112 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 39,
Unused => 33,
Length => 33,
Value =>
(16#0073#, 16#0063#, 16#0061#, 16#006C#,
16#0065#, 16#0020#, 16#0066#, 16#0061#,
16#0063#, 16#0074#, 16#006F#, 16#0072#,
16#0073#, 16#0020#, 16#0063#, 16#0061#,
16#006E#, 16#006E#, 16#006F#, 16#0074#,
16#0020#, 16#0062#, 16#0065#, 16#0020#,
16#006E#, 16#0065#, 16#0067#, 16#0061#,
16#0074#, 16#0069#, 16#0076#, 16#0065#,
16#002E#,
others => 16#0000#),
others => <>);
-- "A_clipPath_clippedElement"
MS_0113 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 31,
Unused => 25,
Length => 25,
Value =>
(16#0041#, 16#005F#, 16#0063#, 16#006C#,
16#0069#, 16#0070#, 16#0050#, 16#0061#,
16#0074#, 16#0068#, 16#005F#, 16#0063#,
16#006C#, 16#0069#, 16#0070#, 16#0070#,
16#0065#, 16#0064#, 16#0045#, 16#006C#,
16#0065#, 16#006D#, 16#0065#, 16#006E#,
16#0074#,
others => 16#0000#),
others => <>);
-- "backgroundFill"
MS_0114 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 15,
Unused => 14,
Length => 14,
Value =>
(16#0062#, 16#0061#, 16#0063#, 16#006B#,
16#0067#, 16#0072#, 16#006F#, 16#0075#,
16#006E#, 16#0064#, 16#0046#, 16#0069#,
16#006C#, 16#006C#,
others => 16#0000#),
others => <>);
-- "a list of locally-owned styles for this graphical element."
MS_0115 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 63,
Unused => 58,
Length => 58,
Value =>
(16#0061#, 16#0020#, 16#006C#, 16#0069#,
16#0073#, 16#0074#, 16#0020#, 16#006F#,
16#0066#, 16#0020#, 16#006C#, 16#006F#,
16#0063#, 16#0061#, 16#006C#, 16#006C#,
16#0079#, 16#002D#, 16#006F#, 16#0077#,
16#006E#, 16#0065#, 16#0064#, 16#0020#,
16#0073#, 16#0074#, 16#0079#, 16#006C#,
16#0065#, 16#0073#, 16#0020#, 16#0066#,
16#006F#, 16#0072#, 16#0020#, 16#0074#,
16#0068#, 16#0069#, 16#0073#, 16#0020#,
16#0067#, 16#0072#, 16#0061#, 16#0070#,
16#0068#, 16#0069#, 16#0063#, 16#0061#,
16#006C#, 16#0020#, 16#0065#, 16#006C#,
16#0065#, 16#006D#, 16#0065#, 16#006E#,
16#0074#, 16#002E#,
others => 16#0000#),
others => <>);
-- "a set of styles packaged by the canvas and referenced by graphical elements in the canvas as shared styles."
MS_0116 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 111,
Unused => 107,
Length => 107,
Value =>
(16#0061#, 16#0020#, 16#0073#, 16#0065#,
16#0074#, 16#0020#, 16#006F#, 16#0066#,
16#0020#, 16#0073#, 16#0074#, 16#0079#,
16#006C#, 16#0065#, 16#0073#, 16#0020#,
16#0070#, 16#0061#, 16#0063#, 16#006B#,
16#0061#, 16#0067#, 16#0065#, 16#0064#,
16#0020#, 16#0062#, 16#0079#, 16#0020#,
16#0074#, 16#0068#, 16#0065#, 16#0020#,
16#0063#, 16#0061#, 16#006E#, 16#0076#,
16#0061#, 16#0073#, 16#0020#, 16#0061#,
16#006E#, 16#0064#, 16#0020#, 16#0072#,
16#0065#, 16#0066#, 16#0065#, 16#0072#,
16#0065#, 16#006E#, 16#0063#, 16#0065#,
16#0064#, 16#0020#, 16#0062#, 16#0079#,
16#0020#, 16#0067#, 16#0072#, 16#0061#,
16#0070#, 16#0068#, 16#0069#, 16#0063#,
16#0061#, 16#006C#, 16#0020#, 16#0065#,
16#006C#, 16#0065#, 16#006D#, 16#0065#,
16#006E#, 16#0074#, 16#0073#, 16#0020#,
16#0069#, 16#006E#, 16#0020#, 16#0074#,
16#0068#, 16#0065#, 16#0020#, 16#0063#,
16#0061#, 16#006E#, 16#0076#, 16#0061#,
16#0073#, 16#0020#, 16#0061#, 16#0073#,
16#0020#, 16#0073#, 16#0068#, 16#0061#,
16#0072#, 16#0065#, 16#0064#, 16#0020#,
16#0073#, 16#0074#, 16#0079#, 16#006C#,
16#0065#, 16#0073#, 16#002E#,
others => 16#0000#),
others => <>);
-- "backgroundColor"
MS_0117 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 23,
Unused => 15,
Length => 15,
Value =>
(16#0062#, 16#0061#, 16#0063#, 16#006B#,
16#0067#, 16#0072#, 16#006F#, 16#0075#,
16#006E#, 16#0064#, 16#0043#, 16#006F#,
16#006C#, 16#006F#, 16#0072#,
others => 16#0000#),
others => <>);
-- "f"
MS_0118 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 7,
Unused => 1,
Length => 1,
Value =>
(16#0066#,
others => 16#0000#),
others => <>);
-- "fontItalic"
MS_0119 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 15,
Unused => 10,
Length => 10,
Value =>
(16#0066#, 16#006F#, 16#006E#, 16#0074#,
16#0049#, 16#0074#, 16#0061#, 16#006C#,
16#0069#, 16#0063#,
others => 16#0000#),
others => <>);
-- "valid_focus_point"
MS_011A : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 23,
Unused => 17,
Length => 17,
Value =>
(16#0076#, 16#0061#, 16#006C#, 16#0069#,
16#0064#, 16#005F#, 16#0066#, 16#006F#,
16#0063#, 16#0075#, 16#0073#, 16#005F#,
16#0070#, 16#006F#, 16#0069#, 16#006E#,
16#0074#,
others => 16#0000#),
others => <>);
-- "ClosePath"
MS_011B : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 15,
Unused => 9,
Length => 9,
Value =>
(16#0043#, 16#006C#, 16#006F#, 16#0073#,
16#0065#, 16#0050#, 16#0061#, 16#0074#,
16#0068#,
others => 16#0000#),
others => <>);
-- "strokeDashLength"
MS_011C : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 23,
Unused => 16,
Length => 16,
Value =>
(16#0073#, 16#0074#, 16#0072#, 16#006F#,
16#006B#, 16#0065#, 16#0044#, 16#0061#,
16#0073#, 16#0068#, 16#004C#, 16#0065#,
16#006E#, 16#0067#, 16#0074#, 16#0068#,
others => 16#0000#),
others => <>);
-- "member"
MS_011D : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 7,
Unused => 6,
Length => 6,
Value =>
(16#006D#, 16#0065#, 16#006D#, 16#0062#,
16#0065#, 16#0072#,
others => 16#0000#),
others => <>);
-- "CubicCurveTo"
MS_011E : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 15,
Unused => 12,
Length => 12,
Value =>
(16#0043#, 16#0075#, 16#0062#, 16#0069#,
16#0063#, 16#0043#, 16#0075#, 16#0072#,
16#0076#, 16#0065#, 16#0054#, 16#006F#,
others => 16#0000#),
others => <>);
-- "Gradient"
MS_011F : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 15,
Unused => 8,
Length => 8,
Value =>
(16#0047#, 16#0072#, 16#0061#, 16#0064#,
16#0069#, 16#0065#, 16#006E#, 16#0074#,
others => 16#0000#),
others => <>);
-- "startMarker"
MS_0120 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 15,
Unused => 11,
Length => 11,
Value =>
(16#0073#, 16#0074#, 16#0061#, 16#0072#,
16#0074#, 16#004D#, 16#0061#, 16#0072#,
16#006B#, 16#0065#, 16#0072#,
others => 16#0000#),
others => <>);
-- "0"
MS_0121 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 7,
Unused => 1,
Length => 1,
Value =>
(16#0030#,
others => 16#0000#),
others => <>);
-- "Group"
MS_0122 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 7,
Unused => 5,
Length => 5,
Value =>
(16#0047#, 16#0072#, 16#006F#, 16#0075#,
16#0070#,
others => 16#0000#),
others => <>);
-- "a real number (>=0 and<=1) representing the offset of this gradient stop as a ratio of the distance between the start and end positions of the gradient."
MS_0123 : aliased Matreshka.Internals.Strings.Shared_String
:= (Capacity => 159,
Unused => 152,
Length => 152,
Value =>
(16#0061#, 16#0020#, 16#0072#, 16#0065#,
16#0061#, 16#006C#, 16#0020#, 16#006E#,
16#0075#, 16#006D#, 16#0062#, 16#0065#,
16#0072#, 16#0020#, 16#0028#, 16#003E#,
16#003D#, 16#0030#, 16#0020#, 16#0061#,
16#006E#, 16#0064#, 16#003C#, 16#003D#,
16#0031#, 16#0029#, 16#0020#, 16#0072#,
16#0065#, 16#0070#, 16#0072#, 16#0065#,
16#0073#, 16#0065#, 16#006E#, 16#0074#,
16#0069#, 16#006E#, 16#0067#, 16#0020#,
16#0074#, 16#0068#, 16#0065#, 16#0020#,
16#006F#, 16#0066#, 16#0066#, 16#0073#,
16#0065#, 16#0074#, 16#0020#, 16#006F#,
16#0066#, 16#0020#, 16#0074#, 16#0068#,
16#0069#, 16#0073#, 16#0020#, 16#0067#,
16#0072#, 16#0061#, 16#0064#, 16#0069#,
16#0065#, 16#006E#, 16#0074#, 16#0020#,
16#0073#, 16#0074#, 16#006F#, 16#0070#,
16#0020#, 16#0061#, 16#0073#, 16#0020#,
16#0061#, 16#0020#, 16#0072#, 16#0061#,
16#0074#, 16#0069#, 16#006F#, 16#0020#,
16#006F#, 16#0066#, 16#0020#, 16#0074#,
16#0068#, 16#0065#, 16#0020#, 16#0064#,
16#0069#, 16#0073#, 16#0074#, 16#0061#,
16#006E#, 16#0063#, 16#0065#, 16#0020#,
16#0062#, 16#0065#, 16#0074#, 16#0077#,
16#0065#, 16#0065#, 16#006E#, 16#0020#,
16#0074#, 16#0068#, 16#0065#, 16#0020#,
16#0073#, 16#0074#, 16#0061#, 16#0072#,
16#0074#, 16#0020#, 16#0061#, 16#006E#,
16#0064#, 16#0020#, 16#0065#, 16#006E#,
16#0064#, 16#0020#, 16#0070#, 16#006F#,
16#0073#, 16#0069#, 16#0074#, 16#0069#,
16#006F#, 16#006E#, 16#0073#, 16#0020#,
16#006F#, 16#0066#, 16#0020#, 16#0074#,
16#0068#, 16#0065#, 16#0020#, 16#0067#,
16#0072#, 16#0061#, 16#0064#, 16#0069#,
16#0065#, 16#006E#, 16#0074#, 16#002E#,
others => 16#0000#),
others => <>);
end AMF.Internals.Tables.DG_String_Data_01;
| 41.211976
| 275
| 0.471463
|
1a20cdf5d4b48bb42100736d4f3f181e797456d8
| 212
|
adb
|
Ada
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/nested_generic1.adb
|
best08618/asylo
|
5a520a9f5c461ede0f32acc284017b737a43898c
|
[
"Apache-2.0"
] | 7
|
2020-05-02T17:34:05.000Z
|
2021-10-17T10:15:18.000Z
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/nested_generic1.adb
|
best08618/asylo
|
5a520a9f5c461ede0f32acc284017b737a43898c
|
[
"Apache-2.0"
] | null | null | null |
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/nested_generic1.adb
|
best08618/asylo
|
5a520a9f5c461ede0f32acc284017b737a43898c
|
[
"Apache-2.0"
] | 2
|
2020-07-27T00:22:36.000Z
|
2021-04-01T09:41:02.000Z
|
-- PR ada/52735
-- Reported by Per Sandberg <per.sandberg@bredband.net>
-- { dg-do compile }
with Nested_Generic1_Pkg;
procedure Nested_Generic1 is
package P is new Nested_Generic1_Pkg;
begin
null;
end;
| 16.307692
| 55
| 0.740566
|
01b159269b3b5043ef3bccfecac93abea891211e
| 19,536
|
ads
|
Ada
|
arch/ARM/STM32/svd/stm32wb55x/stm32_svd-flash.ads
|
morbos/Ada_Drivers_Library
|
a4ab26799be60997c38735f4056160c4af597ef7
|
[
"BSD-3-Clause"
] | 2
|
2018-05-16T03:56:39.000Z
|
2019-07-31T13:53:56.000Z
|
arch/ARM/STM32/svd/stm32wb55x/stm32_svd-flash.ads
|
morbos/Ada_Drivers_Library
|
a4ab26799be60997c38735f4056160c4af597ef7
|
[
"BSD-3-Clause"
] | null | null | null |
arch/ARM/STM32/svd/stm32wb55x/stm32_svd-flash.ads
|
morbos/Ada_Drivers_Library
|
a4ab26799be60997c38735f4056160c4af597ef7
|
[
"BSD-3-Clause"
] | null | null | null |
-- This spec has been automatically generated from STM32WB55x.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.FLASH is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype ACR_LATENCY_Field is HAL.UInt3;
type ACR_Register is record
LATENCY : ACR_LATENCY_Field := 16#0#;
-- unspecified
Reserved_3_7 : HAL.UInt5 := 16#0#;
PRFTEN : Boolean := False;
ICEN : Boolean := False;
DCEN : Boolean := False;
ICRST : Boolean := False;
DCRST : Boolean := False;
-- unspecified
Reserved_13_14 : HAL.UInt2 := 16#0#;
PES : Boolean := False;
EMPTY : Boolean := False;
-- unspecified
Reserved_17_31 : HAL.UInt15 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ACR_Register use record
LATENCY at 0 range 0 .. 2;
Reserved_3_7 at 0 range 3 .. 7;
PRFTEN at 0 range 8 .. 8;
ICEN at 0 range 9 .. 9;
DCEN at 0 range 10 .. 10;
ICRST at 0 range 11 .. 11;
DCRST at 0 range 12 .. 12;
Reserved_13_14 at 0 range 13 .. 14;
PES at 0 range 15 .. 15;
EMPTY at 0 range 16 .. 16;
Reserved_17_31 at 0 range 17 .. 31;
end record;
type SR_Register is record
EOP : Boolean := False;
OPERR : Boolean := False;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
PROGERR : Boolean := False;
WRPERR : Boolean := False;
PGAERR : Boolean := False;
SIZERR : Boolean := False;
PGSERR : Boolean := False;
MISERR : Boolean := False;
FASTERR : Boolean := False;
-- unspecified
Reserved_10_12 : HAL.UInt3 := 16#0#;
OPTNV : Boolean := False;
RDERR : Boolean := False;
OPTVERR : Boolean := False;
BSY : Boolean := False;
-- unspecified
Reserved_17_17 : HAL.Bit := 16#0#;
CFGBSY : Boolean := False;
PESD : Boolean := False;
-- unspecified
Reserved_20_31 : HAL.UInt12 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SR_Register use record
EOP at 0 range 0 .. 0;
OPERR at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
PROGERR at 0 range 3 .. 3;
WRPERR at 0 range 4 .. 4;
PGAERR at 0 range 5 .. 5;
SIZERR at 0 range 6 .. 6;
PGSERR at 0 range 7 .. 7;
MISERR at 0 range 8 .. 8;
FASTERR at 0 range 9 .. 9;
Reserved_10_12 at 0 range 10 .. 12;
OPTNV at 0 range 13 .. 13;
RDERR at 0 range 14 .. 14;
OPTVERR at 0 range 15 .. 15;
BSY at 0 range 16 .. 16;
Reserved_17_17 at 0 range 17 .. 17;
CFGBSY at 0 range 18 .. 18;
PESD at 0 range 19 .. 19;
Reserved_20_31 at 0 range 20 .. 31;
end record;
subtype CR_PNB_Field is HAL.UInt8;
type CR_Register is record
PG : Boolean := False;
PER : Boolean := False;
MER : Boolean := False;
PNB : CR_PNB_Field := 16#0#;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
STRT : Boolean := False;
OPTSTRT : Boolean := False;
FSTPG : Boolean := False;
-- unspecified
Reserved_19_23 : HAL.UInt5 := 16#0#;
EOPIE : Boolean := False;
ERRIE : Boolean := False;
RDERRIE : Boolean := False;
OBL_LAUNCH : Boolean := False;
-- unspecified
Reserved_28_29 : HAL.UInt2 := 16#0#;
OPTLOCK : Boolean := False;
LOCK : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR_Register use record
PG at 0 range 0 .. 0;
PER at 0 range 1 .. 1;
MER at 0 range 2 .. 2;
PNB at 0 range 3 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
STRT at 0 range 16 .. 16;
OPTSTRT at 0 range 17 .. 17;
FSTPG at 0 range 18 .. 18;
Reserved_19_23 at 0 range 19 .. 23;
EOPIE at 0 range 24 .. 24;
ERRIE at 0 range 25 .. 25;
RDERRIE at 0 range 26 .. 26;
OBL_LAUNCH at 0 range 27 .. 27;
Reserved_28_29 at 0 range 28 .. 29;
OPTLOCK at 0 range 30 .. 30;
LOCK at 0 range 31 .. 31;
end record;
subtype ECCR_ADDR_ECC_Field is HAL.UInt17;
subtype ECCR_CPUID_Field is HAL.UInt3;
type ECCR_Register is record
ADDR_ECC : ECCR_ADDR_ECC_Field := 16#0#;
-- unspecified
Reserved_17_19 : HAL.UInt3 := 16#0#;
SYSF_ECC : Boolean := False;
-- unspecified
Reserved_21_23 : HAL.UInt3 := 16#0#;
ECCCIE : Boolean := False;
-- unspecified
Reserved_25_25 : HAL.Bit := 16#0#;
CPUID : ECCR_CPUID_Field := 16#0#;
-- unspecified
Reserved_29_29 : HAL.Bit := 16#0#;
ECCC : Boolean := False;
ECCD : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ECCR_Register use record
ADDR_ECC at 0 range 0 .. 16;
Reserved_17_19 at 0 range 17 .. 19;
SYSF_ECC at 0 range 20 .. 20;
Reserved_21_23 at 0 range 21 .. 23;
ECCCIE at 0 range 24 .. 24;
Reserved_25_25 at 0 range 25 .. 25;
CPUID at 0 range 26 .. 28;
Reserved_29_29 at 0 range 29 .. 29;
ECCC at 0 range 30 .. 30;
ECCD at 0 range 31 .. 31;
end record;
subtype OPTR_RDP_Field is HAL.UInt8;
subtype OPTR_BOR_LEV_Field is HAL.UInt3;
subtype OPTR_AGC_TRIM_Field is HAL.UInt3;
type OPTR_Register is record
RDP : OPTR_RDP_Field := 16#0#;
ESE : Boolean := False;
BOR_LEV : OPTR_BOR_LEV_Field := 16#0#;
nRST_STOP : Boolean := False;
nRST_STDBY : Boolean := False;
nRST_SHDW : Boolean := False;
-- unspecified
Reserved_15_15 : HAL.Bit := 16#0#;
IWDG_SW : Boolean := False;
IWDG_STOP : Boolean := False;
IWDG_STBY : Boolean := False;
WWDG_SW : Boolean := False;
-- unspecified
Reserved_20_22 : HAL.UInt3 := 16#0#;
nBOOT1 : Boolean := False;
SRAM2_PE : Boolean := False;
SRAM2_RST : Boolean := False;
nSWBOOT0 : Boolean := False;
nBOOT0 : Boolean := False;
-- unspecified
Reserved_28_28 : HAL.Bit := 16#0#;
AGC_TRIM : OPTR_AGC_TRIM_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OPTR_Register use record
RDP at 0 range 0 .. 7;
ESE at 0 range 8 .. 8;
BOR_LEV at 0 range 9 .. 11;
nRST_STOP at 0 range 12 .. 12;
nRST_STDBY at 0 range 13 .. 13;
nRST_SHDW at 0 range 14 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
IWDG_SW at 0 range 16 .. 16;
IWDG_STOP at 0 range 17 .. 17;
IWDG_STBY at 0 range 18 .. 18;
WWDG_SW at 0 range 19 .. 19;
Reserved_20_22 at 0 range 20 .. 22;
nBOOT1 at 0 range 23 .. 23;
SRAM2_PE at 0 range 24 .. 24;
SRAM2_RST at 0 range 25 .. 25;
nSWBOOT0 at 0 range 26 .. 26;
nBOOT0 at 0 range 27 .. 27;
Reserved_28_28 at 0 range 28 .. 28;
AGC_TRIM at 0 range 29 .. 31;
end record;
subtype PCROP1ASR_PCROP1A_STRT_Field is HAL.UInt9;
type PCROP1ASR_Register is record
PCROP1A_STRT : PCROP1ASR_PCROP1A_STRT_Field := 16#0#;
-- unspecified
Reserved_9_31 : HAL.UInt23 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PCROP1ASR_Register use record
PCROP1A_STRT at 0 range 0 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
subtype PCROP1AER_PCROP1A_END_Field is HAL.UInt9;
type PCROP1AER_Register is record
PCROP1A_END : PCROP1AER_PCROP1A_END_Field := 16#0#;
-- unspecified
Reserved_9_30 : HAL.UInt22 := 16#0#;
PCROP_RDP : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PCROP1AER_Register use record
PCROP1A_END at 0 range 0 .. 8;
Reserved_9_30 at 0 range 9 .. 30;
PCROP_RDP at 0 range 31 .. 31;
end record;
subtype WRP1AR_WRP1A_STRT_Field is HAL.UInt8;
subtype WRP1AR_WRP1A_END_Field is HAL.UInt8;
type WRP1AR_Register is record
WRP1A_STRT : WRP1AR_WRP1A_STRT_Field := 16#0#;
-- unspecified
Reserved_8_15 : HAL.UInt8 := 16#0#;
WRP1A_END : WRP1AR_WRP1A_END_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for WRP1AR_Register use record
WRP1A_STRT at 0 range 0 .. 7;
Reserved_8_15 at 0 range 8 .. 15;
WRP1A_END at 0 range 16 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype WRP1BR_WRP1B_STRT_Field is HAL.UInt8;
subtype WRP1BR_WRP1B_END_Field is HAL.UInt8;
type WRP1BR_Register is record
WRP1B_STRT : WRP1BR_WRP1B_STRT_Field := 16#0#;
-- unspecified
Reserved_8_15 : HAL.UInt8 := 16#0#;
WRP1B_END : WRP1BR_WRP1B_END_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for WRP1BR_Register use record
WRP1B_STRT at 0 range 0 .. 7;
Reserved_8_15 at 0 range 8 .. 15;
WRP1B_END at 0 range 16 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype PCROP1BSR_PCROP1B_STRT_Field is HAL.UInt9;
type PCROP1BSR_Register is record
PCROP1B_STRT : PCROP1BSR_PCROP1B_STRT_Field := 16#0#;
-- unspecified
Reserved_9_31 : HAL.UInt23 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PCROP1BSR_Register use record
PCROP1B_STRT at 0 range 0 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
subtype PCROP1BER_PCROP1B_END_Field is HAL.UInt9;
type PCROP1BER_Register is record
PCROP1B_END : PCROP1BER_PCROP1B_END_Field := 16#0#;
-- unspecified
Reserved_9_31 : HAL.UInt23 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PCROP1BER_Register use record
PCROP1B_END at 0 range 0 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
subtype IPCCBR_IPCCDBA_Field is HAL.UInt14;
type IPCCBR_Register is record
IPCCDBA : IPCCBR_IPCCDBA_Field := 16#0#;
-- unspecified
Reserved_14_31 : HAL.UInt18 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IPCCBR_Register use record
IPCCDBA at 0 range 0 .. 13;
Reserved_14_31 at 0 range 14 .. 31;
end record;
type C2ACR_Register is record
-- unspecified
Reserved_0_7 : HAL.UInt8 := 16#0#;
PRFTEN : Boolean := False;
ICEN : Boolean := False;
-- unspecified
Reserved_10_10 : HAL.Bit := 16#0#;
ICRST : Boolean := False;
-- unspecified
Reserved_12_14 : HAL.UInt3 := 16#0#;
PES : Boolean := False;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for C2ACR_Register use record
Reserved_0_7 at 0 range 0 .. 7;
PRFTEN at 0 range 8 .. 8;
ICEN at 0 range 9 .. 9;
Reserved_10_10 at 0 range 10 .. 10;
ICRST at 0 range 11 .. 11;
Reserved_12_14 at 0 range 12 .. 14;
PES at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
type C2SR_Register is record
EOP : Boolean := False;
OPERR : Boolean := False;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
PROGERR : Boolean := False;
WRPERR : Boolean := False;
PGAERR : Boolean := False;
SIZERR : Boolean := False;
PGSERR : Boolean := False;
MISERR : Boolean := False;
FASTERR : Boolean := False;
-- unspecified
Reserved_10_13 : HAL.UInt4 := 16#0#;
RDERR : Boolean := False;
-- unspecified
Reserved_15_15 : HAL.Bit := 16#0#;
BSY : Boolean := False;
-- unspecified
Reserved_17_17 : HAL.Bit := 16#0#;
CFGBSY : Boolean := False;
PESD : Boolean := False;
-- unspecified
Reserved_20_31 : HAL.UInt12 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for C2SR_Register use record
EOP at 0 range 0 .. 0;
OPERR at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
PROGERR at 0 range 3 .. 3;
WRPERR at 0 range 4 .. 4;
PGAERR at 0 range 5 .. 5;
SIZERR at 0 range 6 .. 6;
PGSERR at 0 range 7 .. 7;
MISERR at 0 range 8 .. 8;
FASTERR at 0 range 9 .. 9;
Reserved_10_13 at 0 range 10 .. 13;
RDERR at 0 range 14 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
BSY at 0 range 16 .. 16;
Reserved_17_17 at 0 range 17 .. 17;
CFGBSY at 0 range 18 .. 18;
PESD at 0 range 19 .. 19;
Reserved_20_31 at 0 range 20 .. 31;
end record;
subtype C2CR_PNB_Field is HAL.UInt8;
type C2CR_Register is record
PG : Boolean := False;
PER : Boolean := False;
MER : Boolean := False;
PNB : C2CR_PNB_Field := 16#0#;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
STRT : Boolean := False;
-- unspecified
Reserved_17_17 : HAL.Bit := 16#0#;
FSTPG : Boolean := False;
-- unspecified
Reserved_19_23 : HAL.UInt5 := 16#0#;
EOPIE : Boolean := False;
ERRIE : Boolean := False;
RDERRIE : Boolean := False;
-- unspecified
Reserved_27_31 : HAL.UInt5 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for C2CR_Register use record
PG at 0 range 0 .. 0;
PER at 0 range 1 .. 1;
MER at 0 range 2 .. 2;
PNB at 0 range 3 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
STRT at 0 range 16 .. 16;
Reserved_17_17 at 0 range 17 .. 17;
FSTPG at 0 range 18 .. 18;
Reserved_19_23 at 0 range 19 .. 23;
EOPIE at 0 range 24 .. 24;
ERRIE at 0 range 25 .. 25;
RDERRIE at 0 range 26 .. 26;
Reserved_27_31 at 0 range 27 .. 31;
end record;
subtype SFR_SFSA_Field is HAL.UInt8;
type SFR_Register is record
SFSA : SFR_SFSA_Field := 16#0#;
FSD : Boolean := False;
-- unspecified
Reserved_9_11 : HAL.UInt3 := 16#0#;
DDS : Boolean := False;
-- unspecified
Reserved_13_31 : HAL.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SFR_Register use record
SFSA at 0 range 0 .. 7;
FSD at 0 range 8 .. 8;
Reserved_9_11 at 0 range 9 .. 11;
DDS at 0 range 12 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
subtype SRRVR_SBRV_Field is HAL.UInt18;
subtype SRRVR_SBRSA_Field is HAL.UInt5;
subtype SRRVR_SNBRSA_Field is HAL.UInt5;
type SRRVR_Register is record
SBRV : SRRVR_SBRV_Field := 16#0#;
SBRSA : SRRVR_SBRSA_Field := 16#0#;
BRSD : Boolean := False;
-- unspecified
Reserved_24_24 : HAL.Bit := 16#0#;
SNBRSA : SRRVR_SNBRSA_Field := 16#0#;
NBRSD : Boolean := False;
C2OPT : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SRRVR_Register use record
SBRV at 0 range 0 .. 17;
SBRSA at 0 range 18 .. 22;
BRSD at 0 range 23 .. 23;
Reserved_24_24 at 0 range 24 .. 24;
SNBRSA at 0 range 25 .. 29;
NBRSD at 0 range 30 .. 30;
C2OPT at 0 range 31 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
type FLASH_Peripheral is record
ACR : aliased ACR_Register;
KEYR : aliased HAL.UInt32;
OPTKEYR : aliased HAL.UInt32;
SR : aliased SR_Register;
CR : aliased CR_Register;
ECCR : aliased ECCR_Register;
OPTR : aliased OPTR_Register;
PCROP1ASR : aliased PCROP1ASR_Register;
PCROP1AER : aliased PCROP1AER_Register;
WRP1AR : aliased WRP1AR_Register;
WRP1BR : aliased WRP1BR_Register;
PCROP1BSR : aliased PCROP1BSR_Register;
PCROP1BER : aliased PCROP1BER_Register;
IPCCBR : aliased IPCCBR_Register;
C2ACR : aliased C2ACR_Register;
C2SR : aliased C2SR_Register;
C2CR : aliased C2CR_Register;
SFR : aliased SFR_Register;
SRRVR : aliased SRRVR_Register;
end record
with Volatile;
for FLASH_Peripheral use record
ACR at 16#0# range 0 .. 31;
KEYR at 16#8# range 0 .. 31;
OPTKEYR at 16#C# range 0 .. 31;
SR at 16#10# range 0 .. 31;
CR at 16#14# range 0 .. 31;
ECCR at 16#18# range 0 .. 31;
OPTR at 16#20# range 0 .. 31;
PCROP1ASR at 16#24# range 0 .. 31;
PCROP1AER at 16#28# range 0 .. 31;
WRP1AR at 16#2C# range 0 .. 31;
WRP1BR at 16#30# range 0 .. 31;
PCROP1BSR at 16#34# range 0 .. 31;
PCROP1BER at 16#38# range 0 .. 31;
IPCCBR at 16#3C# range 0 .. 31;
C2ACR at 16#5C# range 0 .. 31;
C2SR at 16#60# range 0 .. 31;
C2CR at 16#64# range 0 .. 31;
SFR at 16#80# range 0 .. 31;
SRRVR at 16#84# range 0 .. 31;
end record;
FLASH_Periph : aliased FLASH_Peripheral
with Import, Address => System'To_Address (16#58004000#);
end STM32_SVD.FLASH;
| 34.094241
| 66
| 0.54269
|
f19422cc0bc2bb0294152ed425749efc1c8cc1cc
| 40,293
|
ads
|
Ada
|
include/xutil.ads
|
docandrew/troodon
|
9240611708f92ffb5491fa677bffb6ecac58a51e
|
[
"MIT"
] | 5
|
2021-11-03T04:34:16.000Z
|
2021-11-10T23:06:30.000Z
|
include/xutil.ads
|
docandrew/troodon
|
9240611708f92ffb5491fa677bffb6ecac58a51e
|
[
"MIT"
] | null | null | null |
include/xutil.ads
|
docandrew/troodon
|
9240611708f92ffb5491fa677bffb6ecac58a51e
|
[
"MIT"
] | null | null | null |
pragma Ada_2012;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
with X11;
with Interfaces.C.Strings;
with Xlib;
with System;
package Xutil is
NoValue : constant := 16#0000#; -- /usr/include/X11/Xutil.h:68
XValue : constant := 16#0001#; -- /usr/include/X11/Xutil.h:69
YValue : constant := 16#0002#; -- /usr/include/X11/Xutil.h:70
WidthValue : constant := 16#0004#; -- /usr/include/X11/Xutil.h:71
HeightValue : constant := 16#0008#; -- /usr/include/X11/Xutil.h:72
AllValues : constant := 16#000F#; -- /usr/include/X11/Xutil.h:73
XNegative : constant := 16#0010#; -- /usr/include/X11/Xutil.h:74
YNegative : constant := 16#0020#; -- /usr/include/X11/Xutil.h:75
USPosition : constant := (2 ** 0); -- /usr/include/X11/Xutil.h:102
USSize : constant := (2 ** 1); -- /usr/include/X11/Xutil.h:103
PPosition : constant := (2 ** 2); -- /usr/include/X11/Xutil.h:105
PSize : constant := (2 ** 3); -- /usr/include/X11/Xutil.h:106
PMinSize : constant := (2 ** 4); -- /usr/include/X11/Xutil.h:107
PMaxSize : constant := (2 ** 5); -- /usr/include/X11/Xutil.h:108
PResizeInc : constant := (2 ** 6); -- /usr/include/X11/Xutil.h:109
PAspect : constant := (2 ** 7); -- /usr/include/X11/Xutil.h:110
PBaseSize : constant := (2 ** 8); -- /usr/include/X11/Xutil.h:111
PWinGravity : constant := (2 ** 9); -- /usr/include/X11/Xutil.h:112
-- unsupported macro: PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect)
InputHint : constant := (2 ** 0); -- /usr/include/X11/Xutil.h:134
StateHint : constant := (2 ** 1); -- /usr/include/X11/Xutil.h:135
IconPixmapHint : constant := (2 ** 2); -- /usr/include/X11/Xutil.h:136
IconWindowHint : constant := (2 ** 3); -- /usr/include/X11/Xutil.h:137
IconPositionHint : constant := (2 ** 4); -- /usr/include/X11/Xutil.h:138
IconMaskHint : constant := (2 ** 5); -- /usr/include/X11/Xutil.h:139
WindowGroupHint : constant := (2 ** 6); -- /usr/include/X11/Xutil.h:140
-- unsupported macro: AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint| IconPositionHint|IconMaskHint|WindowGroupHint)
XUrgencyHint : constant := (2 ** 8); -- /usr/include/X11/Xutil.h:143
WithdrawnState : constant := 0; -- /usr/include/X11/Xutil.h:146
NormalState : constant := 1; -- /usr/include/X11/Xutil.h:147
IconicState : constant := 3; -- /usr/include/X11/Xutil.h:148
DontCareState : constant := 0; -- /usr/include/X11/Xutil.h:153
ZoomState : constant := 2; -- /usr/include/X11/Xutil.h:154
InactiveState : constant := 4; -- /usr/include/X11/Xutil.h:155
XNoMemory : constant := -1; -- /usr/include/X11/Xutil.h:170
XLocaleNotSupported : constant := -2; -- /usr/include/X11/Xutil.h:171
XConverterNotFound : constant := -3; -- /usr/include/X11/Xutil.h:172
-- arg-macro: function XDestroyImage (ximage)
-- return (*((ximage).f.destroy_image))((ximage));
-- arg-macro: function XGetPixel (ximage, x, y)
-- return (*((ximage).f.get_pixel))((ximage), (x), (y));
-- arg-macro: function XPutPixel (ximage, x, y, pixel)
-- return (*((ximage).f.put_pixel))((ximage), (x), (y), (pixel));
-- arg-macro: function XSubImage (ximage, x, y, width, height)
-- return (*((ximage).f.sub_image))((ximage), (x), (y), (width), (height));
-- arg-macro: function XAddPixel (ximage, value)
-- return (*((ximage).f.add_pixel))((ximage), (value));
-- arg-macro: function IsKeypadKey (keysym)
-- return ((KeySym)(keysym) >= XK_KP_Space) and then ((KeySym)(keysym) <= XK_KP_Equal);
-- arg-macro: function IsPrivateKeypadKey (keysym)
-- return ((KeySym)(keysym) >= 16#11000000#) and then ((KeySym)(keysym) <= 16#1100FFFF#);
-- arg-macro: function IsCursorKey (keysym)
-- return ((KeySym)(keysym) >= XK_Home) and then ((KeySym)(keysym) < XK_Select);
-- arg-macro: function IsPFKey (keysym)
-- return ((KeySym)(keysym) >= XK_KP_F1) and then ((KeySym)(keysym) <= XK_KP_F4);
-- arg-macro: function IsFunctionKey (keysym)
-- return ((KeySym)(keysym) >= XK_F1) and then ((KeySym)(keysym) <= XK_F35);
-- arg-macro: function IsMiscFunctionKey (keysym)
-- return ((KeySym)(keysym) >= XK_Select) and then ((KeySym)(keysym) <= XK_Break);
-- arg-macro: function IsModifierKey (keysym)
-- return (((KeySym)(keysym) >= XK_Shift_L) and then ((KeySym)(keysym) <= XK_Hyper_R)) or else (((KeySym)(keysym) >= XK_ISO_Lock) and then ((KeySym)(keysym) <= XK_ISO_Level5_Lock)) or else ((KeySym)(keysym) = XK_Mode_switch) or else ((KeySym)(keysym) = XK_Num_Lock);
RectangleOut : constant := 0; -- /usr/include/X11/Xutil.h:277
RectangleIn : constant := 1; -- /usr/include/X11/Xutil.h:278
RectanglePart : constant := 2; -- /usr/include/X11/Xutil.h:279
VisualNoMask : constant := 16#0#; -- /usr/include/X11/Xutil.h:304
VisualIDMask : constant := 16#1#; -- /usr/include/X11/Xutil.h:305
VisualScreenMask : constant := 16#2#; -- /usr/include/X11/Xutil.h:306
VisualDepthMask : constant := 16#4#; -- /usr/include/X11/Xutil.h:307
VisualClassMask : constant := 16#8#; -- /usr/include/X11/Xutil.h:308
VisualRedMaskMask : constant := 16#10#; -- /usr/include/X11/Xutil.h:309
VisualGreenMaskMask : constant := 16#20#; -- /usr/include/X11/Xutil.h:310
VisualBlueMaskMask : constant := 16#40#; -- /usr/include/X11/Xutil.h:311
VisualColormapSizeMask : constant := 16#80#; -- /usr/include/X11/Xutil.h:312
VisualBitsPerRGBMask : constant := 16#100#; -- /usr/include/X11/Xutil.h:313
VisualAllMask : constant := 16#1FF#; -- /usr/include/X11/Xutil.h:314
-- unsupported macro: ReleaseByFreeingColormap ((XID) 1L)
BitmapSuccess : constant := 0; -- /usr/include/X11/Xutil.h:339
BitmapOpenFailed : constant := 1; -- /usr/include/X11/Xutil.h:340
BitmapFileInvalid : constant := 2; -- /usr/include/X11/Xutil.h:341
BitmapNoMemory : constant := 3; -- /usr/include/X11/Xutil.h:342
XCSUCCESS : constant := 0; -- /usr/include/X11/Xutil.h:353
XCNOMEM : constant := 1; -- /usr/include/X11/Xutil.h:354
XCNOENT : constant := 2; -- /usr/include/X11/Xutil.h:355
-- arg-macro: function XUniqueContext ()
-- return (XContext) XrmUniqueQuark();
-- arg-macro: function XStringToContext (string)
-- return (XContext) XrmStringToQuark(string);
--**********************************************************
--Copyright 1987, 1998 The Open Group
--Permission to use, copy, modify, distribute, and sell this software and its
--documentation for any purpose is hereby granted without fee, provided that
--the above copyright notice appear in all copies and that both that
--copyright notice and this permission notice appear in supporting
--documentation.
--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
--OPEN GROUP 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.
--Except as contained in this notice, the name of The Open Group shall not be
--used in advertising or otherwise to promote the sale, use or other dealings
--in this Software without prior written authorization from The Open Group.
--Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-- All Rights Reserved
--Permission to use, copy, modify, and distribute this software and its
--documentation for any purpose and without fee is hereby granted,
--provided that the above copyright notice appear in all copies and that
--both that copyright notice and this permission notice appear in
--supporting documentation, and that the name of Digital not be
--used in advertising or publicity pertaining to distribution of the
--software without specific, written prior permission.
--DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
--ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
--DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
--ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
--WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
--ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
--SOFTWARE.
--*****************************************************************
-- You must include <X11/Xlib.h> before including this file
-- The Xlib structs are full of implicit padding to properly align members.
-- We can't clean that up without breaking ABI, so tell clang not to bother
-- complaining about it.
-- * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding
-- * value (x, y, width, height) was found in the parsed string.
--
-- * new version containing base_width, base_height, and win_gravity fields;
-- * used with WM_NORMAL_HINTS.
--
-- marks which fields in this structure are defined
-- skipped anonymous struct anon_97
type anon_98 is record
x : aliased int; -- /usr/include/X11/Xutil.h:89
y : aliased int; -- /usr/include/X11/Xutil.h:90
end record
with Convention => C_Pass_By_Copy;
type XSizeHints is record
flags : aliased long; -- /usr/include/X11/Xutil.h:82
x : aliased int; -- /usr/include/X11/Xutil.h:83
y : aliased int; -- /usr/include/X11/Xutil.h:83
width : aliased int; -- /usr/include/X11/Xutil.h:84
height : aliased int; -- /usr/include/X11/Xutil.h:84
min_width : aliased int; -- /usr/include/X11/Xutil.h:85
min_height : aliased int; -- /usr/include/X11/Xutil.h:85
max_width : aliased int; -- /usr/include/X11/Xutil.h:86
max_height : aliased int; -- /usr/include/X11/Xutil.h:86
width_inc : aliased int; -- /usr/include/X11/Xutil.h:87
height_inc : aliased int; -- /usr/include/X11/Xutil.h:87
min_aspect : aliased anon_98; -- /usr/include/X11/Xutil.h:91
max_aspect : aliased anon_98; -- /usr/include/X11/Xutil.h:91
base_width : aliased int; -- /usr/include/X11/Xutil.h:92
base_height : aliased int; -- /usr/include/X11/Xutil.h:92
win_gravity : aliased int; -- /usr/include/X11/Xutil.h:93
end record
with Convention => C_Pass_By_Copy; -- /usr/include/X11/Xutil.h:94
-- obsolete for new window mgrs, but clients
-- should set so old wm's don't mess up
-- numerator
-- denominator
-- added by ICCCM version 1
-- added by ICCCM version 1
-- * The next block of definitions are for window manager properties that
-- * clients and applications use for communication.
--
-- flags argument in size hints
-- obsolete
-- marks which fields in this structure are defined
-- skipped anonymous struct anon_99
type XWMHints is record
flags : aliased long; -- /usr/include/X11/Xutil.h:120
input : aliased int; -- /usr/include/X11/Xutil.h:121
initial_state : aliased int; -- /usr/include/X11/Xutil.h:123
icon_pixmap : aliased X11.Pixmap; -- /usr/include/X11/Xutil.h:124
icon_window : aliased X11.Window; -- /usr/include/X11/Xutil.h:125
icon_x : aliased int; -- /usr/include/X11/Xutil.h:126
icon_y : aliased int; -- /usr/include/X11/Xutil.h:126
icon_mask : aliased X11.Pixmap; -- /usr/include/X11/Xutil.h:127
window_group : aliased X11.XID; -- /usr/include/X11/Xutil.h:128
end record
with Convention => C_Pass_By_Copy; -- /usr/include/X11/Xutil.h:130
-- does this application rely on the window manager to
-- get keyboard input?
-- see below
-- pixmap to be used as icon
-- window to be used as icon
-- initial position of icon
-- icon mask bitmap
-- id of related window group
-- this structure may be extended in the future
-- definition for flags of XWMHints
-- definitions for initial window state
-- * Obsolete states no longer defined by ICCCM
--
-- some wm's may put it on inactive menu
-- * new structure for manipulating TEXT properties; used with WM_NAME,
-- * WM_ICON_NAME, WM_CLIENT_MACHINE, and WM_COMMAND.
--
-- same as Property routines
-- skipped anonymous struct anon_100
type XTextProperty is record
value : access unsigned_char; -- /usr/include/X11/Xutil.h:164
encoding : aliased X11.Atom; -- /usr/include/X11/Xutil.h:165
format : aliased int; -- /usr/include/X11/Xutil.h:166
nitems : aliased unsigned_long; -- /usr/include/X11/Xutil.h:167
end record
with Convention => C_Pass_By_Copy; -- /usr/include/X11/Xutil.h:168
-- prop type
-- prop data format: 8, 16, or 32
-- number of data items in value
-- STRING
-- COMPOUND_TEXT
-- text in owner's encoding (current locale)
-- STRING, else COMPOUND_TEXT
-- The following is an XFree86 extension, introduced in November 2000
-- UTF8_STRING
type XICCEncodingStyle is
(XStringStyle,
XCompoundTextStyle,
XTextStyle,
XStdICCTextStyle,
XUTF8StringStyle)
with Convention => C; -- /usr/include/X11/Xutil.h:181
-- skipped anonymous struct anon_102
type XIconSize is record
min_width : aliased int; -- /usr/include/X11/Xutil.h:184
min_height : aliased int; -- /usr/include/X11/Xutil.h:184
max_width : aliased int; -- /usr/include/X11/Xutil.h:185
max_height : aliased int; -- /usr/include/X11/Xutil.h:185
width_inc : aliased int; -- /usr/include/X11/Xutil.h:186
height_inc : aliased int; -- /usr/include/X11/Xutil.h:186
end record
with Convention => C_Pass_By_Copy; -- /usr/include/X11/Xutil.h:187
-- skipped anonymous struct anon_103
type XClassHint is record
res_name : Interfaces.C.Strings.chars_ptr; -- /usr/include/X11/Xutil.h:190
res_class : Interfaces.C.Strings.chars_ptr; -- /usr/include/X11/Xutil.h:191
end record
with Convention => C_Pass_By_Copy; -- /usr/include/X11/Xutil.h:192
-- * These macros are used to give some sugar to the image routines so that
-- * naive people are more comfortable with them.
--
-- * Compose sequence status structure, used in calling XLookupString.
--
-- state table pointer
type u_XComposeStatus is record
compose_ptr : Xlib.XPointer; -- /usr/include/X11/Xutil.h:232
chars_matched : aliased int; -- /usr/include/X11/Xutil.h:233
end record
with Convention => C_Pass_By_Copy; -- /usr/include/X11/Xutil.h:231
-- match state
subtype XComposeStatus is u_XComposeStatus; -- /usr/include/X11/Xutil.h:234
-- * Keysym macros, used on Keysyms to test for classes of symbols
--
-- * opaque reference to Region data type
--
type u_XRegion is null record; -- incomplete struct
type Region is access all u_XRegion; -- /usr/include/X11/Xutil.h:273
-- Return values from XRectInRegion()
-- * Information used by the visual utility routines to find desired visual
-- * type from the many visuals a display may support.
--
-- skipped anonymous struct anon_104
type XVisualInfo is record
the_visual : access Xlib.Visual; -- /usr/include/X11/Xutil.h:288
the_visualid : aliased X11.VisualID; -- /usr/include/X11/Xutil.h:289
screen : aliased int; -- /usr/include/X11/Xutil.h:290
depth : aliased int; -- /usr/include/X11/Xutil.h:291
c_class : aliased int; -- /usr/include/X11/Xutil.h:293
red_mask : aliased unsigned_long; -- /usr/include/X11/Xutil.h:297
green_mask : aliased unsigned_long; -- /usr/include/X11/Xutil.h:298
blue_mask : aliased unsigned_long; -- /usr/include/X11/Xutil.h:299
colormap_size : aliased int; -- /usr/include/X11/Xutil.h:300
bits_per_rgb : aliased int; -- /usr/include/X11/Xutil.h:301
end record
with Convention => C_Pass_By_Copy; -- /usr/include/X11/Xutil.h:302
-- C++
-- * This defines a window manager property that clients may use to
-- * share standard color maps of type RGB_COLOR_MAP:
--
-- skipped anonymous struct anon_105
type XStandardColormap is record
the_colormap : aliased X11.Colormap; -- /usr/include/X11/Xutil.h:321
red_max : aliased unsigned_long; -- /usr/include/X11/Xutil.h:322
red_mult : aliased unsigned_long; -- /usr/include/X11/Xutil.h:323
green_max : aliased unsigned_long; -- /usr/include/X11/Xutil.h:324
green_mult : aliased unsigned_long; -- /usr/include/X11/Xutil.h:325
blue_max : aliased unsigned_long; -- /usr/include/X11/Xutil.h:326
blue_mult : aliased unsigned_long; -- /usr/include/X11/Xutil.h:327
base_pixel : aliased unsigned_long; -- /usr/include/X11/Xutil.h:328
the_visualid : aliased X11.VisualID; -- /usr/include/X11/Xutil.h:329
killid : aliased X11.XID; -- /usr/include/X11/Xutil.h:330
end record
with Convention => C_Pass_By_Copy; -- /usr/include/X11/Xutil.h:331
-- added by ICCCM version 1
-- added by ICCCM version 1
-- * return codes for XReadBitmapFile and XWriteBitmapFile
--
--***************************************************************
-- *
-- * Context Management
-- *
-- ***************************************************************
-- Associative lookup table return codes
subtype XContext is int; -- /usr/include/X11/Xutil.h:357
-- The following declarations are alphabetized.
function XAllocClassHint return access XClassHint -- /usr/include/X11/Xutil.h:366
with Import => True,
Convention => C,
External_Name => "XAllocClassHint";
function XAllocIconSize return access XIconSize -- /usr/include/X11/Xutil.h:370
with Import => True,
Convention => C,
External_Name => "XAllocIconSize";
function XAllocSizeHints return access XSizeHints -- /usr/include/X11/Xutil.h:374
with Import => True,
Convention => C,
External_Name => "XAllocSizeHints";
function XAllocStandardColormap return access XStandardColormap -- /usr/include/X11/Xutil.h:378
with Import => True,
Convention => C,
External_Name => "XAllocStandardColormap";
function XAllocWMHints return access XWMHints -- /usr/include/X11/Xutil.h:382
with Import => True,
Convention => C,
External_Name => "XAllocWMHints";
function XClipBox (arg1 : Region; arg2 : access Xlib.XRectangle) return int -- /usr/include/X11/Xutil.h:386
with Import => True,
Convention => C,
External_Name => "XClipBox";
-- r
-- rect_return
function XCreateRegion return Region -- /usr/include/X11/Xutil.h:391
with Import => True,
Convention => C,
External_Name => "XCreateRegion";
function XDefaultString return Interfaces.C.Strings.chars_ptr -- /usr/include/X11/Xutil.h:395
with Import => True,
Convention => C,
External_Name => "XDefaultString";
function XDeleteContext
(arg1 : access Xlib.Display;
arg2 : X11.XID;
arg3 : XContext) return int -- /usr/include/X11/Xutil.h:397
with Import => True,
Convention => C,
External_Name => "XDeleteContext";
-- display
-- rid
-- context
function XDestroyRegion (arg1 : Region) return int -- /usr/include/X11/Xutil.h:403
with Import => True,
Convention => C,
External_Name => "XDestroyRegion";
-- r
function XEmptyRegion (arg1 : Region) return int -- /usr/include/X11/Xutil.h:407
with Import => True,
Convention => C,
External_Name => "XEmptyRegion";
-- r
function XEqualRegion (arg1 : Region; arg2 : Region) return int -- /usr/include/X11/Xutil.h:411
with Import => True,
Convention => C,
External_Name => "XEqualRegion";
-- r1
-- r2
function XFindContext
(arg1 : access Xlib.Display;
arg2 : X11.XID;
arg3 : XContext;
arg4 : System.Address) return int -- /usr/include/X11/Xutil.h:416
with Import => True,
Convention => C,
External_Name => "XFindContext";
-- display
-- rid
-- context
-- data_return
function XGetClassHint
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XClassHint) return int -- /usr/include/X11/Xutil.h:423
with Import => True,
Convention => C,
External_Name => "XGetClassHint";
-- display
-- w
-- class_hints_return
function XGetIconSizes
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : System.Address;
arg4 : access int) return int -- /usr/include/X11/Xutil.h:429
with Import => True,
Convention => C,
External_Name => "XGetIconSizes";
-- display
-- w
-- size_list_return
-- count_return
function XGetNormalHints
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XSizeHints) return int -- /usr/include/X11/Xutil.h:436
with Import => True,
Convention => C,
External_Name => "XGetNormalHints";
-- display
-- w
-- hints_return
function XGetRGBColormaps
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : System.Address;
arg4 : access int;
arg5 : X11.Atom) return int -- /usr/include/X11/Xutil.h:442
with Import => True,
Convention => C,
External_Name => "XGetRGBColormaps";
-- display
-- w
-- stdcmap_return
-- count_return
-- property
function XGetSizeHints
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XSizeHints;
arg4 : X11.Atom) return int -- /usr/include/X11/Xutil.h:450
with Import => True,
Convention => C,
External_Name => "XGetSizeHints";
-- display
-- w
-- hints_return
-- property
function XGetStandardColormap
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XStandardColormap;
arg4 : X11.Atom) return int -- /usr/include/X11/Xutil.h:457
with Import => True,
Convention => C,
External_Name => "XGetStandardColormap";
-- display
-- w
-- colormap_return
-- property
function XGetTextProperty
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XTextProperty;
arg4 : X11.Atom) return int -- /usr/include/X11/Xutil.h:464
with Import => True,
Convention => C,
External_Name => "XGetTextProperty";
-- display
-- window
-- text_prop_return
-- property
function XGetVisualInfo
(arg1 : access Xlib.Display;
arg2 : long;
arg3 : access XVisualInfo;
arg4 : access int) return access XVisualInfo -- /usr/include/X11/Xutil.h:471
with Import => True,
Convention => C,
External_Name => "XGetVisualInfo";
-- display
-- vinfo_mask
-- vinfo_template
-- nitems_return
function XGetWMClientMachine
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XTextProperty) return int -- /usr/include/X11/Xutil.h:478
with Import => True,
Convention => C,
External_Name => "XGetWMClientMachine";
-- display
-- w
-- text_prop_return
function XGetWMHints (arg1 : access Xlib.Display; arg2 : X11.Window) return access XWMHints -- /usr/include/X11/Xutil.h:484
with Import => True,
Convention => C,
External_Name => "XGetWMHints";
-- display
-- w
function XGetWMIconName
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XTextProperty) return int -- /usr/include/X11/Xutil.h:489
with Import => True,
Convention => C,
External_Name => "XGetWMIconName";
-- display
-- w
-- text_prop_return
function XGetWMName
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XTextProperty) return int -- /usr/include/X11/Xutil.h:495
with Import => True,
Convention => C,
External_Name => "XGetWMName";
-- display
-- w
-- text_prop_return
function XGetWMNormalHints
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XSizeHints;
arg4 : access long) return int -- /usr/include/X11/Xutil.h:501
with Import => True,
Convention => C,
External_Name => "XGetWMNormalHints";
-- display
-- w
-- hints_return
-- supplied_return
function XGetWMSizeHints
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XSizeHints;
arg4 : access long;
arg5 : X11.Atom) return int -- /usr/include/X11/Xutil.h:508
with Import => True,
Convention => C,
External_Name => "XGetWMSizeHints";
-- display
-- w
-- hints_return
-- supplied_return
-- property
function XGetZoomHints
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XSizeHints) return int -- /usr/include/X11/Xutil.h:516
with Import => True,
Convention => C,
External_Name => "XGetZoomHints";
-- display
-- w
-- zhints_return
function XIntersectRegion
(arg1 : Region;
arg2 : Region;
arg3 : Region) return int -- /usr/include/X11/Xutil.h:522
with Import => True,
Convention => C,
External_Name => "XIntersectRegion";
-- sra
-- srb
-- dr_return
procedure XConvertCase
(arg1 : X11.KeySym;
arg2 : access X11.KeySym;
arg3 : access X11.KeySym) -- /usr/include/X11/Xutil.h:528
with Import => True,
Convention => C,
External_Name => "XConvertCase";
-- sym
-- lower
-- upper
function XLookupString
(arg1 : access Xlib.XKeyEvent;
arg2 : Interfaces.C.Strings.chars_ptr;
arg3 : int;
arg4 : access X11.KeySym;
arg5 : access XComposeStatus) return int -- /usr/include/X11/Xutil.h:534
with Import => True,
Convention => C,
External_Name => "XLookupString";
-- event_struct
-- buffer_return
-- bytes_buffer
-- keysym_return
-- status_in_out
function XMatchVisualInfo
(arg1 : access Xlib.Display;
arg2 : int;
arg3 : int;
arg4 : int;
arg5 : access XVisualInfo) return int -- /usr/include/X11/Xutil.h:542
with Import => True,
Convention => C,
External_Name => "XMatchVisualInfo";
-- display
-- screen
-- depth
-- class
-- vinfo_return
function XOffsetRegion
(arg1 : Region;
arg2 : int;
arg3 : int) return int -- /usr/include/X11/Xutil.h:550
with Import => True,
Convention => C,
External_Name => "XOffsetRegion";
-- r
-- dx
-- dy
function XPointInRegion
(arg1 : Region;
arg2 : int;
arg3 : int) return int -- /usr/include/X11/Xutil.h:556
with Import => True,
Convention => C,
External_Name => "XPointInRegion";
-- r
-- x
-- y
function XPolygonRegion
(arg1 : access Xlib.XPoint;
arg2 : int;
arg3 : int) return Region -- /usr/include/X11/Xutil.h:562
with Import => True,
Convention => C,
External_Name => "XPolygonRegion";
-- points
-- n
-- fill_rule
function XRectInRegion
(arg1 : Region;
arg2 : int;
arg3 : int;
arg4 : unsigned;
arg5 : unsigned) return int -- /usr/include/X11/Xutil.h:568
with Import => True,
Convention => C,
External_Name => "XRectInRegion";
-- r
-- x
-- y
-- width
-- height
function XSaveContext
(arg1 : access Xlib.Display;
arg2 : X11.XID;
arg3 : XContext;
arg4 : Interfaces.C.Strings.chars_ptr) return int -- /usr/include/X11/Xutil.h:576
with Import => True,
Convention => C,
External_Name => "XSaveContext";
-- display
-- rid
-- context
-- data
function XSetClassHint
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XClassHint) return int -- /usr/include/X11/Xutil.h:583
with Import => True,
Convention => C,
External_Name => "XSetClassHint";
-- display
-- w
-- class_hints
function XSetIconSizes
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XIconSize;
arg4 : int) return int -- /usr/include/X11/Xutil.h:589
with Import => True,
Convention => C,
External_Name => "XSetIconSizes";
-- display
-- w
-- size_list
-- count
function XSetNormalHints
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XSizeHints) return int -- /usr/include/X11/Xutil.h:596
with Import => True,
Convention => C,
External_Name => "XSetNormalHints";
-- display
-- w
-- hints
procedure XSetRGBColormaps
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XStandardColormap;
arg4 : int;
arg5 : X11.Atom) -- /usr/include/X11/Xutil.h:602
with Import => True,
Convention => C,
External_Name => "XSetRGBColormaps";
-- display
-- w
-- stdcmaps
-- count
-- property
function XSetSizeHints
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XSizeHints;
arg4 : X11.Atom) return int -- /usr/include/X11/Xutil.h:610
with Import => True,
Convention => C,
External_Name => "XSetSizeHints";
-- display
-- w
-- hints
-- property
function XSetStandardProperties
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : Interfaces.C.Strings.chars_ptr;
arg4 : Interfaces.C.Strings.chars_ptr;
arg5 : X11.Pixmap;
arg6 : System.Address;
arg7 : int;
arg8 : access XSizeHints) return int -- /usr/include/X11/Xutil.h:617
with Import => True,
Convention => C,
External_Name => "XSetStandardProperties";
-- display
-- w
-- window_name
-- icon_name
-- icon_pixmap
-- argv
-- argc
-- hints
procedure XSetTextProperty
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XTextProperty;
arg4 : X11.Atom) -- /usr/include/X11/Xutil.h:628
with Import => True,
Convention => C,
External_Name => "XSetTextProperty";
-- display
-- w
-- text_prop
-- property
procedure XSetWMClientMachine
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XTextProperty) -- /usr/include/X11/Xutil.h:635
with Import => True,
Convention => C,
External_Name => "XSetWMClientMachine";
-- display
-- w
-- text_prop
function XSetWMHints
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XWMHints) return int -- /usr/include/X11/Xutil.h:641
with Import => True,
Convention => C,
External_Name => "XSetWMHints";
-- display
-- w
-- wm_hints
procedure XSetWMIconName
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XTextProperty) -- /usr/include/X11/Xutil.h:647
with Import => True,
Convention => C,
External_Name => "XSetWMIconName";
-- display
-- w
-- text_prop
procedure XSetWMName
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XTextProperty) -- /usr/include/X11/Xutil.h:653
with Import => True,
Convention => C,
External_Name => "XSetWMName";
-- display
-- w
-- text_prop
procedure XSetWMNormalHints
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XSizeHints) -- /usr/include/X11/Xutil.h:659
with Import => True,
Convention => C,
External_Name => "XSetWMNormalHints";
-- display
-- w
-- hints
procedure XSetWMProperties
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XTextProperty;
arg4 : access XTextProperty;
arg5 : System.Address;
arg6 : int;
arg7 : access XSizeHints;
arg8 : access XWMHints;
arg9 : access XClassHint) -- /usr/include/X11/Xutil.h:665
with Import => True,
Convention => C,
External_Name => "XSetWMProperties";
-- display
-- w
-- window_name
-- icon_name
-- argv
-- argc
-- normal_hints
-- wm_hints
-- class_hints
procedure XmbSetWMProperties
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : Interfaces.C.Strings.chars_ptr;
arg4 : Interfaces.C.Strings.chars_ptr;
arg5 : System.Address;
arg6 : int;
arg7 : access XSizeHints;
arg8 : access XWMHints;
arg9 : access XClassHint) -- /usr/include/X11/Xutil.h:677
with Import => True,
Convention => C,
External_Name => "XmbSetWMProperties";
-- display
-- w
-- window_name
-- icon_name
-- argv
-- argc
-- normal_hints
-- wm_hints
-- class_hints
procedure Xutf8SetWMProperties
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : Interfaces.C.Strings.chars_ptr;
arg4 : Interfaces.C.Strings.chars_ptr;
arg5 : System.Address;
arg6 : int;
arg7 : access XSizeHints;
arg8 : access XWMHints;
arg9 : access XClassHint) -- /usr/include/X11/Xutil.h:689
with Import => True,
Convention => C,
External_Name => "Xutf8SetWMProperties";
-- display
-- w
-- window_name
-- icon_name
-- argv
-- argc
-- normal_hints
-- wm_hints
-- class_hints
procedure XSetWMSizeHints
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XSizeHints;
arg4 : X11.Atom) -- /usr/include/X11/Xutil.h:701
with Import => True,
Convention => C,
External_Name => "XSetWMSizeHints";
-- display
-- w
-- hints
-- property
function XSetRegion
(arg1 : access Xlib.Display;
arg2 : Xlib.GC;
arg3 : Region) return int -- /usr/include/X11/Xutil.h:708
with Import => True,
Convention => C,
External_Name => "XSetRegion";
-- display
-- gc
-- r
procedure XSetStandardColormap
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XStandardColormap;
arg4 : X11.Atom) -- /usr/include/X11/Xutil.h:714
with Import => True,
Convention => C,
External_Name => "XSetStandardColormap";
-- display
-- w
-- colormap
-- property
function XSetZoomHints
(arg1 : access Xlib.Display;
arg2 : X11.Window;
arg3 : access XSizeHints) return int -- /usr/include/X11/Xutil.h:721
with Import => True,
Convention => C,
External_Name => "XSetZoomHints";
-- display
-- w
-- zhints
function XShrinkRegion
(arg1 : Region;
arg2 : int;
arg3 : int) return int -- /usr/include/X11/Xutil.h:727
with Import => True,
Convention => C,
External_Name => "XShrinkRegion";
-- r
-- dx
-- dy
function XStringListToTextProperty
(arg1 : System.Address;
arg2 : int;
arg3 : access XTextProperty) return int -- /usr/include/X11/Xutil.h:733
with Import => True,
Convention => C,
External_Name => "XStringListToTextProperty";
-- list
-- count
-- text_prop_return
function XSubtractRegion
(arg1 : Region;
arg2 : Region;
arg3 : Region) return int -- /usr/include/X11/Xutil.h:739
with Import => True,
Convention => C,
External_Name => "XSubtractRegion";
-- sra
-- srb
-- dr_return
function XmbTextListToTextProperty
(the_display : access Xlib.Display;
list : System.Address;
count : int;
style : XICCEncodingStyle;
text_prop_return : access XTextProperty) return int -- /usr/include/X11/Xutil.h:745
with Import => True,
Convention => C,
External_Name => "XmbTextListToTextProperty";
function XwcTextListToTextProperty
(the_display : access Xlib.Display;
list : System.Address;
count : int;
style : XICCEncodingStyle;
text_prop_return : access XTextProperty) return int -- /usr/include/X11/Xutil.h:753
with Import => True,
Convention => C,
External_Name => "XwcTextListToTextProperty";
function Xutf8TextListToTextProperty
(the_display : access Xlib.Display;
list : System.Address;
count : int;
style : XICCEncodingStyle;
text_prop_return : access XTextProperty) return int -- /usr/include/X11/Xutil.h:761
with Import => True,
Convention => C,
External_Name => "Xutf8TextListToTextProperty";
procedure XwcFreeStringList (list : System.Address) -- /usr/include/X11/Xutil.h:769
with Import => True,
Convention => C,
External_Name => "XwcFreeStringList";
function XTextPropertyToStringList
(arg1 : access XTextProperty;
arg2 : System.Address;
arg3 : access int) return int -- /usr/include/X11/Xutil.h:773
with Import => True,
Convention => C,
External_Name => "XTextPropertyToStringList";
-- text_prop
-- list_return
-- count_return
function XmbTextPropertyToTextList
(the_display : access Xlib.Display;
text_prop : access constant XTextProperty;
list_return : System.Address;
count_return : access int) return int -- /usr/include/X11/Xutil.h:779
with Import => True,
Convention => C,
External_Name => "XmbTextPropertyToTextList";
function XwcTextPropertyToTextList
(the_display : access Xlib.Display;
text_prop : access constant XTextProperty;
list_return : System.Address;
count_return : access int) return int -- /usr/include/X11/Xutil.h:786
with Import => True,
Convention => C,
External_Name => "XwcTextPropertyToTextList";
function Xutf8TextPropertyToTextList
(the_display : access Xlib.Display;
text_prop : access constant XTextProperty;
list_return : System.Address;
count_return : access int) return int -- /usr/include/X11/Xutil.h:793
with Import => True,
Convention => C,
External_Name => "Xutf8TextPropertyToTextList";
function XUnionRectWithRegion
(arg1 : access Xlib.XRectangle;
arg2 : Region;
arg3 : Region) return int -- /usr/include/X11/Xutil.h:800
with Import => True,
Convention => C,
External_Name => "XUnionRectWithRegion";
-- rectangle
-- src_region
-- dest_region_return
function XUnionRegion
(arg1 : Region;
arg2 : Region;
arg3 : Region) return int -- /usr/include/X11/Xutil.h:806
with Import => True,
Convention => C,
External_Name => "XUnionRegion";
-- sra
-- srb
-- dr_return
function XWMGeometry
(arg1 : access Xlib.Display;
arg2 : int;
arg3 : Interfaces.C.Strings.chars_ptr;
arg4 : Interfaces.C.Strings.chars_ptr;
arg5 : unsigned;
arg6 : access XSizeHints;
arg7 : access int;
arg8 : access int;
arg9 : access int;
arg10 : access int;
arg11 : access int) return int -- /usr/include/X11/Xutil.h:812
with Import => True,
Convention => C,
External_Name => "XWMGeometry";
-- display
-- screen_number
-- user_geometry
-- default_geometry
-- border_width
-- hints
-- x_return
-- y_return
-- width_return
-- height_return
-- gravity_return
function XXorRegion
(arg1 : Region;
arg2 : Region;
arg3 : Region) return int -- /usr/include/X11/Xutil.h:826
with Import => True,
Convention => C,
External_Name => "XXorRegion";
-- sra
-- srb
-- dr_return
end Xutil;
| 34.060017
| 282
| 0.624848
|
7f1a22875efa0618c0fd181b0c6157b8d5c004a5
| 14,449
|
adb
|
Ada
|
bb-runtimes/runtimes/ravenscar-full-stm32g474/gnarl/s-tpobop.adb
|
JCGobbi/Nucleo-STM32G474RE
|
8dc1c4948ffeb11841eed10f1c3708f00fa1d832
|
[
"BSD-3-Clause"
] | null | null | null |
bb-runtimes/runtimes/ravenscar-full-stm32g474/gnarl/s-tpobop.adb
|
JCGobbi/Nucleo-STM32G474RE
|
8dc1c4948ffeb11841eed10f1c3708f00fa1d832
|
[
"BSD-3-Clause"
] | null | null | null |
bb-runtimes/runtimes/ravenscar-full-stm32g474/gnarl/s-tpobop.adb
|
JCGobbi/Nucleo-STM32G474RE
|
8dc1c4948ffeb11841eed10f1c3708f00fa1d832
|
[
"BSD-3-Clause"
] | null | null | null |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- SYSTEM.TASKING.PROTECTED_OBJECTS.OPERATIONS --
-- --
-- B o d y --
-- --
-- Copyright (C) 1998-2021, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains all extended primitives related to Protected_Objects
-- with entries.
-- The handling of protected objects with no entries is done in
-- System.Tasking.Protected_Objects, the simple routines for protected
-- objects with entries in System.Tasking.Protected_Objects.Entries.
-- The split between Entries and Operations is needed to break circular
-- dependencies inside the run time.
-- This package contains all primitives related to Protected_Objects.
-- Note: the compiler generates direct calls to this interface, via Rtsfind.
with System.Task_Primitives.Operations;
with System.Tasking.Queuing;
with System.Restrictions;
with System.Multiprocessors;
with System.Tasking.Protected_Objects.Multiprocessors;
package body System.Tasking.Protected_Objects.Operations is
package STPO renames System.Task_Primitives.Operations;
package STPOM renames System.Tasking.Protected_Objects.Multiprocessors;
use Ada.Exceptions;
use Entries;
use System.Multiprocessors;
use System.Restrictions;
use System.Restrictions.Rident;
Multiprocessor : constant Boolean := CPU'Range_Length /= 1;
procedure PO_Do_Or_Queue
(Self_ID : Task_Id;
Object : Entries.Protection_Entries_Access;
Entry_Call : Entry_Call_Link;
Queued : out Boolean);
-- This procedure either executes or queues an entry call, depending
-- on the status of the corresponding barrier. It assumes that abort
-- is deferred and that the specified object is locked.
procedure PO_Service_Entries
(Self_ID : Task_Id;
Object : Entries.Protection_Entries_Access);
-- Service all entry queues of the specified object, executing the
-- corresponding bodies of any queued entry calls that are waiting
-- on True barriers. This is used when the state of a protected
-- object may have changed, in particular after the execution of
-- the statement sequence of a protected procedure.
--
-- Note that servicing an entry may change the value of one or more
-- barriers, so this routine keeps checking barriers until all of
-- them are closed.
--
-- This must be called with the corresponding object locked. This
-- lock will be released at the end of the call.
-------------------------
-- Complete_Entry_Body --
-------------------------
procedure Complete_Entry_Body (Object : Protection_Entries_Access) is
begin
Exceptional_Complete_Entry_Body (Object, Ada.Exceptions.Null_Id);
end Complete_Entry_Body;
-------------------------------------
-- Exceptional_Complete_Entry_Body --
-------------------------------------
procedure Exceptional_Complete_Entry_Body
(Object : Protection_Entries_Access;
Ex : Ada.Exceptions.Exception_Id)
is
procedure Transfer_Occurrence
(Target : Ada.Exceptions.Exception_Occurrence_Access;
Source : Ada.Exceptions.Exception_Occurrence);
pragma Import (C, Transfer_Occurrence, "__gnat_transfer_occurrence");
-- Import a private declaration from Ada.Exceptions
Entry_Call : constant Entry_Call_Link := Object.Call_In_Progress;
Self_Id : Task_Id;
begin
pragma Assert (Entry_Call /= null);
Entry_Call.Exception_To_Raise := Ex;
if Ex /= Ada.Exceptions.Null_Id then
-- An exception was raised and abort was deferred, so adjust
-- before propagating, otherwise the task will stay with deferral
-- enabled for its remaining life.
Self_Id := STPO.Self;
Transfer_Occurrence
(Entry_Call.Self.Common.Compiler_Data.Current_Excep'Access,
Self_Id.Common.Compiler_Data.Current_Excep);
end if;
end Exceptional_Complete_Entry_Body;
--------------------
-- PO_Do_Or_Queue --
--------------------
procedure PO_Do_Or_Queue
(Self_ID : Task_Id;
Object : Protection_Entries_Access;
Entry_Call : Entry_Call_Link;
Queued : out Boolean)
is
pragma Unreferenced (Self_ID);
E : constant Protected_Entry_Index :=
Protected_Entry_Index (Entry_Call.E);
Index : constant Protected_Entry_Index :=
Object.Find_Body_Index (Object.Compiler_Info, E);
Barrier_Value : Boolean;
Queue_Length : Natural;
begin
Queued := False;
-- Evaluate barrier. Due to the Pure_Barrier restriction, this cannot
-- raise exception.
Barrier_Value :=
Object.Entry_Bodies (Index).Barrier (Object.Compiler_Info, E);
if Barrier_Value then
Object.Call_In_Progress := Entry_Call;
-- Execute the entry. Exceptions cannot propagate from the entry, as
-- they must be handled by Exceptional_Complete_Entry_Body.
Object.Entry_Bodies (Index).Action
(Object.Compiler_Info, Entry_Call.Uninterpreted_Data, E);
-- Body of current entry served call to completion
Object.Call_In_Progress := null;
else
if Run_Time_Restrictions.Set (Max_Entry_Queue_Length)
or else Object.Entry_Queue_Maxes /= null
then
-- Need to check the queue length. Computing the length is an
-- unusual case and is slow (need to walk the queue).
Queue_Length := Queuing.Count_Waiting (Object.Entry_Queues (E));
if (Run_Time_Restrictions.Set (Max_Entry_Queue_Length)
and then Queue_Length >=
Run_Time_Restrictions.Value (Max_Entry_Queue_Length))
or else
(Object.Entry_Queue_Maxes /= null
and then Object.Entry_Queue_Maxes (Index) /= 0
and then Queue_Length >= Object.Entry_Queue_Maxes (Index))
then
-- This violates the Max_Entry_Queue_Length restriction or the
-- Max_Queue_Length bound, raise Program_Error. The entry call
-- has completed.
Entry_Call.Exception_To_Raise := Program_Error'Identity;
return;
end if;
end if;
Queuing.Enqueue (Object.Entry_Queues (E), Entry_Call);
Queued := True;
end if;
end PO_Do_Or_Queue;
------------------------
-- PO_Service_Entries --
------------------------
procedure PO_Service_Entries
(Self_ID : Task_Id;
Object : Entries.Protection_Entries_Access)
is
E : Protected_Entry_Index;
Caller : Task_Id;
Entry_Call : Entry_Call_Link;
begin
loop
Queuing.Select_Protected_Entry_Call (Self_ID, Object, Entry_Call);
exit when Entry_Call = null;
E := Protected_Entry_Index (Entry_Call.E);
Object.Call_In_Progress := Entry_Call;
-- Execute the entry
Object.Entry_Bodies
(Object.Find_Body_Index (Object.Compiler_Info, E)).Action
(Object.Compiler_Info, Entry_Call.Uninterpreted_Data, E);
-- Signal the entry caller that the entry is completed (it it needs
-- to wake up and continue execution).
Caller := Entry_Call.Self;
if not Multiprocessor
or else Caller.Common.Base_CPU = STPO.Self.Common.Base_CPU
then
-- Entry caller and servicing tasks are on the same CPU.
-- We are allowed to directly wake up the task.
STPO.Wakeup (Caller, Entry_Caller_Sleep);
else
-- The entry caller is on a different CPU.
STPOM.Served (Entry_Call);
end if;
end loop;
-- End of exclusive access
Unlock_Entries (Object);
end PO_Service_Entries;
---------------------
-- Protected_Count --
---------------------
function Protected_Count
(Object : Protection_Entries;
E : Protected_Entry_Index) return Natural
is
begin
return Queuing.Count_Waiting (Object.Entry_Queues (E));
end Protected_Count;
--------------------------
-- Protected_Entry_Call --
--------------------------
-- Compiler interface only (do not call from within the RTS)
-- declare
-- X : protected_entry_index := 1;
-- B2b : communication_block;
-- communication_blockIP (B2b);
-- begin
-- protected_entry_call (R5b._object'unchecked_access, X,
-- null_address, simple_call, B2b);
-- end;
procedure Protected_Entry_Call
(Object : Protection_Entries_Access;
E : Protected_Entry_Index;
Uninterpreted_Data : System.Address;
Mode : Call_Modes;
Block : out Communication_Block)
is
pragma Unreferenced (Mode);
procedure Internal_Raise (X : Ada.Exceptions.Exception_Id);
pragma Import (C, Internal_Raise, "__gnat_raise_with_msg");
Self_ID : constant Task_Id := STPO.Self;
Entry_Call : Entry_Call_Link;
Queued : Boolean;
begin
-- For this run time, pragma Detect_Blocking is always active, so we
-- must raise Program_Error if this potentially blocking operation is
-- called from a protected action.
if Self_ID.Common.Protected_Action_Nesting > 0 then
raise Program_Error with "potentially blocking operation";
end if;
-- Exclusive access to the protected object
Lock_Entries (Object);
Block.Self := Self_ID;
-- Initialize Entry_Call. No need to clear Exception_To_Raise, as it is
-- cleared at the end of the entry by Complete_Entry_Body.
Entry_Call := Self_ID.Entry_Call'Access;
Entry_Call.Next := null;
Entry_Call.E := Entry_Index (E);
Entry_Call.Uninterpreted_Data := Uninterpreted_Data;
-- Execute the entry if the barrier is open, or enqueue the call until
-- the barrier opens.
PO_Do_Or_Queue (Self_ID, Object, Entry_Call, Queued);
-- Check whether there are entries pending (barriers may have changed).
-- Queuing entries can potentially open barriers (if they rely on queue
-- count). This might complete multiple entry calls, including the one
-- that was just queued.
-- The protected object lock will be released by the end of the call.
PO_Service_Entries (Self_ID, Object);
-- If the entry call was queued the task sleeps until it is woken by the
-- task servicing its entry.
if Queued then
-- Suspend until entry call has been completed. Note that it is
-- possible that the entry call was completed by the
-- PO_Service_Entries call above. In that case, the flag
-- Wakeup_Signaled is True and the call to Sleep below will return
-- immediately. However we cannot skip the call to Sleep, otherwise
-- Wakeup_Signaled is not cleared.
Self_ID.Common.State := Entry_Caller_Sleep;
STPO.Sleep (Self_ID, Entry_Caller_Sleep);
Self_ID.Common.State := Runnable;
end if;
-- Check if an exception has to be propagated from the entry to the
-- caller.
if Entry_Call.Exception_To_Raise /= Ada.Exceptions.Null_Id then
-- If this is the case, propagate it. A raise statement cannot be
-- used, as the call stack must not be modified.
Internal_Raise (Entry_Call.Exception_To_Raise);
end if;
end Protected_Entry_Call;
----------------------------
-- Protected_Entry_Caller --
----------------------------
function Protected_Entry_Caller
(Object : Protection_Entries) return Task_Id is
begin
return Object.Call_In_Progress.Self;
end Protected_Entry_Caller;
---------------------
-- Service_Entries --
---------------------
procedure Service_Entries (Object : Protection_Entries_Access) is
Self_ID : constant Task_Id := STPO.Self;
begin
PO_Service_Entries (Self_ID, Object);
end Service_Entries;
end System.Tasking.Protected_Objects.Operations;
| 36.953964
| 79
| 0.585646
|
fea8fb951ff39c0e54c9980679cc13857d1ea3c6
| 2,454
|
adb
|
Ada
|
out/euler40.adb
|
Melyodas/metalang
|
399a9f1a71402c979d7f8024d4f98f081c80e771
|
[
"BSD-2-Clause"
] | 22
|
2017-04-24T10:00:45.000Z
|
2021-04-01T10:11:05.000Z
|
out/euler40.adb
|
Melyodas/metalang
|
399a9f1a71402c979d7f8024d4f98f081c80e771
|
[
"BSD-2-Clause"
] | 12
|
2017-03-26T18:34:21.000Z
|
2019-03-21T19:13:03.000Z
|
out/euler40.adb
|
Melyodas/metalang
|
399a9f1a71402c979d7f8024d4f98f081c80e771
|
[
"BSD-2-Clause"
] | 7
|
2017-10-14T13:33:33.000Z
|
2021-03-18T15:18:50.000Z
|
with ada.text_io, ada.Integer_text_IO, Ada.Text_IO.Text_Streams, Ada.Strings.Fixed, Interfaces.C;
use ada.text_io, ada.Integer_text_IO, Ada.Strings, Ada.Strings.Fixed, Interfaces.C;
procedure euler40 is
type stringptr is access all char_array;
procedure PString(s : stringptr) is
begin
String'Write (Text_Streams.Stream (Current_Output), To_Ada(s.all));
end;
procedure PInt(i : in Integer) is
begin
String'Write (Text_Streams.Stream (Current_Output), Trim(Integer'Image(i), Left));
end;
function exp0(a : in Integer; e : in Integer) return Integer is
o : Integer;
begin
o := 1;
for i in integer range 1..e loop
o := o * a;
end loop;
return o;
end;
type c is Array (Integer range <>) of Integer;
type c_PTR is access c;
function e(t : in c_PTR; b : in Integer) return Integer is
nombre : Integer;
n : Integer;
chiffre : Integer;
begin
n := b;
for i in integer range 1..8 loop
if n >= t(i) * i
then
n := n - t(i) * i;
else
nombre := exp0(10, i - 1) + n / i;
chiffre := i - 1 - n rem i;
return nombre / exp0(10, chiffre) rem 10;
end if;
end loop;
return (-1);
end;
v : Integer;
t : c_PTR;
puiss : Integer;
out0 : Integer;
begin
t := new c (0..8);
for i in integer range 0..8 loop
t(i) := exp0(10, i) - exp0(10, i - 1);
end loop;
for i2 in integer range 1..8 loop
PInt(i2);
PString(new char_array'( To_C(" => ")));
PInt(t(i2));
PString(new char_array'( To_C("" & Character'Val(10))));
end loop;
for j in integer range 0..80 loop
PInt(e(t, j));
end loop;
PString(new char_array'( To_C("" & Character'Val(10))));
for k in integer range 1..50 loop
PInt(k);
end loop;
PString(new char_array'( To_C("" & Character'Val(10))));
for j2 in integer range 169..220 loop
PInt(e(t, j2));
end loop;
PString(new char_array'( To_C("" & Character'Val(10))));
for k2 in integer range 90..110 loop
PInt(k2);
end loop;
PString(new char_array'( To_C("" & Character'Val(10))));
out0 := 1;
for l in integer range 0..6 loop
puiss := exp0(10, l);
v := e(t, puiss - 1);
out0 := out0 * v;
PString(new char_array'( To_C("10^")));
PInt(l);
PString(new char_array'( To_C("=")));
PInt(puiss);
PString(new char_array'( To_C(" v=")));
PInt(v);
PString(new char_array'( To_C("" & Character'Val(10))));
end loop;
PInt(out0);
PString(new char_array'( To_C("" & Character'Val(10))));
end;
| 25.831579
| 97
| 0.617359
|
0759b8fcd858c874f84f9f316aa98620afeb8fec
| 644
|
ads
|
Ada
|
src/siphash-wide_wide_discrete.ads
|
jhumphry/SPARK_SipHash
|
9e9490e23ae722f8392b5f9cbdbc6bc8c6104fa5
|
[
"CC0-1.0"
] | 5
|
2018-10-10T21:19:01.000Z
|
2020-10-14T08:42:58.000Z
|
src/siphash-wide_wide_discrete.ads
|
jhumphry/SPARK_SipHash
|
9e9490e23ae722f8392b5f9cbdbc6bc8c6104fa5
|
[
"CC0-1.0"
] | null | null | null |
src/siphash-wide_wide_discrete.ads
|
jhumphry/SPARK_SipHash
|
9e9490e23ae722f8392b5f9cbdbc6bc8c6104fa5
|
[
"CC0-1.0"
] | null | null | null |
-- SipHash.Wide_Wide_Discrete
-- Implementing SipHash over a generic discrete type
-- Copyright (c) 2015, James Humphry - see LICENSE file for details
-- This generic function will calculate SipHash over arrays such as the standard
-- Wide_Wide_String type, a discrete type indexed by an integer type. The range
-- of values of the discrete type needs to fit in 32 bits.
pragma SPARK_Mode;
generic
type T is (<>);
type T_Index is range <>;
type T_Array is array (T_Index range <>) of T;
type Hash_Type is mod <>;
function SipHash.Wide_Wide_Discrete (m : T_Array) return Hash_Type
with Global => (Input => Initial_Hash_State);
| 33.894737
| 80
| 0.742236
|
9830d137edf2e953e52e7557cbff473015ff3b00
| 1,136
|
ads
|
Ada
|
src/fltk-widgets-clocks-updated.ads
|
micahwelf/FLTK-Ada
|
83e0c58ea98e5ede2cbbb158b42eae44196c3ba7
|
[
"Unlicense"
] | 1
|
2020-12-18T15:20:13.000Z
|
2020-12-18T15:20:13.000Z
|
src/fltk-widgets-clocks-updated.ads
|
micahwelf/FLTK-Ada
|
83e0c58ea98e5ede2cbbb158b42eae44196c3ba7
|
[
"Unlicense"
] | null | null | null |
src/fltk-widgets-clocks-updated.ads
|
micahwelf/FLTK-Ada
|
83e0c58ea98e5ede2cbbb158b42eae44196c3ba7
|
[
"Unlicense"
] | null | null | null |
package FLTK.Widgets.Clocks.Updated is
type Updated_Clock is new Clock with private;
type Updated_Clock_Reference (Data : not null access Updated_Clock'Class) is
limited null record with Implicit_Dereference => Data;
package Forge is
function Create
(X, Y, W, H : in Integer;
Text : in String)
return Updated_Clock;
function Create
(Kind : in Box_Kind;
X, Y, W, H : in Integer;
Text : in String)
return Updated_Clock;
end Forge;
procedure Draw
(This : in out Updated_Clock);
procedure Draw
(This : in out Clock;
X, Y, W, H : in Integer);
function Handle
(This : in out Updated_Clock;
Event : in Event_Kind)
return Event_Outcome;
private
type Updated_Clock is new Clock with null record;
overriding procedure Finalize
(This : in out Updated_Clock);
pragma Inline (Draw);
pragma Inline (Handle);
end FLTK.Widgets.Clocks.Updated;
| 18.322581
| 80
| 0.560739
|
396c93a931bbb1611b0c2ed03d252b4008b5d010
| 8,618
|
ads
|
Ada
|
src/util-serialize-mappers-record_mapper.ads
|
Letractively/ada-util
|
e4c63b93635dc07c46e95f12ba02d18903b307b3
|
[
"Apache-2.0"
] | 60
|
2015-01-18T23:05:34.000Z
|
2022-03-20T18:56:30.000Z
|
src/util-serialize-mappers-record_mapper.ads
|
Letractively/ada-util
|
e4c63b93635dc07c46e95f12ba02d18903b307b3
|
[
"Apache-2.0"
] | 20
|
2016-09-15T16:41:30.000Z
|
2022-03-29T22:02:32.000Z
|
src/util-serialize-mappers-record_mapper.ads
|
Letractively/ada-util
|
e4c63b93635dc07c46e95f12ba02d18903b307b3
|
[
"Apache-2.0"
] | 10
|
2015-02-13T04:00:45.000Z
|
2022-03-20T18:57:54.000Z
|
-----------------------------------------------------------------------
-- Util.Serialize.Mappers.Record_Mapper -- Mapper for record types
-- Copyright (C) 2010, 2011, 2012 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- 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.
-----------------------------------------------------------------------
with Util.Beans.Objects;
with Util.Serialize.IO;
generic
type Element_Type (<>) is limited private;
type Element_Type_Access is access all Element_Type;
type Fields is (<>);
-- The <b>Set_Member</b> procedure will be called by the mapper when a mapping associated
-- with <b>Field</b> is recognized. The <b>Value</b> holds the value that was extracted
-- according to the mapping. The <b>Set_Member</b> procedure should save in the target
-- object <b>Into</b> the value. If an error is detected, the procedure can raise the
-- <b>Util.Serialize.Mappers.Field_Error</b> exception. The exception message will be
-- reported by the IO reader as an error.
with procedure Set_Member (Into : in out Element_Type;
Field : in Fields;
Value : in Util.Beans.Objects.Object);
-- Adding a second function/procedure as generic parameter makes the
-- Vector_Mapper generic package fail to instantiate a valid package.
-- The failure occurs in Vector_Mapper in the 'with package Element_Mapper' instantiation.
--
-- with function Get_Member (From : in Element_Type;
-- Field : in Fields) return Util.Beans.Objects.Object;
package Util.Serialize.Mappers.Record_Mapper is
type Get_Member_Access is
access function (From : in Element_Type;
Field : in Fields) return Util.Beans.Objects.Object;
-- Procedure to give access to the <b>Element_Type</b> object from the context.
type Process_Object is not null
access procedure (Ctx : in out Util.Serialize.Contexts.Context'Class;
Attr : in Mapping'Class;
Value : in Util.Beans.Objects.Object;
Process : not null
access procedure (Attr : in Mapping'Class;
Item : in out Element_Type;
Value : in Util.Beans.Objects.Object));
type Proxy_Object is not null
access procedure (Attr : in Mapping'Class;
Element : in out Element_Type;
Value : in Util.Beans.Objects.Object);
-- Set the attribute member described by the <b>Attr</b> mapping
-- into the value passed in <b>Element</b>. This operation will call
-- the package parameter function of the same name.
procedure Set_Member (Attr : in Mapping'Class;
Element : in out Element_Type;
Value : in Util.Beans.Objects.Object);
-- -----------------------
-- Data context
-- -----------------------
-- Data context to get access to the target element.
type Element_Data is new Util.Serialize.Contexts.Data with private;
type Element_Data_Access is access all Element_Data'Class;
-- Get the element object.
function Get_Element (Data : in Element_Data) return Element_Type_Access;
-- Set the element object. When <b>Release</b> is set, the element <b>Element</b>
-- will be freed when the reader context is deleted (by <b>Finalize</b>).
procedure Set_Element (Data : in out Element_Data;
Element : in Element_Type_Access;
Release : in Boolean := False);
-- Finalize the object when it is removed from the reader context.
-- If the <b>Release</b> parameter was set, the target element will be freed.
overriding
procedure Finalize (Data : in out Element_Data);
-- -----------------------
-- Record mapper
-- -----------------------
type Mapper is new Util.Serialize.Mappers.Mapper with private;
type Mapper_Access is access all Mapper'Class;
-- Execute the mapping operation on the object associated with the current context.
-- The object is extracted from the context and the <b>Execute</b> operation is called.
procedure Execute (Handler : in Mapper;
Map : in Mapping'Class;
Ctx : in out Util.Serialize.Contexts.Context'Class;
Value : in Util.Beans.Objects.Object);
-- Add a mapping for setting a member. When the attribute rule defined by <b>Path</b>
-- is matched, the <b>Set_Member</b> procedure will be called with the value and the
-- <b>Field</b> identification.
procedure Add_Mapping (Into : in out Mapper;
Path : in String;
Field : in Fields);
-- Add a mapping associated with the path and described by a mapper object.
-- The <b>Proxy</b> procedure is in charge of giving access to the target
-- object used by the <b>Map</b> mapper.
procedure Add_Mapping (Into : in out Mapper;
Path : in String;
Map : in Util.Serialize.Mappers.Mapper_Access;
Proxy : in Proxy_Object);
-- Clone the <b>Handler</b> instance and get a copy of that single object.
overriding
function Clone (Handler : in Mapper) return Util.Serialize.Mappers.Mapper_Access;
--
procedure Bind (Into : in out Mapper;
Getter : in Get_Member_Access);
procedure Bind (Into : in out Mapper;
From : in Mapper_Access);
function Get_Getter (From : in Mapper) return Get_Member_Access;
-- Set the element in the context. When <b>Release</b> is set, the element <b>Element</b>
-- will be freed when the reader context is deleted (by <b>Finalize</b>).
procedure Set_Context (Ctx : in out Util.Serialize.Contexts.Context'Class;
Element : in Element_Type_Access;
Release : in Boolean := False);
-- Build a default mapping based on the <b>Fields</b> enumeration.
-- The enumeration name is used for the mapping name with the optional <b>FIELD_</b>
-- prefix stripped.
procedure Add_Default_Mapping (Into : in out Mapper);
-- Write the element on the stream using the mapper description.
procedure Write (Handler : in Mapper;
Stream : in out Util.Serialize.IO.Output_Stream'Class;
Element : in Element_Type);
-- Write the element on the stream using the mapper description.
procedure Write (Handler : in Util.Serialize.Mappers.Mapper'Class;
Getter : in Get_Member_Access;
Stream : in out Util.Serialize.IO.Output_Stream'Class;
Element : in Element_Type);
private
type Element_Data is new Util.Serialize.Contexts.Data with record
Element : Element_Type_Access;
Release : Boolean;
end record;
type Mapper is new Util.Serialize.Mappers.Mapper with record
Execute : Proxy_Object := Set_Member'Access;
Get_Member : Get_Member_Access;
end record;
type Attribute_Mapping is new Mapping with record
Index : Fields;
end record;
type Attribute_Mapping_Access is access all Attribute_Mapping'Class;
procedure Set_Member (Attr : in Attribute_Mapping;
Element : in out Element_Type;
Value : in Util.Beans.Objects.Object);
type Proxy_Mapper is new Mapper with null record;
type Proxy_Mapper_Access is access all Proxy_Mapper'Class;
-- Find the mapper associated with the given name.
-- Returns null if there is no mapper.
overriding
function Find_Mapper (Controller : in Proxy_Mapper;
Name : in String;
Attribute : in Boolean := False)
return Util.Serialize.Mappers.Mapper_Access;
end Util.Serialize.Mappers.Record_Mapper;
| 46.583784
| 94
| 0.621026
|
967cab6fec7ffeb88eb460aa68e046380b936a67
| 1,554
|
adb
|
Ada
|
tests/src/queues_tests.adb
|
bracke/brackelib
|
2867ccb08556ba6a315331529bf9e46645688034
|
[
"CC0-1.0"
] | 1
|
2022-02-06T07:57:09.000Z
|
2022-02-06T07:57:09.000Z
|
tests/src/queues_tests.adb
|
bracke/brackelib
|
2867ccb08556ba6a315331529bf9e46645688034
|
[
"CC0-1.0"
] | null | null | null |
tests/src/queues_tests.adb
|
bracke/brackelib
|
2867ccb08556ba6a315331529bf9e46645688034
|
[
"CC0-1.0"
] | null | null | null |
with AUnit.Assertions; use AUnit.Assertions;
with Brackelib;
package body Queues_Tests is
Container : State_Queues.Queue;
procedure Set_Up (T : in out Test) is
begin
null;
end Set_Up;
procedure Test_Enqueue (T : in out Test) is
begin
Assert (Size (Container) = 0, "Incorrect size before push");
Enqueue (Container, 314);
Assert (Size (Container) = 1, "Incorrect size after push");
end Test_Enqueue;
procedure Test_Dequeue (T : in out Test) is
begin
Assert (Size (Container) = 1, "Incorrect size before push");
declare
Item : Integer := Dequeue (Container);
begin
Assert (Size (Container) = 0, "Incorrect size after push");
end;
Assert (Dequeue (Container) = 1234, "Exception Stack_Empty not raised");
exception
when Queue_Empty =>
null;
end Test_Dequeue;
procedure Test_Clear (T : in out Test) is
begin
Assert (Size (Container) = 0, "Incorrect size before push");
Enqueue (Container, 314);
Assert (Size (Container) = 1, "Incorrect size after push");
Clear (Container);
Assert (Is_Empty (Container), "Incorrect Is_Empty response after clear");
end Test_Clear;
procedure Test_Empty (T : in out Test) is
begin
Assert (Size (Container) = 0, "Incorrect size before Is_Empty");
Assert (Is_Empty (Container), "Incorrect Is_Empty response");
Enqueue (Container, 314);
Assert (not Is_Empty (Container), "Incorrect Is_Empty response");
end Test_Empty;
end Queues_Tests;
| 29.884615
| 79
| 0.656371
|
59a6a5fe07e399e01ee1b44db61c0a74b298e913
| 6,707
|
adb
|
Ada
|
gasp/source/gasp-world.adb
|
charlie5/playAda
|
1d8577cab0446c5a93e9b1b0c5a15218cd5d6ea8
|
[
"0BSD"
] | null | null | null |
gasp/source/gasp-world.adb
|
charlie5/playAda
|
1d8577cab0446c5a93e9b1b0c5a15218cd5d6ea8
|
[
"0BSD"
] | null | null | null |
gasp/source/gasp-world.adb
|
charlie5/playAda
|
1d8577cab0446c5a93e9b1b0c5a15218cd5d6ea8
|
[
"0BSD"
] | null | null | null |
with
openGL.Model.sphere.textured,
openGL.Model.open_gl,
openGL.Palette,
physics.Forge,
mmi.physics_Model,
mmi.Forge,
float_Math.Geometry.d3.Modeller.Forge,
ada.unchecked_Deallocation,
ada.Text_IO,
ada.Streams.Stream_IO;
package body gasp.World
is
use ada.text_IO;
gasp_world_Id : constant := 1;
type Geometry_Model_view is access all Geometry_3d.a_Model;
---------
-- Forge
--
package body Forge
is
function new_World (Name : in String;
Renderer : in openGL.Renderer.lean.view) return View
is
use openGL,
geometry_3d.Modeller.Forge,
Math, linear_Algebra_3d;
Self : constant View := new Item' (mmi.World.Forge.to_World (Name, gasp_world_Id,
standard.physics.Forge.Bullet,
Renderer)
with others => <>);
begin
Self.start;
Self.Gravity_is ((0.0, 0.0, 0.0));
add_Skysphere:
declare
starfield_Image : constant openGL.asset_Name
:= openGL.to_Asset ("assets/starfield-2.jpg");
the_graphics_Model : constant openGL.Model.sphere.textured.view
:= openGL.Model.sphere.textured.Forge.new_Sphere (Radius => 10_000.0,
Image => starfield_Image,
is_Skysphere => True);
the_physics_Model : constant mmi.physics_Model.view
:= mmi.physics_Model.Forge.new_physics_Model (shape_Info => (mmi.physics_Model.a_Sphere, 0.5),
mass => 0.0);
the_Sprite : mmi.Sprite.view;
begin
the_Sprite := mmi.Sprite.Forge.new_Sprite ("skybox_Sprite",
Self,
the_graphics_Model,
the_physics_Model,
owns_graphics => True,
owns_physics => True,
is_Kinematic => False);
Self.add (the_Sprite);
end add_Skysphere;
add_Asteroid:
declare
the_math_Model : constant Geometry_Model_view
:= new Geometry_3d.a_Model' (mesh_Model_from (the_Model => polar_Model_from ("./gaspra.tab")));
the_graphics_Model : constant openGL.Model.open_gl.view
:= openGL.Model.open_gl.Forge.new_Model ((1.0, 1.0, 1.0),
null_Asset,
the_math_Model,
null_Asset,
False);
the_physics_Model : constant mmi.physics_Model.view
:= mmi.physics_Model.Forge.new_physics_Model (shape_Info => (mmi.physics_Model.Mesh, the_math_Model),
mass => 0.0);
the_Sprite : mmi.Sprite.view;
begin
the_Sprite := mmi.Sprite.Forge.new_Sprite ("asteroid_Sprite",
Self,
the_graphics_Model,
the_physics_Model,
owns_graphics => True,
owns_physics => True,
is_Kinematic => False);
Self.add (the_Sprite);
end add_Asteroid;
add_Pod:
declare
the_Sprite : constant mmi.Sprite.view
:= mmi.Forge.new_ball_Sprite (in_World => Self.all'Access,
Mass => 1.0,
Radius => 0.2,
Color => openGL.Palette.Red);
begin
the_Sprite.is_Visible (False);
the_Sprite.Site_is ((0.0, 0.0, 200.0));
Self.add (the_Sprite);
Self.pod_Sprite := the_Sprite;
end add_Pod;
return Self;
end new_World;
end Forge;
overriding
procedure destroy (Self : in out Item)
is
begin
mmi.World.destroy (mmi.World.item (Self)); -- Destroy the base class.
end destroy;
procedure free (Self : in out View)
is
procedure deallocate is new ada.unchecked_Deallocation (item'Class, View);
begin
if Self /= null then
destroy (Self.all);
end if;
deallocate (Self);
end free;
procedure store (Self : in out Item)
is
pragma Unreferenced (Self);
use ada.Streams.Stream_IO;
the_File : ada.Streams.Stream_IO.File_Type;
the_Stream : ada.Streams.Stream_IO.Stream_Access;
begin
create (the_File, out_File, "World.stream");
the_Stream := Stream (the_File);
-- To do.
close (the_File);
end store;
procedure restore (Self : in out Item)
is
use ada.Streams.Stream_IO;
the_File : ada.Streams.Stream_IO.File_Type;
the_Stream : ada.Streams.Stream_IO.Stream_Access;
begin
open (the_File, in_File, "World.stream");
the_Stream := Stream (the_File);
-- To do.
close (the_File);
exception
when ada.Streams.Stream_IO.Name_Error =>
put_Line ("No prior World found.");
end restore;
--------------
-- Attributes
--
function Pod (Self : in Item) return mmi.Sprite.view
is
begin
return Self.pod_Sprite;
end Pod;
--------------
-- Operations
--
overriding
procedure evolve (Self : in out Item; By : in Duration)
is
use Math;
use type ada.Containers.Count_type;
begin
Self.Counter := Self.Counter + 1;
-- Gravity
--
Self.pod_Sprite.apply_Force (-Self.pod_Sprite.Site * 0.00001);
-- Dampen pod spin.
--
-- Self.ball_Sprite.Gyre_is (Self.ball_Sprite.Gyre * 0.90);
mmi.World.evolve (mmi.World.item (Self), By); -- Evolve the base mmi world.
end evolve;
end gasp.World;
| 29.416667
| 115
| 0.471
|
9fc218c5c25e49cbcd1594a4172c41999ab150e0
| 2,165
|
adb
|
Ada
|
src/vulkan-math/vulkan-math-relational.adb
|
zrmyers/VulkanAda
|
ed8c46d923bc8936db3a5d55d36afebb928a9ede
|
[
"MIT"
] | 1
|
2021-01-29T21:10:45.000Z
|
2021-01-29T21:10:45.000Z
|
src/vulkan-math/vulkan-math-relational.adb
|
zrmyers/VulkanAda
|
ed8c46d923bc8936db3a5d55d36afebb928a9ede
|
[
"MIT"
] | 8
|
2020-04-22T14:55:20.000Z
|
2021-11-22T03:58:08.000Z
|
src/vulkan-math/vulkan-math-relational.adb
|
zrmyers/VulkanAda
|
ed8c46d923bc8936db3a5d55d36afebb928a9ede
|
[
"MIT"
] | 1
|
2021-04-05T13:19:21.000Z
|
2021-04-05T13:19:21.000Z
|
--------------------------------------------------------------------------------
-- MIT License
--
-- Copyright (c) 2020 Zane Myers
--
-- 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.
--------------------------------------------------------------------------------
--
-- This package provides operator definitions for all types.
--------------------------------------------------------------------------------
package body Vulkan.Math.Relational is
----------------------------------------------------------------------------
function Is_Any (x : in Vkm_GenBType) return Vkm_Bool is
Result : Vkm_Bool := False;
begin
for I in x.data'Range loop
Result := Result or x.data(I);
end loop;
return Result;
end Is_Any;
----------------------------------------------------------------------------
function Is_All (x : in Vkm_GenBType) return Vkm_Bool is
Result : Vkm_Bool := True;
begin
for I in x.data'Range loop
Result := Result and x.data(I);
end loop;
return Result;
end Is_All;
end Vulkan.Math.Relational;
| 37.327586
| 81
| 0.571824
|
8344aef99f3e6efc45c77d7e3236ebd7b7ec3cc3
| 6,265
|
adb
|
Ada
|
src/formatted_output-enumeration_output.adb
|
VitalijBondarenko/Formatted_Output_NG
|
91fbdba8b2c720d9769a52f2b2152c14236adaa0
|
[
"MIT"
] | null | null | null |
src/formatted_output-enumeration_output.adb
|
VitalijBondarenko/Formatted_Output_NG
|
91fbdba8b2c720d9769a52f2b2152c14236adaa0
|
[
"MIT"
] | null | null | null |
src/formatted_output-enumeration_output.adb
|
VitalijBondarenko/Formatted_Output_NG
|
91fbdba8b2c720d9769a52f2b2152c14236adaa0
|
[
"MIT"
] | null | null | null |
------------------------------------------------------------------------------
-- --
-- Copyright (c) 2016-2021 Vitalii Bondarenko <vibondare@gmail.com> --
-- --
------------------------------------------------------------------------------
-- --
-- The MIT License (MIT) --
-- --
-- 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. --
------------------------------------------------------------------------------
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Characters.Handling; use Ada.Characters.Handling;
with Ada.Strings; use Ada.Strings;
with Ada.Strings.Fixed; use Ada.Strings.Fixed;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
package body Formatted_Output.Enumeration_Output is
package Item_Type_IO is new Ada.Text_IO.Enumeration_IO (Item_Type);
use Item_Type_IO;
type Style_Type is (Capitalized, Upper_Case, Lower_Case);
function Format
(Value : Item_Type;
Initial_Width : Integer;
Justification : Alignment;
Style : Style_Type) return String;
------------
-- Format --
------------
function Format
(Value : Item_Type;
Initial_Width : Integer;
Justification : Alignment;
Style : Style_Type) return String
is
Img : String (1 .. Maximal_Item_Length);
Width : Integer;
Real_Width : Integer;
Past_Last : Integer := 1;
begin
case Style is
when Capitalized =>
Put (Img, Value, Type_Set'(Lower_Case));
Img (1) := To_Upper (Img (1));
when Lower_Case =>
Put (Img, Value, Type_Set'(Lower_Case));
when Upper_Case =>
Put (Img, Value, Type_Set'(Upper_Case));
end case;
while Img (Past_Last) /= ' ' loop
Past_Last := Past_Last + 1;
end loop;
Real_Width := Past_Last - 1;
if Initial_Width < Real_Width then
Width := Real_Width;
else
Width := Initial_Width;
end if;
declare
S : String (1 .. Width);
begin
Move
(Img (Past_Last - Real_Width .. Past_Last - 1),
S,
Justify => Justification,
Pad => Filler);
return S;
end;
end Format;
---------
-- "&" --
---------
function "&" (Fmt : Format_Type; Value : Item_Type) return Format_Type is
Command_Start : constant Integer := Scan_To_Percent_Sign (Fmt);
Width : Integer := 0;
Digit_Occured : Boolean := False;
Justification_Changed : Boolean := False;
Justification : Alignment := Right;
Fmt_Copy : Unbounded_String;
begin
if Command_Start /= 0 then
Fmt_Copy := Unbounded_String (Fmt);
for I in Command_Start + 1 .. Length (Fmt_Copy) loop
case Element (Fmt_Copy, I) is
when 'c' =>
Replace_Slice
(Fmt_Copy, Command_Start, I,
Format (Value, Width, Justification, Capitalized));
return Format_Type (Fmt_Copy);
when 'u' =>
Replace_Slice
(Fmt_Copy, Command_Start, I,
Format (Value, Width, Justification, Upper_Case));
return Format_Type (Fmt_Copy);
when 'l' =>
Replace_Slice
(Fmt_Copy, Command_Start, I,
Format (Value, Width, Justification, Lower_Case));
return Format_Type (Fmt_Copy);
when '-' | '+' | '*' =>
if Justification_Changed or else Digit_Occured then
raise Format_Error;
end if;
Justification_Changed := True;
case Element (Fmt_Copy, I) is
when '-' => Justification := Left;
when '+' => Justification := Right;
when '*' => Justification := Center;
when others => null;
end case;
when '0' .. '9' =>
Width := Width * 10
+ Character'Pos (Element (Fmt_Copy, I))
- Character'Pos ('0');
when others =>
raise Format_Error;
end case;
end loop;
end if;
raise Format_Error;
end "&";
end Formatted_Output.Enumeration_Output;
| 38.913043
| 78
| 0.472466
|
dab618d2f6801ea66e5dfb45aaf29fcacf497428
| 134,915
|
ads
|
Ada
|
src/fonts/geste_fonts-freeserif18pt7b.ads
|
Fabien-Chouteau/GESTE
|
5ac814906fdb49d880db60cbb17279cbbb777336
|
[
"BSD-3-Clause"
] | 13
|
2018-07-31T12:11:46.000Z
|
2021-11-19T14:16:46.000Z
|
src/fonts/geste_fonts-freeserif18pt7b.ads
|
gregkrsak/GESTE
|
5ac814906fdb49d880db60cbb17279cbbb777336
|
[
"BSD-3-Clause"
] | 1
|
2018-10-22T21:41:59.000Z
|
2018-10-22T21:41:59.000Z
|
src/fonts/geste_fonts-freeserif18pt7b.ads
|
gregkrsak/GESTE
|
5ac814906fdb49d880db60cbb17279cbbb777336
|
[
"BSD-3-Clause"
] | 4
|
2020-07-03T10:03:13.000Z
|
2022-02-10T03:35:07.000Z
|
package GESTE_Fonts.FreeSerif18pt7b is
Font : constant Bitmap_Font_Ref;
private
FreeSerif18pt7bBitmaps : aliased constant Font_Bitmap := (
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#01#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#,
16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#,
16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#,
16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#,
16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#,
16#00#, 16#00#, 16#20#, 16#00#, 16#00#, 16#00#, 16#10#, 16#00#, 16#00#,
16#00#, 16#08#, 16#00#, 16#00#, 16#00#, 16#04#, 16#00#, 16#00#, 16#00#,
16#02#, 16#00#, 16#00#, 16#00#, 16#01#, 16#00#, 16#00#, 16#00#, 16#00#,
16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#,
16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#70#, 16#00#, 16#00#, 16#07#,
16#38#, 16#00#, 16#00#, 16#03#, 16#9C#, 16#00#, 16#00#, 16#01#, 16#CE#,
16#00#, 16#00#, 16#00#, 16#E7#, 16#00#, 16#00#, 16#00#, 16#21#, 16#00#,
16#00#, 16#00#, 16#10#, 16#80#, 16#00#, 16#00#, 16#08#, 16#40#, 16#00#,
16#00#, 16#04#, 16#20#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#C1#, 16#80#, 16#00#, 16#00#, 16#60#, 16#C0#,
16#00#, 16#00#, 16#30#, 16#60#, 16#00#, 16#00#, 16#18#, 16#70#, 16#00#,
16#00#, 16#0C#, 16#30#, 16#00#, 16#00#, 16#0E#, 16#18#, 16#00#, 16#00#,
16#06#, 16#0C#, 16#00#, 16#00#, 16#3F#, 16#FF#, 16#C0#, 16#00#, 16#1F#,
16#FF#, 16#E0#, 16#00#, 16#00#, 16#C1#, 16#80#, 16#00#, 16#00#, 16#61#,
16#80#, 16#00#, 16#00#, 16#70#, 16#C0#, 16#00#, 16#00#, 16#30#, 16#60#,
16#00#, 16#01#, 16#FF#, 16#FE#, 16#00#, 16#00#, 16#FF#, 16#FF#, 16#00#,
16#00#, 16#06#, 16#0C#, 16#00#, 16#00#, 16#03#, 16#0C#, 16#00#, 16#00#,
16#01#, 16#86#, 16#00#, 16#00#, 16#01#, 16#83#, 16#00#, 16#00#, 16#00#,
16#C1#, 16#80#, 16#00#, 16#00#, 16#60#, 16#C0#, 16#00#, 16#00#, 16#30#,
16#60#, 16#00#, 16#00#, 16#18#, 16#30#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#80#, 16#00#,
16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#,
16#01#, 16#93#, 16#80#, 16#00#, 16#01#, 16#88#, 16#60#, 16#00#, 16#01#,
16#C4#, 16#10#, 16#00#, 16#00#, 16#C2#, 16#08#, 16#00#, 16#00#, 16#71#,
16#04#, 16#00#, 16#00#, 16#38#, 16#80#, 16#00#, 16#00#, 16#1E#, 16#40#,
16#00#, 16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#01#, 16#F8#, 16#00#,
16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#C0#, 16#00#,
16#00#, 16#02#, 16#F8#, 16#00#, 16#00#, 16#01#, 16#3C#, 16#00#, 16#00#,
16#00#, 16#8F#, 16#00#, 16#00#, 16#00#, 16#43#, 16#80#, 16#00#, 16#08#,
16#21#, 16#C0#, 16#00#, 16#04#, 16#10#, 16#E0#, 16#00#, 16#02#, 16#08#,
16#70#, 16#00#, 16#01#, 16#84#, 16#70#, 16#00#, 16#00#, 16#E2#, 16#78#,
16#00#, 16#00#, 16#3F#, 16#F0#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#,
16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#00#, 16#20#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#78#, 16#03#, 16#00#, 16#00#, 16#FE#, 16#07#, 16#00#, 16#00#, 16#F0#,
16#FD#, 16#80#, 16#00#, 16#70#, 16#41#, 16#80#, 16#00#, 16#70#, 16#20#,
16#80#, 16#00#, 16#78#, 16#10#, 16#C0#, 16#00#, 16#38#, 16#08#, 16#40#,
16#00#, 16#1C#, 16#04#, 16#60#, 16#00#, 16#0E#, 16#06#, 16#20#, 16#00#,
16#07#, 16#02#, 16#30#, 16#F0#, 16#01#, 16#83#, 16#31#, 16#FC#, 16#00#,
16#E3#, 16#11#, 16#E3#, 16#00#, 16#3F#, 16#18#, 16#E0#, 16#80#, 16#0F#,
16#08#, 16#E0#, 16#40#, 16#00#, 16#0C#, 16#F0#, 16#20#, 16#00#, 16#0C#,
16#70#, 16#10#, 16#00#, 16#04#, 16#38#, 16#08#, 16#00#, 16#06#, 16#1C#,
16#0C#, 16#00#, 16#02#, 16#0C#, 16#04#, 16#00#, 16#03#, 16#06#, 16#06#,
16#00#, 16#03#, 16#03#, 16#86#, 16#00#, 16#01#, 16#80#, 16#FE#, 16#00#,
16#01#, 16#80#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#3F#,
16#80#, 16#00#, 16#00#, 16#38#, 16#C0#, 16#00#, 16#00#, 16#18#, 16#30#,
16#00#, 16#00#, 16#1C#, 16#18#, 16#00#, 16#00#, 16#0E#, 16#0C#, 16#00#,
16#00#, 16#07#, 16#06#, 16#00#, 16#00#, 16#03#, 16#83#, 16#00#, 16#00#,
16#01#, 16#C3#, 16#00#, 16#00#, 16#00#, 16#73#, 16#00#, 16#00#, 16#00#,
16#3F#, 16#1F#, 16#E0#, 16#00#, 16#1E#, 16#03#, 16#C0#, 16#00#, 16#1F#,
16#00#, 16#C0#, 16#00#, 16#3B#, 16#C0#, 16#C0#, 16#00#, 16#38#, 16#E0#,
16#60#, 16#00#, 16#38#, 16#78#, 16#60#, 16#00#, 16#38#, 16#1E#, 16#20#,
16#00#, 16#1C#, 16#07#, 16#A0#, 16#00#, 16#0E#, 16#03#, 16#F0#, 16#00#,
16#0F#, 16#00#, 16#F8#, 16#00#, 16#03#, 16#80#, 16#3E#, 16#00#, 16#01#,
16#E0#, 16#3F#, 16#86#, 16#00#, 16#F8#, 16#73#, 16#FE#, 16#00#, 16#3F#,
16#E0#, 16#FE#, 16#00#, 16#07#, 16#C0#, 16#1E#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#,
16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#,
16#C0#, 16#00#, 16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#00#, 16#20#,
16#00#, 16#00#, 16#00#, 16#10#, 16#00#, 16#00#, 16#00#, 16#08#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#10#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#30#,
16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#,
16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#,
16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#,
16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#,
16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#,
16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#,
16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#,
16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#,
16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#,
16#0C#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#01#,
16#80#, 16#00#, 16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#00#, 16#10#,
16#00#, 16#00#, 16#00#, 16#04#, 16#00#, 16#00#, 16#00#, 16#01#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#08#, 16#00#, 16#00#, 16#00#, 16#02#, 16#00#, 16#00#,
16#00#, 16#00#, 16#80#, 16#00#, 16#00#, 16#00#, 16#20#, 16#00#, 16#00#,
16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#,
16#03#, 16#00#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#,
16#60#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#1C#,
16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#,
16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#,
16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#,
16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#,
16#0E#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#03#,
16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#,
16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#,
16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#,
16#00#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#,
16#00#, 16#18#, 16#00#, 16#00#, 16#01#, 16#8C#, 16#60#, 16#00#, 16#01#,
16#E4#, 16#70#, 16#00#, 16#00#, 16#7A#, 16#70#, 16#00#, 16#00#, 16#07#,
16#40#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#D8#,
16#00#, 16#00#, 16#07#, 16#A7#, 16#80#, 16#00#, 16#07#, 16#91#, 16#C0#,
16#00#, 16#01#, 16#8C#, 16#60#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#,
16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#,
16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#,
16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#,
16#03#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#FF#,
16#FF#, 16#C0#, 16#00#, 16#7F#, 16#FF#, 16#E0#, 16#00#, 16#00#, 16#30#,
16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#,
16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#,
16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#,
16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#E0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#7C#,
16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#,
16#00#, 16#00#, 16#01#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#,
16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#7F#, 16#C0#, 16#00#, 16#00#, 16#3F#, 16#E0#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#,
16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#,
16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#60#,
16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#,
16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#,
16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#, 16#00#,
16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#,
16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#,
16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#,
16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#,
16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#,
16#06#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#,
16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#,
16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#01#, 16#8E#, 16#00#, 16#00#,
16#01#, 16#83#, 16#80#, 16#00#, 16#01#, 16#80#, 16#E0#, 16#00#, 16#01#,
16#C0#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#1C#, 16#00#, 16#00#, 16#70#,
16#0E#, 16#00#, 16#00#, 16#70#, 16#07#, 16#00#, 16#00#, 16#38#, 16#03#,
16#80#, 16#00#, 16#1C#, 16#01#, 16#E0#, 16#00#, 16#0E#, 16#00#, 16#F0#,
16#00#, 16#07#, 16#00#, 16#78#, 16#00#, 16#03#, 16#80#, 16#3C#, 16#00#,
16#01#, 16#C0#, 16#1E#, 16#00#, 16#00#, 16#E0#, 16#0F#, 16#00#, 16#00#,
16#70#, 16#07#, 16#00#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#0E#,
16#01#, 16#C0#, 16#00#, 16#07#, 16#00#, 16#E0#, 16#00#, 16#03#, 16#80#,
16#E0#, 16#00#, 16#00#, 16#C0#, 16#70#, 16#00#, 16#00#, 16#30#, 16#70#,
16#00#, 16#00#, 16#0C#, 16#70#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#20#, 16#00#, 16#00#, 16#00#,
16#70#, 16#00#, 16#00#, 16#00#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#9C#,
16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#,
16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#,
16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#,
16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#,
16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#,
16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#,
16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#,
16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#,
16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#,
16#0F#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#F0#,
16#00#, 16#00#, 16#03#, 16#FE#, 16#00#, 16#00#, 16#03#, 16#FF#, 16#00#,
16#00#, 16#03#, 16#87#, 16#C0#, 16#00#, 16#01#, 16#00#, 16#F0#, 16#00#,
16#00#, 16#80#, 16#78#, 16#00#, 16#00#, 16#80#, 16#1C#, 16#00#, 16#00#,
16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#,
16#03#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#,
16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#C0#,
16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#40#, 16#00#,
16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#00#, 16#40#, 16#00#, 16#00#,
16#00#, 16#40#, 16#00#, 16#00#, 16#00#, 16#40#, 16#10#, 16#00#, 16#00#,
16#40#, 16#08#, 16#00#, 16#00#, 16#7F#, 16#FC#, 16#00#, 16#00#, 16#7F#,
16#FC#, 16#00#, 16#00#, 16#7F#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#FE#, 16#00#, 16#00#,
16#03#, 16#0F#, 16#00#, 16#00#, 16#03#, 16#01#, 16#C0#, 16#00#, 16#01#,
16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#,
16#30#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#18#,
16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#00#,
16#00#, 16#00#, 16#7F#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#,
16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#,
16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#,
16#01#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#,
16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#E0#, 16#E0#,
16#00#, 16#00#, 16#7F#, 16#C0#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#06#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#,
16#80#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#02#, 16#E0#,
16#00#, 16#00#, 16#02#, 16#70#, 16#00#, 16#00#, 16#01#, 16#38#, 16#00#,
16#00#, 16#01#, 16#1C#, 16#00#, 16#00#, 16#01#, 16#0E#, 16#00#, 16#00#,
16#01#, 16#87#, 16#00#, 16#00#, 16#00#, 16#83#, 16#80#, 16#00#, 16#00#,
16#81#, 16#C0#, 16#00#, 16#00#, 16#C0#, 16#E0#, 16#00#, 16#00#, 16#C0#,
16#70#, 16#00#, 16#00#, 16#40#, 16#38#, 16#00#, 16#00#, 16#7F#, 16#FF#,
16#C0#, 16#00#, 16#3F#, 16#FF#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#00#,
16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#,
16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#,
16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#FF#, 16#80#, 16#00#, 16#00#, 16#FF#, 16#80#,
16#00#, 16#00#, 16#7F#, 16#C0#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#,
16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#,
16#1F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#F0#, 16#00#, 16#00#, 16#07#,
16#FE#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#00#, 16#03#,
16#C0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#38#,
16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#,
16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#,
16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#,
16#00#, 16#C0#, 16#00#, 16#01#, 16#E0#, 16#C0#, 16#00#, 16#00#, 16#FF#,
16#C0#, 16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#,
16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#,
16#38#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#3C#,
16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#7C#,
16#00#, 16#00#, 16#0E#, 16#FF#, 16#00#, 16#00#, 16#0F#, 16#83#, 16#C0#,
16#00#, 16#07#, 16#80#, 16#F0#, 16#00#, 16#03#, 16#C0#, 16#78#, 16#00#,
16#01#, 16#C0#, 16#1C#, 16#00#, 16#00#, 16#E0#, 16#0E#, 16#00#, 16#00#,
16#70#, 16#07#, 16#00#, 16#00#, 16#3C#, 16#03#, 16#80#, 16#00#, 16#0E#,
16#01#, 16#C0#, 16#00#, 16#07#, 16#00#, 16#E0#, 16#00#, 16#03#, 16#C0#,
16#70#, 16#00#, 16#00#, 16#E0#, 16#70#, 16#00#, 16#00#, 16#38#, 16#70#,
16#00#, 16#00#, 16#0F#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#,
16#FF#, 16#C0#, 16#00#, 16#07#, 16#FF#, 16#C0#, 16#00#, 16#03#, 16#FF#,
16#E0#, 16#00#, 16#03#, 16#00#, 16#30#, 16#00#, 16#01#, 16#00#, 16#30#,
16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#,
16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#,
16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#,
16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#,
16#C0#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#30#,
16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#,
16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#,
16#00#, 16#06#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#,
16#03#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#FC#,
16#00#, 16#00#, 16#07#, 16#07#, 16#00#, 16#00#, 16#03#, 16#01#, 16#80#,
16#00#, 16#03#, 16#80#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#70#, 16#00#,
16#00#, 16#E0#, 16#38#, 16#00#, 16#00#, 16#70#, 16#1C#, 16#00#, 16#00#,
16#1C#, 16#0C#, 16#00#, 16#00#, 16#0F#, 16#8C#, 16#00#, 16#00#, 16#03#,
16#F8#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#3F#,
16#00#, 16#00#, 16#00#, 16#37#, 16#C0#, 16#00#, 16#00#, 16#31#, 16#F0#,
16#00#, 16#00#, 16#30#, 16#3C#, 16#00#, 16#00#, 16#38#, 16#0E#, 16#00#,
16#00#, 16#1C#, 16#03#, 16#80#, 16#00#, 16#0E#, 16#01#, 16#C0#, 16#00#,
16#07#, 16#00#, 16#E0#, 16#00#, 16#03#, 16#80#, 16#60#, 16#00#, 16#00#,
16#E0#, 16#70#, 16#00#, 16#00#, 16#78#, 16#70#, 16#00#, 16#00#, 16#1F#,
16#F0#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#,
16#00#, 16#07#, 16#F8#, 16#00#, 16#00#, 16#07#, 16#0E#, 16#00#, 16#00#,
16#03#, 16#03#, 16#80#, 16#00#, 16#03#, 16#80#, 16#E0#, 16#00#, 16#01#,
16#C0#, 16#70#, 16#00#, 16#01#, 16#C0#, 16#38#, 16#00#, 16#00#, 16#E0#,
16#1E#, 16#00#, 16#00#, 16#70#, 16#07#, 16#00#, 16#00#, 16#38#, 16#03#,
16#80#, 16#00#, 16#1C#, 16#01#, 16#C0#, 16#00#, 16#0F#, 16#00#, 16#E0#,
16#00#, 16#07#, 16#80#, 16#70#, 16#00#, 16#01#, 16#E0#, 16#78#, 16#00#,
16#00#, 16#F8#, 16#7C#, 16#00#, 16#00#, 16#3F#, 16#DC#, 16#00#, 16#00#,
16#07#, 16#CE#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#,
16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#03#,
16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#,
16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#,
16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#,
16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#,
16#03#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#,
16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#,
16#1C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#,
16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#70#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#3E#,
16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#,
16#00#, 16#00#, 16#00#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#,
16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#07#,
16#E0#, 16#00#, 16#00#, 16#0F#, 16#C0#, 16#00#, 16#00#, 16#1F#, 16#80#,
16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#,
16#01#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#,
16#7C#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#00#, 16#03#,
16#F0#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#07#,
16#C0#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#1F#,
16#80#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#20#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#FF#, 16#FE#, 16#00#, 16#03#,
16#FF#, 16#FF#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#FF#, 16#FC#,
16#00#, 16#07#, 16#FF#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#80#, 16#00#, 16#00#, 16#00#,
16#78#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#07#,
16#E0#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#0F#,
16#80#, 16#00#, 16#00#, 16#01#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#3F#,
16#00#, 16#00#, 16#00#, 16#07#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#E0#,
16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#,
16#00#, 16#0F#, 16#80#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#,
16#7E#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#F0#,
16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#, 16#E0#, 16#00#,
16#00#, 16#07#, 16#F8#, 16#00#, 16#00#, 16#06#, 16#1E#, 16#00#, 16#00#,
16#02#, 16#07#, 16#80#, 16#00#, 16#03#, 16#81#, 16#C0#, 16#00#, 16#01#,
16#C0#, 16#E0#, 16#00#, 16#00#, 16#60#, 16#70#, 16#00#, 16#00#, 16#00#,
16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#,
16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#,
16#00#, 16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#03#, 16#00#, 16#00#,
16#00#, 16#01#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#,
16#00#, 16#80#, 16#00#, 16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#00#,
16#20#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#,
16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#0F#, 16#E0#, 16#00#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#00#,
16#3E#, 16#07#, 16#80#, 16#00#, 16#3C#, 16#00#, 16#E0#, 16#00#, 16#38#,
16#00#, 16#38#, 16#00#, 16#3C#, 16#00#, 16#0E#, 16#00#, 16#1C#, 16#00#,
16#03#, 16#00#, 16#1C#, 16#03#, 16#80#, 16#C0#, 16#0E#, 16#07#, 16#EC#,
16#60#, 16#07#, 16#07#, 16#8E#, 16#10#, 16#07#, 16#03#, 16#87#, 16#08#,
16#03#, 16#83#, 16#83#, 16#04#, 16#01#, 16#C1#, 16#81#, 16#82#, 16#00#,
16#E1#, 16#C0#, 16#C1#, 16#00#, 16#70#, 16#E0#, 16#E1#, 16#80#, 16#38#,
16#70#, 16#60#, 16#C0#, 16#1C#, 16#38#, 16#70#, 16#C0#, 16#07#, 16#1C#,
16#58#, 16#C0#, 16#03#, 16#87#, 16#EF#, 16#C0#, 16#00#, 16#E1#, 16#C3#,
16#C0#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#,
16#00#, 16#03#, 16#E0#, 16#38#, 16#00#, 16#00#, 16#FF#, 16#F8#, 16#00#,
16#00#, 16#0F#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#02#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#,
16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#,
16#00#, 16#00#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#5C#, 16#00#, 16#00#,
16#00#, 16#6F#, 16#00#, 16#00#, 16#00#, 16#23#, 16#80#, 16#00#, 16#00#,
16#31#, 16#E0#, 16#00#, 16#00#, 16#18#, 16#70#, 16#00#, 16#00#, 16#18#,
16#3C#, 16#00#, 16#00#, 16#0C#, 16#0E#, 16#00#, 16#00#, 16#04#, 16#07#,
16#80#, 16#00#, 16#06#, 16#03#, 16#C0#, 16#00#, 16#03#, 16#FF#, 16#E0#,
16#00#, 16#03#, 16#FF#, 16#F8#, 16#00#, 16#01#, 16#80#, 16#3C#, 16#00#,
16#01#, 16#80#, 16#0F#, 16#00#, 16#00#, 16#C0#, 16#07#, 16#80#, 16#00#,
16#C0#, 16#01#, 16#E0#, 16#00#, 16#60#, 16#00#, 16#F0#, 16#00#, 16#70#,
16#00#, 16#7C#, 16#00#, 16#7E#, 16#00#, 16#FF#, 16#80#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#80#, 16#00#,
16#03#, 16#FF#, 16#F0#, 16#00#, 16#00#, 16#F0#, 16#7C#, 16#00#, 16#00#,
16#70#, 16#0F#, 16#00#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#1C#,
16#01#, 16#C0#, 16#00#, 16#0E#, 16#00#, 16#E0#, 16#00#, 16#07#, 16#00#,
16#70#, 16#00#, 16#03#, 16#80#, 16#78#, 16#00#, 16#01#, 16#C0#, 16#78#,
16#00#, 16#00#, 16#FF#, 16#F0#, 16#00#, 16#00#, 16#7F#, 16#FC#, 16#00#,
16#00#, 16#38#, 16#1F#, 16#80#, 16#00#, 16#1C#, 16#03#, 16#E0#, 16#00#,
16#0E#, 16#00#, 16#F0#, 16#00#, 16#07#, 16#00#, 16#3C#, 16#00#, 16#03#,
16#80#, 16#1E#, 16#00#, 16#01#, 16#C0#, 16#0F#, 16#00#, 16#00#, 16#E0#,
16#0F#, 16#00#, 16#00#, 16#70#, 16#07#, 16#80#, 16#00#, 16#3C#, 16#0F#,
16#80#, 16#00#, 16#3F#, 16#FF#, 16#80#, 16#00#, 16#7F#, 16#FF#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#82#, 16#00#, 16#00#,
16#7F#, 16#FB#, 16#00#, 16#00#, 16#7C#, 16#1F#, 16#80#, 16#00#, 16#F8#,
16#03#, 16#C0#, 16#00#, 16#78#, 16#00#, 16#E0#, 16#00#, 16#78#, 16#00#,
16#30#, 16#00#, 16#78#, 16#00#, 16#08#, 16#00#, 16#3C#, 16#00#, 16#04#,
16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#,
16#0F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#03#,
16#C0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#F0#,
16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#,
16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#,
16#00#, 16#01#, 16#F0#, 16#00#, 16#40#, 16#00#, 16#7C#, 16#00#, 16#C0#,
16#00#, 16#1F#, 16#81#, 16#C0#, 16#00#, 16#03#, 16#FF#, 16#C0#, 16#00#,
16#00#, 16#7F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#1F#, 16#FF#, 16#80#, 16#00#, 16#03#, 16#FF#, 16#F8#,
16#00#, 16#01#, 16#E0#, 16#7F#, 16#00#, 16#00#, 16#70#, 16#07#, 16#C0#,
16#00#, 16#38#, 16#01#, 16#F0#, 16#00#, 16#1C#, 16#00#, 16#78#, 16#00#,
16#0E#, 16#00#, 16#1E#, 16#00#, 16#07#, 16#00#, 16#0F#, 16#00#, 16#03#,
16#80#, 16#03#, 16#C0#, 16#01#, 16#C0#, 16#01#, 16#E0#, 16#00#, 16#E0#,
16#00#, 16#F0#, 16#00#, 16#70#, 16#00#, 16#78#, 16#00#, 16#38#, 16#00#,
16#3C#, 16#00#, 16#1C#, 16#00#, 16#1E#, 16#00#, 16#0E#, 16#00#, 16#0F#,
16#00#, 16#07#, 16#00#, 16#0F#, 16#00#, 16#03#, 16#80#, 16#07#, 16#80#,
16#01#, 16#C0#, 16#07#, 16#80#, 16#00#, 16#E0#, 16#03#, 16#C0#, 16#00#,
16#70#, 16#07#, 16#C0#, 16#00#, 16#78#, 16#1F#, 16#C0#, 16#00#, 16#3F#,
16#FF#, 16#80#, 16#00#, 16#7F#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#F8#, 16#00#,
16#07#, 16#FF#, 16#FC#, 16#00#, 16#01#, 16#E0#, 16#06#, 16#00#, 16#00#,
16#70#, 16#01#, 16#00#, 16#00#, 16#38#, 16#00#, 16#80#, 16#00#, 16#1C#,
16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#,
16#00#, 16#00#, 16#03#, 16#80#, 16#20#, 16#00#, 16#01#, 16#C0#, 16#10#,
16#00#, 16#00#, 16#FF#, 16#F8#, 16#00#, 16#00#, 16#7F#, 16#FC#, 16#00#,
16#00#, 16#38#, 16#02#, 16#00#, 16#00#, 16#1C#, 16#01#, 16#00#, 16#00#,
16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#,
16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#01#, 16#00#, 16#00#, 16#E0#,
16#01#, 16#80#, 16#00#, 16#70#, 16#01#, 16#80#, 16#00#, 16#78#, 16#03#,
16#C0#, 16#00#, 16#7F#, 16#FF#, 16#E0#, 16#00#, 16#7F#, 16#FF#, 16#F0#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#,
16#FF#, 16#F8#, 16#00#, 16#07#, 16#FF#, 16#FC#, 16#00#, 16#01#, 16#E0#,
16#06#, 16#00#, 16#00#, 16#70#, 16#01#, 16#00#, 16#00#, 16#38#, 16#00#,
16#80#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#,
16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#20#, 16#00#,
16#01#, 16#C0#, 16#30#, 16#00#, 16#00#, 16#FF#, 16#F8#, 16#00#, 16#00#,
16#7F#, 16#FC#, 16#00#, 16#00#, 16#38#, 16#06#, 16#00#, 16#00#, 16#1C#,
16#01#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#,
16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#,
16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#,
16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#,
16#7F#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#,
16#82#, 16#00#, 16#00#, 16#7F#, 16#FB#, 16#00#, 16#00#, 16#7C#, 16#0F#,
16#80#, 16#00#, 16#78#, 16#01#, 16#C0#, 16#00#, 16#78#, 16#00#, 16#60#,
16#00#, 16#78#, 16#00#, 16#30#, 16#00#, 16#78#, 16#00#, 16#08#, 16#00#,
16#3C#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#1E#,
16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#,
16#0F#, 16#F8#, 16#03#, 16#C0#, 16#01#, 16#F0#, 16#01#, 16#E0#, 16#00#,
16#78#, 16#00#, 16#F0#, 16#00#, 16#38#, 16#00#, 16#3C#, 16#00#, 16#1C#,
16#00#, 16#1E#, 16#00#, 16#0E#, 16#00#, 16#0F#, 16#00#, 16#07#, 16#00#,
16#03#, 16#C0#, 16#03#, 16#80#, 16#01#, 16#F0#, 16#01#, 16#C0#, 16#00#,
16#7C#, 16#00#, 16#E0#, 16#00#, 16#1F#, 16#81#, 16#F0#, 16#00#, 16#03#,
16#FF#, 16#E0#, 16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#F0#, 16#7F#, 16#C0#,
16#03#, 16#E0#, 16#0F#, 16#80#, 16#01#, 16#E0#, 16#03#, 16#80#, 16#00#,
16#70#, 16#01#, 16#C0#, 16#00#, 16#38#, 16#00#, 16#E0#, 16#00#, 16#1C#,
16#00#, 16#70#, 16#00#, 16#0E#, 16#00#, 16#38#, 16#00#, 16#07#, 16#00#,
16#1C#, 16#00#, 16#03#, 16#80#, 16#0E#, 16#00#, 16#01#, 16#C0#, 16#07#,
16#00#, 16#00#, 16#FF#, 16#FF#, 16#80#, 16#00#, 16#7F#, 16#FF#, 16#C0#,
16#00#, 16#38#, 16#00#, 16#E0#, 16#00#, 16#1C#, 16#00#, 16#70#, 16#00#,
16#0E#, 16#00#, 16#38#, 16#00#, 16#07#, 16#00#, 16#1C#, 16#00#, 16#03#,
16#80#, 16#0E#, 16#00#, 16#01#, 16#C0#, 16#07#, 16#00#, 16#00#, 16#E0#,
16#03#, 16#80#, 16#00#, 16#70#, 16#01#, 16#C0#, 16#00#, 16#78#, 16#00#,
16#E0#, 16#00#, 16#3E#, 16#00#, 16#F8#, 16#00#, 16#7F#, 16#C1#, 16#FF#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#,
16#F8#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#F0#,
16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#,
16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#,
16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#,
16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#,
16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#,
16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#,
16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#,
16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#,
16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#,
16#7F#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#07#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#,
16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#,
16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#,
16#03#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#00#,
16#F0#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#3C#,
16#00#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#,
16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#,
16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#,
16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#03#,
16#1C#, 16#00#, 16#00#, 16#03#, 16#CE#, 16#00#, 16#00#, 16#00#, 16#FE#,
16#00#, 16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#F0#, 16#FF#, 16#80#,
16#03#, 16#E0#, 16#1E#, 16#00#, 16#00#, 16#E0#, 16#0E#, 16#00#, 16#00#,
16#70#, 16#0E#, 16#00#, 16#00#, 16#38#, 16#06#, 16#00#, 16#00#, 16#1C#,
16#0E#, 16#00#, 16#00#, 16#0E#, 16#0E#, 16#00#, 16#00#, 16#07#, 16#0E#,
16#00#, 16#00#, 16#03#, 16#8E#, 16#00#, 16#00#, 16#01#, 16#CC#, 16#00#,
16#00#, 16#00#, 16#EF#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#80#, 16#00#,
16#00#, 16#39#, 16#E0#, 16#00#, 16#00#, 16#1C#, 16#78#, 16#00#, 16#00#,
16#0E#, 16#1E#, 16#00#, 16#00#, 16#07#, 16#07#, 16#80#, 16#00#, 16#03#,
16#81#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#78#, 16#00#, 16#00#, 16#E0#,
16#1E#, 16#00#, 16#00#, 16#70#, 16#0F#, 16#80#, 16#00#, 16#78#, 16#03#,
16#E0#, 16#00#, 16#3E#, 16#01#, 16#FC#, 16#00#, 16#7F#, 16#C3#, 16#FF#,
16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#,
16#F0#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#00#, 16#01#, 16#E0#,
16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#,
16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#,
16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#,
16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#,
16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#,
16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#,
16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#01#,
16#00#, 16#00#, 16#E0#, 16#01#, 16#80#, 16#00#, 16#70#, 16#01#, 16#80#,
16#00#, 16#78#, 16#03#, 16#C0#, 16#00#, 16#3F#, 16#FF#, 16#E0#, 16#00#,
16#7F#, 16#FF#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#1F#, 16#C0#, 16#00#, 16#7F#, 16#03#, 16#E0#, 16#00#,
16#3E#, 16#00#, 16#F8#, 16#00#, 16#3E#, 16#00#, 16#7C#, 16#00#, 16#1F#,
16#00#, 16#2F#, 16#00#, 16#1B#, 16#80#, 16#17#, 16#80#, 16#0D#, 16#C0#,
16#09#, 16#E0#, 16#0C#, 16#E0#, 16#04#, 16#F0#, 16#06#, 16#70#, 16#02#,
16#78#, 16#02#, 16#38#, 16#01#, 16#1E#, 16#03#, 16#1C#, 16#00#, 16#8F#,
16#01#, 16#0E#, 16#00#, 16#43#, 16#C1#, 16#87#, 16#00#, 16#21#, 16#E0#,
16#C3#, 16#80#, 16#10#, 16#78#, 16#C1#, 16#C0#, 16#08#, 16#3C#, 16#60#,
16#E0#, 16#04#, 16#0F#, 16#60#, 16#70#, 16#02#, 16#07#, 16#B0#, 16#38#,
16#01#, 16#01#, 16#F0#, 16#1C#, 16#00#, 16#80#, 16#F8#, 16#0E#, 16#00#,
16#60#, 16#38#, 16#07#, 16#00#, 16#30#, 16#1C#, 16#07#, 16#80#, 16#3C#,
16#04#, 16#03#, 16#E0#, 16#7F#, 16#82#, 16#07#, 16#FC#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#1F#, 16#E0#,
16#07#, 16#E0#, 16#03#, 16#C0#, 16#00#, 16#F8#, 16#00#, 16#C0#, 16#00#,
16#7C#, 16#00#, 16#60#, 16#00#, 16#3F#, 16#00#, 16#30#, 16#00#, 16#17#,
16#C0#, 16#18#, 16#00#, 16#09#, 16#F0#, 16#0C#, 16#00#, 16#04#, 16#7C#,
16#06#, 16#00#, 16#02#, 16#1E#, 16#03#, 16#00#, 16#01#, 16#07#, 16#81#,
16#80#, 16#00#, 16#83#, 16#E0#, 16#C0#, 16#00#, 16#40#, 16#F8#, 16#60#,
16#00#, 16#20#, 16#3E#, 16#30#, 16#00#, 16#10#, 16#0F#, 16#18#, 16#00#,
16#08#, 16#03#, 16#CC#, 16#00#, 16#04#, 16#00#, 16#F6#, 16#00#, 16#02#,
16#00#, 16#7F#, 16#00#, 16#01#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#80#,
16#07#, 16#C0#, 16#00#, 16#60#, 16#01#, 16#E0#, 16#00#, 16#30#, 16#00#,
16#70#, 16#00#, 16#3C#, 16#00#, 16#18#, 16#00#, 16#7F#, 16#80#, 16#04#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#00#,
16#7F#, 16#F8#, 16#00#, 16#00#, 16#F8#, 16#3E#, 16#00#, 16#00#, 16#F0#,
16#07#, 16#80#, 16#00#, 16#F0#, 16#01#, 16#E0#, 16#00#, 16#78#, 16#00#,
16#70#, 16#00#, 16#78#, 16#00#, 16#3C#, 16#00#, 16#3C#, 16#00#, 16#1E#,
16#00#, 16#1E#, 16#00#, 16#07#, 16#80#, 16#1E#, 16#00#, 16#03#, 16#C0#,
16#0F#, 16#00#, 16#01#, 16#E0#, 16#07#, 16#80#, 16#00#, 16#F0#, 16#03#,
16#C0#, 16#00#, 16#78#, 16#01#, 16#E0#, 16#00#, 16#3C#, 16#00#, 16#F0#,
16#00#, 16#1E#, 16#00#, 16#3C#, 16#00#, 16#0F#, 16#00#, 16#1E#, 16#00#,
16#0F#, 16#00#, 16#0F#, 16#00#, 16#07#, 16#80#, 16#03#, 16#C0#, 16#03#,
16#C0#, 16#01#, 16#E0#, 16#03#, 16#C0#, 16#00#, 16#78#, 16#03#, 16#C0#,
16#00#, 16#1F#, 16#07#, 16#C0#, 16#00#, 16#03#, 16#FF#, 16#C0#, 16#00#,
16#00#, 16#7F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#1F#, 16#FE#, 16#00#, 16#00#, 16#03#, 16#FF#, 16#E0#,
16#00#, 16#01#, 16#E0#, 16#F8#, 16#00#, 16#00#, 16#F0#, 16#1E#, 16#00#,
16#00#, 16#78#, 16#07#, 16#80#, 16#00#, 16#3C#, 16#03#, 16#C0#, 16#00#,
16#1E#, 16#01#, 16#E0#, 16#00#, 16#0F#, 16#00#, 16#F0#, 16#00#, 16#07#,
16#80#, 16#78#, 16#00#, 16#03#, 16#C0#, 16#38#, 16#00#, 16#01#, 16#E0#,
16#3C#, 16#00#, 16#00#, 16#F0#, 16#7C#, 16#00#, 16#00#, 16#7F#, 16#FC#,
16#00#, 16#00#, 16#3F#, 16#F8#, 16#00#, 16#00#, 16#1E#, 16#00#, 16#00#,
16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#,
16#03#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#00#,
16#F0#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#3E#,
16#00#, 16#00#, 16#00#, 16#7F#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#3F#, 16#80#, 16#00#, 16#00#, 16#7F#, 16#F0#, 16#00#,
16#00#, 16#F8#, 16#3E#, 16#00#, 16#00#, 16#F0#, 16#07#, 16#80#, 16#00#,
16#70#, 16#01#, 16#E0#, 16#00#, 16#78#, 16#00#, 16#70#, 16#00#, 16#78#,
16#00#, 16#3C#, 16#00#, 16#3C#, 16#00#, 16#1E#, 16#00#, 16#1E#, 16#00#,
16#07#, 16#80#, 16#1E#, 16#00#, 16#03#, 16#C0#, 16#0F#, 16#00#, 16#01#,
16#E0#, 16#07#, 16#80#, 16#00#, 16#F0#, 16#03#, 16#C0#, 16#00#, 16#78#,
16#01#, 16#E0#, 16#00#, 16#3C#, 16#00#, 16#F0#, 16#00#, 16#1E#, 16#00#,
16#78#, 16#00#, 16#0F#, 16#00#, 16#1E#, 16#00#, 16#07#, 16#80#, 16#0F#,
16#00#, 16#07#, 16#80#, 16#03#, 16#80#, 16#03#, 16#C0#, 16#01#, 16#E0#,
16#03#, 16#C0#, 16#00#, 16#78#, 16#01#, 16#C0#, 16#00#, 16#1E#, 16#01#,
16#C0#, 16#00#, 16#03#, 16#83#, 16#C0#, 16#00#, 16#00#, 16#7F#, 16#00#,
16#00#, 16#00#, 16#1F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#C0#, 16#00#,
16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#,
16#00#, 16#07#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#FE#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#,
16#FF#, 16#00#, 16#00#, 16#03#, 16#FF#, 16#E0#, 16#00#, 16#01#, 16#E0#,
16#FC#, 16#00#, 16#00#, 16#F0#, 16#1E#, 16#00#, 16#00#, 16#78#, 16#07#,
16#80#, 16#00#, 16#3C#, 16#03#, 16#C0#, 16#00#, 16#1E#, 16#01#, 16#E0#,
16#00#, 16#0F#, 16#00#, 16#F0#, 16#00#, 16#07#, 16#80#, 16#78#, 16#00#,
16#03#, 16#C0#, 16#78#, 16#00#, 16#01#, 16#E0#, 16#F8#, 16#00#, 16#00#,
16#FF#, 16#F8#, 16#00#, 16#00#, 16#7F#, 16#E0#, 16#00#, 16#00#, 16#3C#,
16#F8#, 16#00#, 16#00#, 16#1E#, 16#3E#, 16#00#, 16#00#, 16#0F#, 16#0F#,
16#80#, 16#00#, 16#07#, 16#83#, 16#C0#, 16#00#, 16#03#, 16#C0#, 16#F0#,
16#00#, 16#01#, 16#E0#, 16#3C#, 16#00#, 16#00#, 16#F0#, 16#1F#, 16#00#,
16#00#, 16#78#, 16#07#, 16#C0#, 16#00#, 16#3E#, 16#01#, 16#F0#, 16#00#,
16#7F#, 16#C0#, 16#7E#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#E1#,
16#00#, 16#00#, 16#03#, 16#FE#, 16#80#, 16#00#, 16#03#, 16#C3#, 16#E0#,
16#00#, 16#01#, 16#C0#, 16#70#, 16#00#, 16#01#, 16#C0#, 16#18#, 16#00#,
16#00#, 16#E0#, 16#0C#, 16#00#, 16#00#, 16#70#, 16#02#, 16#00#, 16#00#,
16#3C#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#07#,
16#E0#, 16#00#, 16#00#, 16#01#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#7F#,
16#80#, 16#00#, 16#00#, 16#0F#, 16#E0#, 16#00#, 16#00#, 16#01#, 16#F8#,
16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#,
16#00#, 16#20#, 16#03#, 16#C0#, 16#00#, 16#10#, 16#01#, 16#E0#, 16#00#,
16#0C#, 16#00#, 16#F0#, 16#00#, 16#07#, 16#00#, 16#70#, 16#00#, 16#01#,
16#C0#, 16#78#, 16#00#, 16#00#, 16#F0#, 16#78#, 16#00#, 16#00#, 16#4F#,
16#F8#, 16#00#, 16#00#, 16#21#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#FC#, 16#00#,
16#0F#, 16#FF#, 16#FF#, 16#00#, 16#06#, 16#07#, 16#03#, 16#80#, 16#02#,
16#03#, 16#80#, 16#C0#, 16#01#, 16#01#, 16#C0#, 16#20#, 16#00#, 16#00#,
16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#,
16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#,
16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#,
16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#,
16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#,
16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#,
16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#E0#,
16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#FF#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#,
16#F0#, 16#1F#, 16#E0#, 16#03#, 16#E0#, 16#03#, 16#C0#, 16#00#, 16#E0#,
16#00#, 16#C0#, 16#00#, 16#70#, 16#00#, 16#60#, 16#00#, 16#38#, 16#00#,
16#20#, 16#00#, 16#1C#, 16#00#, 16#10#, 16#00#, 16#0E#, 16#00#, 16#08#,
16#00#, 16#07#, 16#00#, 16#04#, 16#00#, 16#03#, 16#80#, 16#02#, 16#00#,
16#01#, 16#C0#, 16#01#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#80#, 16#00#,
16#70#, 16#00#, 16#40#, 16#00#, 16#38#, 16#00#, 16#20#, 16#00#, 16#1C#,
16#00#, 16#10#, 16#00#, 16#0E#, 16#00#, 16#08#, 16#00#, 16#07#, 16#00#,
16#04#, 16#00#, 16#03#, 16#80#, 16#02#, 16#00#, 16#01#, 16#E0#, 16#03#,
16#00#, 16#00#, 16#F0#, 16#01#, 16#80#, 16#00#, 16#3C#, 16#01#, 16#80#,
16#00#, 16#1F#, 16#03#, 16#C0#, 16#00#, 16#03#, 16#FF#, 16#80#, 16#00#,
16#00#, 16#7F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#3F#, 16#F0#, 16#1F#, 16#C0#, 16#07#, 16#C0#, 16#03#,
16#C0#, 16#01#, 16#E0#, 16#00#, 16#C0#, 16#00#, 16#70#, 16#00#, 16#C0#,
16#00#, 16#3C#, 16#00#, 16#60#, 16#00#, 16#0E#, 16#00#, 16#20#, 16#00#,
16#07#, 16#80#, 16#30#, 16#00#, 16#03#, 16#C0#, 16#18#, 16#00#, 16#00#,
16#F0#, 16#18#, 16#00#, 16#00#, 16#78#, 16#0C#, 16#00#, 16#00#, 16#1E#,
16#04#, 16#00#, 16#00#, 16#0F#, 16#06#, 16#00#, 16#00#, 16#03#, 16#C3#,
16#00#, 16#00#, 16#01#, 16#E3#, 16#00#, 16#00#, 16#00#, 16#71#, 16#80#,
16#00#, 16#00#, 16#3D#, 16#80#, 16#00#, 16#00#, 16#0E#, 16#C0#, 16#00#,
16#00#, 16#07#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#,
16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#,
16#18#, 16#00#, 16#00#, 16#00#, 16#08#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#E7#, 16#FC#, 16#0F#,
16#E7#, 16#C0#, 16#F8#, 16#01#, 16#C1#, 16#E0#, 16#3C#, 16#00#, 16#C0#,
16#F0#, 16#1E#, 16#00#, 16#60#, 16#38#, 16#07#, 16#80#, 16#20#, 16#1E#,
16#03#, 16#C0#, 16#30#, 16#07#, 16#00#, 16#E0#, 16#18#, 16#03#, 16#C0#,
16#78#, 16#08#, 16#01#, 16#E0#, 16#7C#, 16#0C#, 16#00#, 16#70#, 16#2F#,
16#06#, 16#00#, 16#3C#, 16#37#, 16#82#, 16#00#, 16#1E#, 16#19#, 16#C3#,
16#00#, 16#07#, 16#88#, 16#F1#, 16#00#, 16#03#, 16#CC#, 16#79#, 16#80#,
16#00#, 16#E4#, 16#1E#, 16#C0#, 16#00#, 16#7E#, 16#0F#, 16#40#, 16#00#,
16#3F#, 16#03#, 16#E0#, 16#00#, 16#0F#, 16#01#, 16#F0#, 16#00#, 16#07#,
16#80#, 16#F0#, 16#00#, 16#03#, 16#C0#, 16#38#, 16#00#, 16#00#, 16#C0#,
16#1C#, 16#00#, 16#00#, 16#60#, 16#04#, 16#00#, 16#00#, 16#20#, 16#02#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#,
16#F8#, 16#3F#, 16#C0#, 16#03#, 16#F0#, 16#07#, 16#80#, 16#00#, 16#F8#,
16#03#, 16#80#, 16#00#, 16#3C#, 16#01#, 16#80#, 16#00#, 16#0F#, 16#01#,
16#80#, 16#00#, 16#03#, 16#C1#, 16#80#, 16#00#, 16#01#, 16#E1#, 16#80#,
16#00#, 16#00#, 16#79#, 16#80#, 16#00#, 16#00#, 16#1E#, 16#C0#, 16#00#,
16#00#, 16#0F#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#,
16#00#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#, 16#00#, 16#00#,
16#DE#, 16#00#, 16#00#, 16#00#, 16#67#, 16#80#, 16#00#, 16#00#, 16#61#,
16#E0#, 16#00#, 16#00#, 16#60#, 16#F8#, 16#00#, 16#00#, 16#60#, 16#3C#,
16#00#, 16#00#, 16#60#, 16#0F#, 16#00#, 16#00#, 16#60#, 16#07#, 16#C0#,
16#00#, 16#70#, 16#01#, 16#F0#, 16#00#, 16#78#, 16#00#, 16#FC#, 16#00#,
16#FF#, 16#83#, 16#FF#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#3F#, 16#F0#, 16#1F#, 16#C0#, 16#07#, 16#E0#, 16#03#,
16#80#, 16#01#, 16#F0#, 16#01#, 16#80#, 16#00#, 16#78#, 16#01#, 16#80#,
16#00#, 16#1E#, 16#00#, 16#C0#, 16#00#, 16#0F#, 16#80#, 16#C0#, 16#00#,
16#03#, 16#C0#, 16#C0#, 16#00#, 16#00#, 16#F0#, 16#60#, 16#00#, 16#00#,
16#3C#, 16#60#, 16#00#, 16#00#, 16#1E#, 16#60#, 16#00#, 16#00#, 16#07#,
16#B0#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#F0#,
16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#,
16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#,
16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#,
16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#F0#, 16#00#, 16#00#, 16#00#,
16#7C#, 16#00#, 16#00#, 16#01#, 16#FF#, 16#C0#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#FF#, 16#FC#, 16#00#,
16#07#, 16#FF#, 16#FE#, 16#00#, 16#07#, 16#00#, 16#1E#, 16#00#, 16#03#,
16#00#, 16#1E#, 16#00#, 16#01#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#,
16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#,
16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#,
16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#,
16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#,
16#03#, 16#C0#, 16#00#, 16#00#, 16#03#, 16#C0#, 16#00#, 16#00#, 16#01#,
16#C0#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#01#, 16#00#, 16#01#, 16#E0#,
16#01#, 16#80#, 16#01#, 16#E0#, 16#00#, 16#C0#, 16#00#, 16#E0#, 16#01#,
16#C0#, 16#00#, 16#FF#, 16#FF#, 16#E0#, 16#00#, 16#FF#, 16#FF#, 16#F0#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#07#,
16#F0#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#,
16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#,
16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#,
16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#,
16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#,
16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#,
16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#,
16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#,
16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#,
16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#,
16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#,
16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#,
16#00#, 16#00#, 16#00#, 16#FE#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#,
16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#,
16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#,
16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#,
16#18#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#07#,
16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#,
16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#,
16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#,
16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#,
16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#,
16#0C#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#,
16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#E0#, 16#00#, 16#00#,
16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#,
16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#,
16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#,
16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#,
16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#,
16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#,
16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#,
16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#,
16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#,
16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#,
16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#,
16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#01#,
16#FC#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#70#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#, 16#00#, 16#3E#,
16#00#, 16#00#, 16#00#, 16#3B#, 16#00#, 16#00#, 16#00#, 16#19#, 16#C0#,
16#00#, 16#00#, 16#1C#, 16#60#, 16#00#, 16#00#, 16#0C#, 16#38#, 16#00#,
16#00#, 16#0E#, 16#0C#, 16#00#, 16#00#, 16#06#, 16#06#, 16#00#, 16#00#,
16#07#, 16#01#, 16#80#, 16#00#, 16#03#, 16#00#, 16#C0#, 16#00#, 16#03#,
16#80#, 16#30#, 16#00#, 16#01#, 16#80#, 16#18#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#FF#, 16#F8#,
16#00#, 16#0F#, 16#FF#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#,
16#07#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#,
16#30#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#06#, 16#18#, 16#00#, 16#00#,
16#06#, 16#0E#, 16#00#, 16#00#, 16#03#, 16#83#, 16#00#, 16#00#, 16#01#,
16#81#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#01#,
16#E0#, 16#00#, 16#00#, 16#07#, 16#30#, 16#00#, 16#00#, 16#0E#, 16#18#,
16#00#, 16#00#, 16#0E#, 16#0C#, 16#00#, 16#00#, 16#0E#, 16#06#, 16#00#,
16#00#, 16#07#, 16#03#, 16#00#, 16#00#, 16#03#, 16#83#, 16#80#, 16#00#,
16#01#, 16#E3#, 16#E0#, 16#00#, 16#00#, 16#FE#, 16#7C#, 16#00#, 16#00#,
16#1E#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#04#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#,
16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#,
16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#,
16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#,
16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#7C#, 16#00#, 16#00#, 16#07#,
16#FF#, 16#00#, 16#00#, 16#03#, 16#C3#, 16#C0#, 16#00#, 16#01#, 16#C0#,
16#F0#, 16#00#, 16#00#, 16#E0#, 16#38#, 16#00#, 16#00#, 16#70#, 16#1C#,
16#00#, 16#00#, 16#38#, 16#0F#, 16#00#, 16#00#, 16#1C#, 16#07#, 16#80#,
16#00#, 16#0E#, 16#01#, 16#C0#, 16#00#, 16#07#, 16#01#, 16#C0#, 16#00#,
16#03#, 16#80#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#70#, 16#00#, 16#00#,
16#E0#, 16#70#, 16#00#, 16#00#, 16#78#, 16#70#, 16#00#, 16#00#, 16#1F#,
16#F0#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#F0#,
16#00#, 16#00#, 16#03#, 16#FE#, 16#00#, 16#00#, 16#03#, 16#87#, 16#80#,
16#00#, 16#03#, 16#83#, 16#C0#, 16#00#, 16#01#, 16#80#, 16#E0#, 16#00#,
16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#,
16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#,
16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#,
16#40#, 16#00#, 16#01#, 16#F0#, 16#C0#, 16#00#, 16#00#, 16#FF#, 16#C0#,
16#00#, 16#00#, 16#3F#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#C0#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#02#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#,
16#1F#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#,
16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#,
16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#,
16#00#, 16#01#, 16#E7#, 16#00#, 16#00#, 16#03#, 16#FB#, 16#80#, 16#00#,
16#03#, 16#87#, 16#C0#, 16#00#, 16#03#, 16#81#, 16#E0#, 16#00#, 16#01#,
16#C0#, 16#70#, 16#00#, 16#01#, 16#C0#, 16#38#, 16#00#, 16#00#, 16#E0#,
16#1C#, 16#00#, 16#00#, 16#70#, 16#0E#, 16#00#, 16#00#, 16#38#, 16#07#,
16#00#, 16#00#, 16#1C#, 16#03#, 16#80#, 16#00#, 16#0E#, 16#01#, 16#C0#,
16#00#, 16#07#, 16#80#, 16#E0#, 16#00#, 16#01#, 16#C0#, 16#70#, 16#00#,
16#00#, 16#F8#, 16#7C#, 16#00#, 16#00#, 16#3F#, 16#DF#, 16#00#, 16#00#,
16#07#, 16#C8#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#03#,
16#FC#, 16#00#, 16#00#, 16#03#, 16#07#, 16#00#, 16#00#, 16#03#, 16#03#,
16#C0#, 16#00#, 16#03#, 16#FF#, 16#E0#, 16#00#, 16#01#, 16#FF#, 16#F0#,
16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#60#, 16#00#, 16#00#,
16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#,
16#0E#, 16#00#, 16#40#, 16#00#, 16#07#, 16#80#, 16#40#, 16#00#, 16#01#,
16#F0#, 16#E0#, 16#00#, 16#00#, 16#FF#, 16#E0#, 16#00#, 16#00#, 16#3F#,
16#E0#, 16#00#, 16#00#, 16#07#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#,
16#00#, 16#03#, 16#FC#, 16#00#, 16#00#, 16#01#, 16#8E#, 16#00#, 16#00#,
16#01#, 16#80#, 16#00#, 16#00#, 16#00#, 16#C0#, 16#00#, 16#00#, 16#00#,
16#60#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#,
16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#E0#,
16#00#, 16#00#, 16#3F#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#,
16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#,
16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#,
16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#,
16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#,
16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#,
16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#FF#, 16#80#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#03#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#FF#, 16#C0#, 16#00#,
16#03#, 16#8F#, 16#E0#, 16#00#, 16#03#, 16#83#, 16#80#, 16#00#, 16#01#,
16#C0#, 16#E0#, 16#00#, 16#00#, 16#E0#, 16#70#, 16#00#, 16#00#, 16#70#,
16#38#, 16#00#, 16#00#, 16#38#, 16#18#, 16#00#, 16#00#, 16#0E#, 16#0C#,
16#00#, 16#00#, 16#03#, 16#8C#, 16#00#, 16#00#, 16#00#, 16#FC#, 16#00#,
16#00#, 16#00#, 16#80#, 16#00#, 16#00#, 16#00#, 16#80#, 16#00#, 16#00#,
16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#F0#, 16#00#, 16#00#,
16#1F#, 16#FE#, 16#00#, 16#00#, 16#07#, 16#FF#, 16#00#, 16#00#, 16#04#,
16#00#, 16#C0#, 16#00#, 16#04#, 16#00#, 16#20#, 16#00#, 16#06#, 16#00#,
16#20#, 16#00#, 16#03#, 16#00#, 16#10#, 16#00#, 16#01#, 16#E0#, 16#30#,
16#00#, 16#00#, 16#7F#, 16#E0#, 16#00#, 16#00#, 16#1F#, 16#C0#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#,
16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#80#, 16#00#,
16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#,
16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#,
16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#7C#, 16#00#, 16#00#, 16#07#,
16#7F#, 16#00#, 16#00#, 16#03#, 16#C3#, 16#80#, 16#00#, 16#01#, 16#C0#,
16#E0#, 16#00#, 16#00#, 16#E0#, 16#70#, 16#00#, 16#00#, 16#70#, 16#38#,
16#00#, 16#00#, 16#38#, 16#1C#, 16#00#, 16#00#, 16#1C#, 16#0E#, 16#00#,
16#00#, 16#0E#, 16#07#, 16#00#, 16#00#, 16#07#, 16#03#, 16#80#, 16#00#,
16#03#, 16#81#, 16#C0#, 16#00#, 16#01#, 16#C0#, 16#E0#, 16#00#, 16#00#,
16#E0#, 16#70#, 16#00#, 16#00#, 16#F0#, 16#38#, 16#00#, 16#00#, 16#78#,
16#3E#, 16#00#, 16#00#, 16#FF#, 16#3F#, 16#80#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#,
16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#02#, 16#00#,
16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#80#, 16#00#,
16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#,
16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#,
16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#,
16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#,
16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#,
16#00#, 16#00#, 16#3C#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#80#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#,
16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#,
16#01#, 16#F0#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#,
16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#,
16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#,
16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#,
16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#,
16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#,
16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#,
16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#,
16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#03#, 16#8C#, 16#00#,
16#00#, 16#01#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#1E#, 16#00#,
16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#,
16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#,
16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#,
16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#1F#, 16#C0#, 16#00#, 16#07#,
16#07#, 16#80#, 16#00#, 16#03#, 16#83#, 16#00#, 16#00#, 16#01#, 16#C2#,
16#00#, 16#00#, 16#00#, 16#E2#, 16#00#, 16#00#, 16#00#, 16#76#, 16#00#,
16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#,
16#00#, 16#0E#, 16#E0#, 16#00#, 16#00#, 16#07#, 16#38#, 16#00#, 16#00#,
16#03#, 16#8E#, 16#00#, 16#00#, 16#01#, 16#C7#, 16#80#, 16#00#, 16#00#,
16#E1#, 16#E0#, 16#00#, 16#00#, 16#70#, 16#78#, 16#00#, 16#00#, 16#7C#,
16#1E#, 16#00#, 16#00#, 16#FF#, 16#BF#, 16#C0#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#1E#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#00#, 16#00#, 16#00#,
16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#,
16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#,
16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#,
16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#,
16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#,
16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#,
16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#,
16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#,
16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#,
16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#FF#, 16#80#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#0E#, 16#3C#, 16#1E#, 16#00#, 16#3F#, 16#7F#, 16#3F#, 16#80#,
16#03#, 16#C3#, 16#F0#, 16#E0#, 16#01#, 16#C0#, 16#E0#, 16#70#, 16#00#,
16#E0#, 16#70#, 16#38#, 16#00#, 16#70#, 16#38#, 16#0C#, 16#00#, 16#38#,
16#1C#, 16#07#, 16#00#, 16#1C#, 16#0E#, 16#03#, 16#80#, 16#0E#, 16#07#,
16#01#, 16#C0#, 16#07#, 16#03#, 16#80#, 16#E0#, 16#03#, 16#81#, 16#C0#,
16#70#, 16#01#, 16#C0#, 16#E0#, 16#38#, 16#00#, 16#E0#, 16#70#, 16#1C#,
16#00#, 16#70#, 16#38#, 16#1E#, 16#00#, 16#78#, 16#1E#, 16#0F#, 16#00#,
16#FF#, 16#3F#, 16#DF#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#78#, 16#00#, 16#00#, 16#3E#,
16#7F#, 16#00#, 16#00#, 16#07#, 16#43#, 16#80#, 16#00#, 16#01#, 16#C1#,
16#C0#, 16#00#, 16#00#, 16#E0#, 16#70#, 16#00#, 16#00#, 16#70#, 16#38#,
16#00#, 16#00#, 16#38#, 16#1C#, 16#00#, 16#00#, 16#1C#, 16#0E#, 16#00#,
16#00#, 16#0E#, 16#07#, 16#00#, 16#00#, 16#07#, 16#03#, 16#80#, 16#00#,
16#03#, 16#81#, 16#C0#, 16#00#, 16#01#, 16#C0#, 16#E0#, 16#00#, 16#00#,
16#E0#, 16#70#, 16#00#, 16#00#, 16#F0#, 16#38#, 16#00#, 16#00#, 16#78#,
16#3C#, 16#00#, 16#00#, 16#FF#, 16#7F#, 16#80#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#F0#,
16#00#, 16#00#, 16#03#, 16#FE#, 16#00#, 16#00#, 16#03#, 16#87#, 16#80#,
16#00#, 16#03#, 16#81#, 16#E0#, 16#00#, 16#03#, 16#80#, 16#78#, 16#00#,
16#01#, 16#C0#, 16#1C#, 16#00#, 16#00#, 16#E0#, 16#0E#, 16#00#, 16#00#,
16#70#, 16#07#, 16#00#, 16#00#, 16#38#, 16#03#, 16#80#, 16#00#, 16#1C#,
16#01#, 16#C0#, 16#00#, 16#0F#, 16#00#, 16#E0#, 16#00#, 16#03#, 16#80#,
16#70#, 16#00#, 16#01#, 16#E0#, 16#70#, 16#00#, 16#00#, 16#78#, 16#70#,
16#00#, 16#00#, 16#1F#, 16#F0#, 16#00#, 16#00#, 16#03#, 16#E0#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#0E#, 16#7C#, 16#00#, 16#00#, 16#3F#, 16#7F#, 16#80#, 16#00#,
16#03#, 16#C3#, 16#C0#, 16#00#, 16#01#, 16#C0#, 16#F0#, 16#00#, 16#00#,
16#E0#, 16#38#, 16#00#, 16#00#, 16#70#, 16#1E#, 16#00#, 16#00#, 16#38#,
16#0F#, 16#00#, 16#00#, 16#1C#, 16#03#, 16#80#, 16#00#, 16#0E#, 16#01#,
16#C0#, 16#00#, 16#07#, 16#01#, 16#C0#, 16#00#, 16#03#, 16#80#, 16#E0#,
16#00#, 16#01#, 16#C0#, 16#70#, 16#00#, 16#00#, 16#E0#, 16#70#, 16#00#,
16#00#, 16#78#, 16#70#, 16#00#, 16#00#, 16#3F#, 16#F0#, 16#00#, 16#00#,
16#1D#, 16#F0#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#,
16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#,
16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#,
16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#FF#, 16#80#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#01#, 16#F1#, 16#00#, 16#00#, 16#03#,
16#FD#, 16#80#, 16#00#, 16#03#, 16#C3#, 16#C0#, 16#00#, 16#03#, 16#80#,
16#E0#, 16#00#, 16#01#, 16#C0#, 16#70#, 16#00#, 16#01#, 16#C0#, 16#38#,
16#00#, 16#00#, 16#E0#, 16#1C#, 16#00#, 16#00#, 16#70#, 16#0E#, 16#00#,
16#00#, 16#38#, 16#07#, 16#00#, 16#00#, 16#1C#, 16#03#, 16#80#, 16#00#,
16#0E#, 16#01#, 16#C0#, 16#00#, 16#07#, 16#80#, 16#E0#, 16#00#, 16#03#,
16#C0#, 16#70#, 16#00#, 16#00#, 16#F0#, 16#78#, 16#00#, 16#00#, 16#3F#,
16#DC#, 16#00#, 16#00#, 16#0F#, 16#8E#, 16#00#, 16#00#, 16#00#, 16#07#,
16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#,
16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#,
16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#3E#, 16#00#, 16#00#,
16#00#, 16#7F#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#06#, 16#70#,
16#00#, 16#00#, 16#1F#, 16#7C#, 16#00#, 16#00#, 16#07#, 16#CE#, 16#00#,
16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#,
16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#,
16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#,
16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#,
16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#,
16#00#, 16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#FF#, 16#80#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#07#, 16#E0#, 16#00#, 16#00#, 16#0C#, 16#30#, 16#00#, 16#00#,
16#06#, 16#08#, 16#00#, 16#00#, 16#06#, 16#04#, 16#00#, 16#00#, 16#03#,
16#82#, 16#00#, 16#00#, 16#01#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#7C#,
16#00#, 16#00#, 16#00#, 16#1F#, 16#80#, 16#00#, 16#00#, 16#07#, 16#E0#,
16#00#, 16#00#, 16#00#, 16#F8#, 16#00#, 16#00#, 16#08#, 16#1C#, 16#00#,
16#00#, 16#04#, 16#07#, 16#00#, 16#00#, 16#02#, 16#03#, 16#80#, 16#00#,
16#01#, 16#81#, 16#80#, 16#00#, 16#00#, 16#E1#, 16#80#, 16#00#, 16#00#,
16#4F#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#10#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#,
16#3C#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#C0#, 16#00#, 16#00#, 16#1F#,
16#E0#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#,
16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#,
16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#,
16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#,
16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#,
16#E0#, 16#00#, 16#00#, 16#00#, 16#71#, 16#00#, 16#00#, 16#00#, 16#3F#,
16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#7C#, 16#3F#,
16#00#, 16#00#, 16#0E#, 16#07#, 16#80#, 16#00#, 16#07#, 16#01#, 16#C0#,
16#00#, 16#01#, 16#80#, 16#E0#, 16#00#, 16#00#, 16#C0#, 16#70#, 16#00#,
16#00#, 16#60#, 16#38#, 16#00#, 16#00#, 16#30#, 16#1C#, 16#00#, 16#00#,
16#18#, 16#0E#, 16#00#, 16#00#, 16#0C#, 16#07#, 16#00#, 16#00#, 16#06#,
16#03#, 16#80#, 16#00#, 16#03#, 16#01#, 16#C0#, 16#00#, 16#01#, 16#80#,
16#E0#, 16#00#, 16#00#, 16#E0#, 16#F0#, 16#00#, 16#00#, 16#70#, 16#F8#,
16#00#, 16#00#, 16#3F#, 16#DF#, 16#00#, 16#00#, 16#07#, 16#8C#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#7F#, 16#0F#, 16#80#, 16#00#, 16#1F#, 16#01#, 16#80#, 16#00#,
16#07#, 16#00#, 16#80#, 16#00#, 16#01#, 16#C0#, 16#40#, 16#00#, 16#00#,
16#E0#, 16#60#, 16#00#, 16#00#, 16#38#, 16#20#, 16#00#, 16#00#, 16#1C#,
16#30#, 16#00#, 16#00#, 16#07#, 16#10#, 16#00#, 16#00#, 16#03#, 16#88#,
16#00#, 16#00#, 16#01#, 16#C8#, 16#00#, 16#00#, 16#00#, 16#74#, 16#00#,
16#00#, 16#00#, 16#3E#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#,
16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#01#, 16#00#, 16#00#, 16#00#,
16#00#, 16#80#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#7E#, 16#3F#, 16#8F#, 16#80#, 16#1E#,
16#0F#, 16#01#, 16#80#, 16#07#, 16#03#, 16#80#, 16#80#, 16#03#, 16#81#,
16#C0#, 16#40#, 16#00#, 16#E0#, 16#E0#, 16#60#, 16#00#, 16#70#, 16#38#,
16#20#, 16#00#, 16#38#, 16#3C#, 16#30#, 16#00#, 16#0E#, 16#17#, 16#10#,
16#00#, 16#07#, 16#1B#, 16#88#, 16#00#, 16#01#, 16#C8#, 16#CC#, 16#00#,
16#00#, 16#EC#, 16#74#, 16#00#, 16#00#, 16#74#, 16#3E#, 16#00#, 16#00#,
16#1E#, 16#0E#, 16#00#, 16#00#, 16#0E#, 16#07#, 16#00#, 16#00#, 16#03#,
16#01#, 16#00#, 16#00#, 16#01#, 16#00#, 16#80#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#BF#,
16#00#, 16#00#, 16#0F#, 16#06#, 16#00#, 16#00#, 16#03#, 16#C6#, 16#00#,
16#00#, 16#00#, 16#E2#, 16#00#, 16#00#, 16#00#, 16#3B#, 16#00#, 16#00#,
16#00#, 16#1F#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#,
16#01#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#F0#, 16#00#, 16#00#, 16#00#,
16#B8#, 16#00#, 16#00#, 16#00#, 16#8E#, 16#00#, 16#00#, 16#00#, 16#C7#,
16#80#, 16#00#, 16#00#, 16#C1#, 16#C0#, 16#00#, 16#00#, 16#40#, 16#70#,
16#00#, 16#00#, 16#60#, 16#3C#, 16#00#, 16#00#, 16#F8#, 16#7F#, 16#80#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#7F#, 16#07#, 16#80#, 16#00#, 16#1F#, 16#01#, 16#80#, 16#00#,
16#07#, 16#00#, 16#C0#, 16#00#, 16#01#, 16#C0#, 16#40#, 16#00#, 16#00#,
16#E0#, 16#60#, 16#00#, 16#00#, 16#38#, 16#30#, 16#00#, 16#00#, 16#1C#,
16#10#, 16#00#, 16#00#, 16#0F#, 16#18#, 16#00#, 16#00#, 16#03#, 16#88#,
16#00#, 16#00#, 16#01#, 16#E4#, 16#00#, 16#00#, 16#00#, 16#76#, 16#00#,
16#00#, 16#00#, 16#3A#, 16#00#, 16#00#, 16#00#, 16#0F#, 16#00#, 16#00#,
16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#,
16#00#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#40#, 16#00#, 16#00#, 16#00#,
16#20#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#10#,
16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#01#, 16#F8#, 16#00#,
16#00#, 16#00#, 16#F8#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#3F#, 16#FE#, 16#00#, 16#00#, 16#1F#,
16#FE#, 16#00#, 16#00#, 16#0C#, 16#0E#, 16#00#, 16#00#, 16#04#, 16#07#,
16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#,
16#00#, 16#00#, 16#07#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#,
16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#,
16#01#, 16#C0#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#40#, 16#00#, 16#01#,
16#C0#, 16#20#, 16#00#, 16#01#, 16#C0#, 16#30#, 16#00#, 16#00#, 16#FF#,
16#F8#, 16#00#, 16#00#, 16#FF#, 16#FC#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#, 16#00#,
16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#18#, 16#00#, 16#00#, 16#00#,
16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#,
16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#,
16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#,
16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#,
16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#,
16#06#, 16#00#, 16#00#, 16#00#, 16#01#, 16#80#, 16#00#, 16#00#, 16#00#,
16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#,
16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#,
16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#,
16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#,
16#00#, 16#30#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#,
16#0F#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#,
16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#,
16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#,
16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#,
16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#,
16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#,
16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#,
16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#,
16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#,
16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#,
16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#,
16#38#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#78#, 16#00#,
16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#06#, 16#00#, 16#00#,
16#00#, 16#03#, 16#00#, 16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#,
16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#, 16#00#, 16#00#, 16#00#,
16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#,
16#00#, 16#00#, 16#00#, 16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#,
16#00#, 16#00#, 16#01#, 16#C0#, 16#00#, 16#00#, 16#00#, 16#30#, 16#00#,
16#00#, 16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#,
16#00#, 16#1C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#,
16#07#, 16#00#, 16#00#, 16#00#, 16#03#, 16#80#, 16#00#, 16#00#, 16#01#,
16#C0#, 16#00#, 16#00#, 16#00#, 16#E0#, 16#00#, 16#00#, 16#00#, 16#70#,
16#00#, 16#00#, 16#00#, 16#38#, 16#00#, 16#00#, 16#00#, 16#1C#, 16#00#,
16#00#, 16#00#, 16#0C#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#,
16#00#, 16#0F#, 16#00#, 16#00#, 16#00#, 16#0E#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#7C#, 16#00#, 16#00#, 16#00#, 16#7F#, 16#87#, 16#00#, 16#00#,
16#71#, 16#FF#, 16#00#, 16#00#, 16#00#, 16#1F#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#, 16#00#,
16#00#, 16#00#, 16#00#);
Font_D : aliased constant Bitmap_Font :=
(
Bytes_Per_Glyph => 173,
Glyph_Width => 33,
Glyph_Height => 42,
Data => FreeSerif18pt7bBitmaps'Access);
Font : constant Bitmap_Font_Ref := Font_D'Access;
end GESTE_Fonts.FreeSerif18pt7b;
| 73.56325
| 73
| 0.487107
|
50a1a81e9e438e14c8df642d4b90ef2d7ccd1ba0
| 632
|
adb
|
Ada
|
barrier.adb
|
philipbjorge/Parallel-Elliptic-Partial-Differential-Equation-Solver
|
b536f0a51c7fbceb13b2360fc7d3670f58a094fc
|
[
"MIT"
] | 1
|
2017-03-10T23:17:29.000Z
|
2017-03-10T23:17:29.000Z
|
barrier.adb
|
philipbjorge/Parallel-Elliptic-Partial-Differential-Equation-Solver
|
b536f0a51c7fbceb13b2360fc7d3670f58a094fc
|
[
"MIT"
] | null | null | null |
barrier.adb
|
philipbjorge/Parallel-Elliptic-Partial-Differential-Equation-Solver
|
b536f0a51c7fbceb13b2360fc7d3670f58a094fc
|
[
"MIT"
] | null | null | null |
-- Philip Bjorge
-- Simple barrier using protected types that
-- waits on a certain number of entrants
package body Barrier is
protected body Barrier_Type is
entry Here when not leave is begin
count := count + 1;
if count < wait_for then
requeue Wait;
else
count := count - 1;
if count /= 0 then
leave := True;
end if;
end if;
end;
entry Wait when leave is begin
count := count - 1;
if count = 0 then
leave := False;
end if;
end;
end Barrier_Type;
end Barrier;
| 22.571429
| 44
| 0.530063
|
d4c9d3f67d00d654ba74cc36a2a29386d38fb2e2
| 3,431
|
agda
|
Agda
|
src/Prelude/Applicative.agda
|
t-more/agda-prelude
|
da4fca7744d317b8843f2bc80a923972f65548d3
|
[
"MIT"
] | 111
|
2015-01-05T11:28:15.000Z
|
2022-02-12T23:29:26.000Z
|
src/Prelude/Applicative.agda
|
t-more/agda-prelude
|
da4fca7744d317b8843f2bc80a923972f65548d3
|
[
"MIT"
] | 59
|
2016-02-09T05:36:44.000Z
|
2022-01-14T07:32:36.000Z
|
src/Prelude/Applicative.agda
|
t-more/agda-prelude
|
da4fca7744d317b8843f2bc80a923972f65548d3
|
[
"MIT"
] | 24
|
2015-03-12T18:03:45.000Z
|
2021-04-22T06:10:41.000Z
|
module Prelude.Applicative where
open import Agda.Primitive
open import Prelude.Unit
open import Prelude.Functor
open import Prelude.Function
open import Prelude.Equality
open import Prelude.Number
open import Prelude.Semiring
open import Prelude.Fractional
open import Prelude.Applicative.Indexed {I = ⊤} as Indexed
Applicative : ∀ {a b} (F : Set a → Set b) → Set (lsuc a ⊔ b)
Applicative F = Indexed.IApplicative (λ _ _ → F)
Applicative′ : ∀ {a b} (F : ∀ {a} → Set a → Set a) → Set (lsuc (a ⊔ b))
Applicative′ {a} {b} F = Indexed.IApplicative′ {a = a} {b = b} (λ _ _ → F)
open Indexed public hiding (IApplicative; IApplicative′)
fmapApplicative : ∀ {a b} {F : Set a → Set b} →
(∀ {A} → A → F A) → (∀ {A B} → F (A → B) → F A → F B) →
∀ {A B} → (A → B) → F A → F B
fmapApplicative pure _<*>_ f m = pure f <*> m
module _ {a b} {F : Set a → Set b} {{AppF : Applicative F}} where
defaultApplicativeNumber : {A : Set a} {{NumA : Number A}} -- levels get in the way of having constraints
{{_ : NoNumConstraint NumA}} →
Number (F A)
Number.Constraint defaultApplicativeNumber n = ⊤′
fromNat {{defaultApplicativeNumber}} n = pure (fromNat n)
defaultApplicativeNegative : {A : Set a} {{NegA : Negative A}} -- levels get in the way of having constraints
{{_ : NoNegConstraint NegA}} →
Negative (F A)
Negative.Constraint defaultApplicativeNegative _ = ⊤′
fromNeg {{defaultApplicativeNegative}} n = pure (fromNeg n)
defaultApplicativeSemiring : {A : Set a} {{_ : Semiring A}} → Semiring (F A)
zro {{defaultApplicativeSemiring}} = pure zro
one {{defaultApplicativeSemiring}} = pure one
_+_ {{defaultApplicativeSemiring}} x y = _+_ <$> x <*> y
_*_ {{defaultApplicativeSemiring}} x y = _*_ <$> x <*> y
defaultApplicativeSubtractive : {A : Set a} {{_ : Subtractive A}} → Subtractive (F A)
_-_ {{defaultApplicativeSubtractive}} x y = _-_ <$> x <*> y
negate {{defaultApplicativeSubtractive}} x = negate <$> x
defaultApplicativeFractional : {A : Set a} {{FracA : Fractional A}} -- only if no constraints
{{_ : Fractional.NoConstraint FracA}} →
Fractional (F A)
Fractional.Constraint defaultApplicativeFractional _ _ = ⊤′
Fractional._/_ defaultApplicativeFractional x y = (λ x y → x / y) <$> x <*> y
-- Congruence for _<*>_ and friends
module _ {a b} {A B : Set a} {F : Set a → Set b} {{_ : Applicative F}} where
infixl 4 _=*=_
_=*=_ : {f g : F (A → B)} {x y : F A} → f ≡ g → x ≡ y → (f <*> x) ≡ (g <*> y)
refl =*= refl = refl
_=*_ : {a₁ a₂ : F A} {b₁ b₂ : F B} → a₁ ≡ a₂ → b₁ ≡ b₂ → (a₁ <* b₁) ≡ (a₂ <* b₂)
refl =* refl = refl
_*=_ : {a₁ a₂ : F A} {b₁ b₂ : F B} → a₁ ≡ a₂ → b₁ ≡ b₂ → (a₁ *> b₁) ≡ (a₂ *> b₂)
refl *= refl = refl
module _ {F : ∀ {a} → Set a → Set a}
{{_ : ∀ {a b} → Applicative′ {a} {b} F}}
{{_ : ∀ {a} → Applicative {a} F}}
{a b} {A : Set a} {B : Set b} where
infixl 4 _=*=′_
_=*=′_ : {f g : F (A → B)} {x y : F A} → f ≡ g → x ≡ y → (f <*>′ x) ≡ (g <*>′ y)
refl =*=′ refl = refl
_=*′_ : {a₁ a₂ : F A} {b₁ b₂ : F B} → a₁ ≡ a₂ → b₁ ≡ b₂ → (a₁ <*′ b₁) ≡ (a₂ <*′ b₂)
refl =*′ refl = refl
_*=′_ : {a₁ a₂ : F A} {b₁ b₂ : F B} → a₁ ≡ a₂ → b₁ ≡ b₂ → (a₁ *>′ b₁) ≡ (a₂ *>′ b₂)
refl *=′ refl = refl
| 39.895349
| 111
| 0.547071
|
31c6a4af94679326887fcff9e5658eee607981bc
| 754
|
agda
|
Agda
|
agda/hott/core/universe.agda
|
piyush-kurur/hott
|
876ecdcfddca1abf499e8f00db321c6dc3d5b2bc
|
[
"BSD-3-Clause"
] | null | null | null |
agda/hott/core/universe.agda
|
piyush-kurur/hott
|
876ecdcfddca1abf499e8f00db321c6dc3d5b2bc
|
[
"BSD-3-Clause"
] | null | null | null |
agda/hott/core/universe.agda
|
piyush-kurur/hott
|
876ecdcfddca1abf499e8f00db321c6dc3d5b2bc
|
[
"BSD-3-Clause"
] | null | null | null |
{-# OPTIONS --without-K #-}
-- The universe of all types
module hott.core.universe where
open import Agda.Primitive public using (Level; lzero; lsuc; _⊔_)
-- We give an new name for Set
Type : (ℓ : Level) → Set (lsuc ℓ)
Type ℓ = Set ℓ
lone : Level; lone = lsuc lzero
ltwo : Level; ltwo = lsuc lone
lthree : Level; lthree = lsuc ltwo
lfour : Level; lfour = lsuc lthree
lfive : Level; lfive = lsuc lfour
lsix : Level; lsix = lsuc lfive
lseven : Level; lseven = lsuc lsix
leight : Level; leight = lsuc lseven
lnine : Level; lnine = lsuc leight
Type₀ = Type lzero
Type₁ = Type lone
Type₂ = Type ltwo
Type₃ = Type lthree
Type₄ = Type lfour
Type₅ = Type lfive
Type₆ = Type lsix
Type₇ = Type lseven
Type₈ = Type leight
Type₉ = Type lnine
| 23.5625
| 65
| 0.685676
|
cd19968c3bbaea8505a2ed77d482f5390ad1bfd3
| 2,052
|
agda
|
Agda
|
Lecture2.agda
|
glangmead/hott_cmu80818
|
af64d808630f4f1498a75201b6ca4d74d662516b
|
[
"Unlicense"
] | 4
|
2018-05-03T20:32:19.000Z
|
2018-09-04T02:52:25.000Z
|
Lecture2.agda
|
glangmead/hott_cmu80818
|
af64d808630f4f1498a75201b6ca4d74d662516b
|
[
"Unlicense"
] | 3
|
2018-02-22T21:01:16.000Z
|
2018-03-25T14:44:31.000Z
|
Lecture2.agda
|
glangmead/hott_cmu80818
|
af64d808630f4f1498a75201b6ca4d74d662516b
|
[
"Unlicense"
] | 2
|
2018-02-22T19:58:46.000Z
|
2018-06-25T15:05:21.000Z
|
{-# OPTIONS --without-K #-}
module Lecture2 where
import Basics
open Basics public
-- Definition 2.2.3 define the identity function, and show lambda-abstraction in so doing
id : {i : Level} {A : UU i} → A → A
id = λ a → a -- can also use plain backslash \ instead of lambda (as it resembles lambda?)
-- Definition 2.2.4
comp : {i j k : Level} {A : UU i} {B : UU j} {C : UU k} → (B → C) → ((A → B) → (A → C))
comp = λ g f a → g(f(a)) -- the lambda extends to cover g, f and a
_∘_ : {i j k : Level} {A : UU i} {B : UU j} {C : UU k} → (B → C) → ((A → B) → (A → C))
g ∘ f = comp g f
data ℕ : U where
Nzero : ℕ
Nsucc : ℕ → ℕ
add : ℕ → ℕ → ℕ
add Nzero = id
add (Nsucc n) = Nsucc ∘ (add n)
-- try some examples, hit C-c C-n (or whatever "compute normal form" is bound to)
-- and try entering "add (Nsucc Nzero) (Nsucc (Nsucc Nzero))"
-- you should get "Nsucc (Nsucc (Nsucc Nzero))"
_+_ : ℕ → ℕ → ℕ
n + m = add n m
-- Exercise 2.3
const : {i j : Level} (A : UU i) (B : UU j) (b : B) → A → B
const A B b x = b
-- Exercise 2.4
Pi-swap : {i j k : Level} {A : UU i} {B : UU j} {C : A → (B → UU k)} →
((x : A) (y : B) → C x y) → ((y : B) (x : A) → C x y)
Pi-swap f y x = f x y
-- Exercise 2.5(a)
_**_ : ℕ → (ℕ → ℕ)
Nzero ** n = Nzero
(Nsucc m) ** n = (m ** n) + n
-- Exercise 2.5(b)
_^_ : ℕ → (ℕ → ℕ)
m ^ Nzero = Nsucc Nzero
m ^ (Nsucc n) = m ** (m ^ n)
-- Exercise 2.5(c)
factorial : ℕ → ℕ
factorial Nzero = Nsucc Nzero
factorial (Nsucc m) = (Nsucc m) ** (factorial m)
-- Exercise 2.6(a)
Nmax : ℕ → (ℕ → ℕ)
Nmax Nzero n = n
Nmax (Nsucc m) Nzero = Nsucc m
Nmax (Nsucc m) (Nsucc n) = Nsucc (Nmax m n)
-- Exercise 2.6(b)
Nmin : ℕ → (ℕ → ℕ)
Nmin Nzero n = Nzero
Nmin (Nsucc m) Nzero = Nzero
Nmin (Nsucc m) (Nsucc n) = Nsucc (Nmin m n)
-- Exercise 2.7
-- induction: for any dependent type P over ℕ, define a section of P
-- built out of a term in P 0 and a section of P n → P(Nsucc n)
ind-N : {i : Level} {P : ℕ → UU i} → P Nzero → ((n : ℕ) → P n → P(Nsucc n)) → ((n : ℕ) → P n)
ind-N p0 pS Nzero = p0
ind-N p0 pS (Nsucc n) = pS n (ind-N p0 pS n)
| 27.36
| 93
| 0.55117
|
342e26ece44e074c961cc0fa467b4e010798d648
| 376
|
agda
|
Agda
|
test/fail/Issue619.agda
|
larrytheliquid/agda
|
477c8c37f948e6038b773409358fd8f38395f827
|
[
"MIT"
] | null | null | null |
test/fail/Issue619.agda
|
larrytheliquid/agda
|
477c8c37f948e6038b773409358fd8f38395f827
|
[
"MIT"
] | null | null | null |
test/fail/Issue619.agda
|
larrytheliquid/agda
|
477c8c37f948e6038b773409358fd8f38395f827
|
[
"MIT"
] | 1
|
2022-03-12T11:35:18.000Z
|
2022-03-12T11:35:18.000Z
|
import Common.Reflect
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
data Bool : Set where
true false : Bool
data True : Set where
true : True
-- Should print names as "quote Bool.true" (making sure to disambiguate)
-- and "quote false" rather than "Issue619.Bool.true/false" in error message.
not-true : quote Bool.true ≡ quote Bool.false
not-true = refl
| 22.117647
| 77
| 0.683511
|
23c9c39b1cd5c8db96f094433826bba9b88879fc
| 9,784
|
agda
|
Agda
|
agda-aplas14/Substitution.agda
|
ryanakca/strong-normalization
|
79d97481f3312c2d30a823c3b1bcb8ae871c2fe2
|
[
"Unlicense"
] | 32
|
2017-05-22T14:33:27.000Z
|
2021-03-05T12:12:03.000Z
|
agda-aplas14/Substitution.agda
|
ryanakca/strong-normalization
|
79d97481f3312c2d30a823c3b1bcb8ae871c2fe2
|
[
"Unlicense"
] | 2
|
2018-02-14T16:42:36.000Z
|
2018-02-20T14:54:18.000Z
|
agda-aplas14/Substitution.agda
|
ryanakca/strong-normalization
|
79d97481f3312c2d30a823c3b1bcb8ae871c2fe2
|
[
"Unlicense"
] | 4
|
2017-11-10T16:44:52.000Z
|
2018-02-23T18:22:17.000Z
|
module Substitution where
open import Library
open import Terms
-- VarTm n specifies whether the substitution produces variables or terms.
-- The index is used to impose an order on the constructors
-- and so pass termination checking in lift/subst.
data VarTm : ℕ → Set where
`Var : VarTm 0
`Tm : VarTm 1
max01 : ℕ → ℕ → ℕ
max01 0 m = m
max01 n m = n
_∙VT_ : ∀ {m n} → VarTm m → VarTm n → VarTm (max01 m n)
`Var ∙VT vt = vt
`Tm ∙VT vt = `Tm
VT : ∀ {m} → VarTm m → Cxt → Ty → Set
VT `Var Γ a = Var Γ a
VT `Tm Γ a = Tm Γ a
vt2tm : ∀ {Γ a m} vt → VT {m} vt Γ a → Tm Γ a
vt2tm `Var x = var x
vt2tm `Tm t = t
RenSub : ∀ {m} → VarTm m → Cxt → Cxt → Set
RenSub vt Γ Δ = ∀ {a} → Var Γ a → VT vt Δ a
mutual
-- Lifiting a substitution
lifts : ∀ {m vt Γ Δ a} → RenSub {m} vt Γ Δ → RenSub vt (a ∷ Γ) (a ∷ Δ)
lifts {vt = `Var} σ (zero) = zero
lifts {vt = `Var} σ (suc x) = suc (σ x)
lifts {vt = `Tm} σ (zero) = var (zero)
lifts {vt = `Tm} σ (suc x) = subst {vt = `Var} suc (σ x)
-- Performing a substitution
subst : ∀ {m vt Γ Δ τ} → RenSub {m} vt Γ Δ → Tm Γ τ → Tm Δ τ
subst σ (abs t) = abs (subst (lifts σ) t)
subst σ (app t u) = app (subst σ t) (subst σ u)
subst σ (var x) = vt2tm _ (σ x)
-- Performing substitution, inductive specification
data IndSubst {m vt Γ Δ} (σ : RenSub {m} vt Γ Δ) : ∀ {τ} → Tm Γ τ → Tm Δ τ → Set where
var : ∀{a t} (x : Var Γ a)
→ vt2tm _ (σ x) ≡ t
→ IndSubst σ (var x) t
abs : ∀{a b} {t : Tm (a ∷ Γ) b} {t'}
→ IndSubst (lifts σ) t t'
→ IndSubst σ (abs t) (abs t')
app : ∀{a b} {t : Tm Γ (a →̂ b)} {u t' u'}
→ IndSubst σ t t'
→ IndSubst σ u u'
→ IndSubst σ (app t u) (app t' u')
-- Performing renaming, inductive specification
data IndRen {Γ Δ} (σ : RenSub `Var Γ Δ) : ∀ {τ} → Tm Γ τ → Tm Δ τ → Set where
var : ∀{a y} (x : Var Γ a)
→ (σ x) ≡ y
→ IndRen σ (var x) (var y)
abs : ∀{a b} {t : Tm (a ∷ Γ) b} {t'}
→ IndRen (lifts σ) t t'
→ IndRen σ (abs t) (abs t')
app : ∀{a b} {t : Tm Γ (a →̂ b)} {u t' u'}
→ IndRen σ t t'
→ IndRen σ u u'
→ IndRen σ (app t u) (app t' u')
-- Logical equivalence between inductive and algorithmic substitution
IndS→prop : ∀ {m vt Γ Δ} (σ : RenSub {m} vt Γ Δ) {τ} {t : Tm Γ τ} {t' : Tm Δ τ} → IndSubst σ t t' → subst σ t ≡ t'
IndS→prop σ (var x ≡.refl) = ≡.refl
IndS→prop σ (abs t) = ≡.cong abs (IndS→prop (lifts σ) t)
IndS→prop σ (app t t₁) = ≡.cong₂ app (IndS→prop σ t) (IndS→prop σ t₁)
prop→IndS' : ∀ {m vt Γ Δ} (σ : RenSub {m} vt Γ Δ) {τ} (t : Tm Γ τ) → IndSubst σ t (subst σ t)
prop→IndS' σ (var x) = var x ≡.refl
prop→IndS' σ (abs t) = abs (prop→IndS' (lifts σ) t)
prop→IndS' σ (app t u) = app (prop→IndS' σ t) (prop→IndS' σ u)
prop→IndS : ∀ {m vt Γ Δ} (σ : RenSub {m} vt Γ Δ) {τ} {t : Tm Γ τ} {t' : Tm Δ τ} → subst σ t ≡ t' → IndSubst σ t t'
prop→IndS _ ≡.refl = prop→IndS' _ _
-- Logical equivalence between inductive and algorithmic renaming
Ind→prop : ∀ {Γ Δ} (σ : RenSub `Var Γ Δ) {τ} {t : Tm Γ τ} {t' : Tm Δ τ} → IndRen σ t t' → subst σ t ≡ t'
Ind→prop σ (var x ≡.refl) = ≡.refl
Ind→prop σ (abs t) = ≡.cong abs (Ind→prop (lifts σ) t)
Ind→prop σ (app t t₁) = ≡.cong₂ app (Ind→prop σ t) (Ind→prop σ t₁)
prop→Ind' : ∀ {Γ Δ} (σ : RenSub `Var Γ Δ) {τ} (t : Tm Γ τ) → IndRen σ t (subst σ t)
prop→Ind' σ (var x) = var x ≡.refl
prop→Ind' σ (abs t) = abs (prop→Ind' (lifts σ) t)
prop→Ind' σ (app t u) = app (prop→Ind' σ t) (prop→Ind' σ u)
prop→Ind : ∀ {Γ Δ} (σ : RenSub `Var Γ Δ) {τ} {t : Tm Γ τ} {t' : Tm Δ τ} → subst σ t ≡ t' → IndRen σ t t'
prop→Ind _ ≡.refl = prop→Ind' _ _
-- Identity substitution
ids : ∀ {i vt Γ} → RenSub {i} vt Γ Γ
ids {vt = `Var} x = x
ids {vt = `Tm } x = var x
-- substitution composition
_•s_ : ∀ {Γ₀ Γ₁ Γ₂}
{n}{vt2 : VarTm n}(τ : RenSub vt2 Γ₁ Γ₂)
{m}{vt1 : VarTm m}(σ : RenSub vt1 Γ₀ Γ₁) → RenSub (vt1 ∙VT vt2) Γ₀ Γ₂
_•s_ τ {vt1 = `Var} σ x = τ (σ x)
_•s_ τ {vt1 = `Tm } σ x = subst τ (σ x)
-- Term substitution
Subst : Cxt → Cxt → Set
Subst Γ Δ = ∀ {a : Ty} → Var Γ a → Tm Δ a
-- Extending a substitution
_∷s_ : ∀ {Γ Δ a} → Tm Γ a → Subst Δ Γ → Subst (a ∷ Δ) Γ
(t ∷s σ) (zero) = t
(t ∷s σ) (suc x) = σ x
-- Substitution for 0th variable
sgs : ∀ {Γ a} → Tm Γ a → Subst (a ∷ Γ) Γ
sgs t = t ∷s ids
-- Substituting for the 0th variable [u/0]t
subst0 : ∀ {Γ a b} → Tm Γ a → Tm (a ∷ Γ) b → Tm Γ b
subst0 u = subst (sgs u)
-- Renamings
Ren : (Γ Δ : Cxt) → Set
Ren = RenSub `Var
_≤_ : (Γ Δ : Cxt) → Set
_≤_ Γ Δ = RenSub `Var Δ Γ
rename : ∀ {Γ Δ : Cxt} {a : Ty} (η : Γ ≤ Δ) (x : Tm Δ a) → Tm Γ a
rename = subst
-- Weakening renaming
weak : ∀{Γ a} → (a ∷ Γ) ≤ Γ
weak = suc
-- Weakening substitution
weaks : ∀{n}{vt : VarTm n}{a Γ Δ} (σ : RenSub vt Γ Δ) → RenSub vt (Γ) (a ∷ Δ)
weaks {vt = `Var} σ x = suc (σ x)
weaks {vt = `Tm} σ x = rename suc (σ x)
-- Properties
_≡s_ : ∀ {Γ Δ} {m n vt1 vt2} → (f : RenSub {m} vt1 Γ Δ)(g : RenSub {n} vt2 Γ Δ) → Set
f ≡s g = (∀ {a} x → vt2tm _ (f {a} x) ≡ vt2tm _ (g x))
mutual
subst-ext : ∀ {Γ Δ} {m n vt1 vt2} {f : RenSub {m} vt1 Γ Δ}{g : RenSub {n} vt2 Γ Δ} → f ≡s g → ∀ {a} (t : Tm Γ a) → subst f t ≡ subst g t
subst-ext f≐g (var v) = (f≐g v)
subst-ext {f = f} {g = g} f≐g (abs t) = ≡.cong abs (subst-ext (lifts-ext {f = f} {g = g} f≐g) t)
subst-ext f≐g (app t t₁) = ≡.cong₂ app (subst-ext f≐g t) (subst-ext f≐g t₁)
lifts-ext : ∀ {Γ Δ b} {m n vt1 vt2} {f : RenSub {m} vt1 Γ Δ}{g : RenSub {n} vt2 Γ Δ} → f ≡s g → lifts {a = b} f ≡s lifts g
lifts-ext {vt1 = `Var} {`Var} f≐g (zero) = ≡.refl
lifts-ext {vt1 = `Var} {`Var} {f} {g} f≐g (suc x) with f x | g x | f≐g x
lifts-ext {Γ} {Δ} {b} {._} {._} {`Var} {`Var} f≐g (suc x) | z | .z | ≡.refl = ≡.refl
lifts-ext {vt1 = `Var} {`Tm} f≐g (zero) = ≡.refl
lifts-ext {vt1 = `Var} {`Tm} f≐g (suc x) rewrite ≡.sym (f≐g x) = ≡.refl
lifts-ext {vt1 = `Tm} {`Var} f≐g (zero) = ≡.refl
lifts-ext {vt1 = `Tm} {`Var} f≐g (suc x) rewrite (f≐g x) = ≡.refl
lifts-ext {vt1 = `Tm} {`Tm} f≐g (zero) = ≡.refl
lifts-ext {vt1 = `Tm} {`Tm} f≐g (suc x) = ≡.cong (subst suc) (f≐g x)
mutual
subst-∙ : ∀ {Γ₀ Γ₁ Γ₂}
{n}{vt2 : VarTm n}(τ : RenSub vt2 Γ₁ Γ₂)
{m}{vt1 : VarTm m}(σ : RenSub vt1 Γ₀ Γ₁) → ∀ {a} (t : Tm Γ₀ a) → subst (τ •s σ) t ≡ subst τ (subst σ t)
subst-∙ τ {vt1 = `Var} σ (var x) = ≡.refl
subst-∙ τ {vt1 = `Tm} σ (var x) = ≡.refl
subst-∙ τ σ (abs t) = ≡.cong abs (≡.trans (subst-ext (lifts-∙ τ σ) t) (subst-∙ (lifts τ) (lifts σ) t))
subst-∙ τ σ (app t t₁) = ≡.cong₂ app (subst-∙ τ σ t) (subst-∙ τ σ t₁)
lifts-∙ : ∀ {Γ₀ Γ₁ Γ₂}
{n}{vt2 : VarTm n}(τ : RenSub vt2 Γ₁ Γ₂)
{m}{vt1 : VarTm m}(σ : RenSub vt1 Γ₀ Γ₁) → ∀ {a} → lifts {a = a} (τ •s σ) ≡s (lifts τ •s lifts σ)
lifts-∙ {vt2 = `Var} τ {vt1 = `Var} σ (zero) = ≡.refl
lifts-∙ {vt2 = `Tm} τ {vt1 = `Var} σ (zero) = ≡.refl
lifts-∙ {vt2 = `Var} τ {vt1 = `Var} σ (suc x) = ≡.refl
lifts-∙ {vt2 = `Tm} τ {vt1 = `Var} σ (suc x) = ≡.refl
lifts-∙ {vt2 = `Var} τ {vt1 = `Tm} σ (zero) = ≡.refl
lifts-∙ {vt2 = `Tm} τ {vt1 = `Tm} σ (zero) = ≡.refl
lifts-∙ {vt2 = `Var} τ {vt1 = `Tm} σ (suc x) = ≡.trans (≡.sym (subst-∙ suc τ (σ x))) (subst-∙ (lifts τ) suc (σ x))
lifts-∙ {vt2 = `Tm} τ {vt1 = `Tm} σ (suc x) = ≡.trans (≡.sym (subst-∙ suc τ (σ x))) (subst-∙ (lifts τ) suc (σ x))
mutual
subst-id : ∀ {m vt Γ a} → (t : Tm Γ a) → subst (ids {m} {vt}) t ≡ t
subst-id {vt = `Var} (var v) = ≡.refl
subst-id {vt = `Tm} (var v) = ≡.refl
subst-id {m} {vt} {Γ} (abs t) = ≡.cong abs (≡.trans (subst-ext {n = m} {vt2 = vt} (lifts-id {m} {vt}) t) (subst-id t))
subst-id (app t t₁) = ≡.cong₂ app (subst-id t) (subst-id t₁)
lifts-id : ∀ {m vt Γ b} → lifts {a = b} (ids {m} {vt} {Γ = Γ}) ≡s ids {m} {vt} {Γ = b ∷ Γ}
lifts-id {vt = `Var} (zero) = ≡.refl
lifts-id {vt = `Var} (suc x) = ≡.refl
lifts-id {vt = `Tm} (zero) = ≡.refl
lifts-id {vt = `Tm} (suc x) = ≡.refl
sgs-lifts : ∀ {m vt Γ Δ a} {σ : RenSub {m} vt Γ Δ} {u : Tm Γ a} → (sgs (subst σ u) •s lifts σ) ≡s (σ •s sgs u)
sgs-lifts {vt = `Var} = (λ { (zero) → ≡.refl ; (suc x) → ≡.refl })
sgs-lifts {vt = `Tm} {σ = σ} {u} = (λ { (zero) → ≡.refl ; (suc x) → ≡.sym (≡.trans (≡.sym (subst-id (σ x)))
(subst-∙ (sgs (subst σ u)) {vt1 = `Var} suc (σ x))) })
sgs-lifts-term : ∀ {m vt Γ Δ a b} {σ : RenSub {m} vt Γ Δ} {u : Tm Γ a}{t : Tm (a ∷ Γ) b}
→ subst (sgs (subst σ u)) (subst (lifts σ) t) ≡ subst σ (subst (sgs u) t)
sgs-lifts-term {σ = σ} {u} {t} = (≡.trans (≡.sym (subst-∙ (sgs (subst σ u)) (lifts σ) t))
(≡.trans (subst-ext sgs-lifts t)
(subst-∙ σ (sgs u) t)))
renId : ∀ {Γ a}{t : Tm Γ a} → rename id t ≡ t
renId = subst-id _
contract : ∀ {a Γ} → RenSub `Var (a ∷ a ∷ Γ) (a ∷ Γ)
contract (zero) = zero
contract (suc x) = x
contract-sgs : ∀ {a Γ} → contract {a} {Γ} ≡s sgs (var zero)
contract-sgs (zero) = ≡.refl
contract-sgs (suc x) = ≡.refl
sgs-weak₀ : ∀ {Γ a} {u : Tm Γ a} {b} (x : Var Γ b) → sgs u (suc x) ≡ var x
sgs-weak₀ x = ≡.refl
sgs-weak₁ : ∀ {Γ a} {u : Tm Γ a} → (sgs u ∘ suc) ≡s (ids {vt = `Tm})
sgs-weak₁ x = ≡.refl
sgs-weak : ∀ {Γ a} {u : Tm Γ a} → (sgs u •s weak) ≡s (ids {vt = `Tm})
sgs-weak x = ≡.refl
cons-to-sgs : ∀ {Γ Δ a} (u : Tm Δ a) (σ : Subst Γ Δ)
→ (u ∷s σ) ≡s (sgs u •s lifts σ)
cons-to-sgs u σ (zero) = ≡.refl
cons-to-sgs u σ (suc x) = begin
σ x ≡⟨ ≡.sym (subst-id (σ x)) ⟩
subst (ids {vt = `Tm}) (σ x) ≡⟨ subst-ext (λ _ → ≡.refl) (σ x) ⟩
subst (sgs u •s weak) (σ x) ≡⟨ subst-∙ (sgs u) weak (σ x) ⟩
subst (sgs u) (subst suc (σ x))
∎
where open ≡-Reasoning
-- -}
| 35.970588
| 138
| 0.500409
|
41f00278ef825c96a4b919b93261746c897a8baf
| 189
|
agda
|
Agda
|
test/interaction/Issue1325a.agda
|
redfish64/autonomic-agda
|
c0ae7d20728b15d7da4efff6ffadae6fe4590016
|
[
"BSD-3-Clause"
] | null | null | null |
test/interaction/Issue1325a.agda
|
redfish64/autonomic-agda
|
c0ae7d20728b15d7da4efff6ffadae6fe4590016
|
[
"BSD-3-Clause"
] | null | null | null |
test/interaction/Issue1325a.agda
|
redfish64/autonomic-agda
|
c0ae7d20728b15d7da4efff6ffadae6fe4590016
|
[
"BSD-3-Clause"
] | null | null | null |
-- Andreas, 2014-10-23
-- We want to split on hidden variables.
data ℕ : Set where
zero : ℕ
suc : ℕ → ℕ
f : {n : ℕ} → Set₁
f = Set
where
g : {n : ℕ} → Set → Set
g _ = {!.n!}
| 13.5
| 40
| 0.507937
|
8db230f92e551b05af4d5e5171b5fdbc0196fceb
| 10,382
|
agda
|
Agda
|
Cubical/Algebra/Algebra/Base.agda
|
howsiyu/cubical
|
1b9c97a2140fe96fe636f4c66beedfd7b8096e8f
|
[
"MIT"
] | null | null | null |
Cubical/Algebra/Algebra/Base.agda
|
howsiyu/cubical
|
1b9c97a2140fe96fe636f4c66beedfd7b8096e8f
|
[
"MIT"
] | null | null | null |
Cubical/Algebra/Algebra/Base.agda
|
howsiyu/cubical
|
1b9c97a2140fe96fe636f4c66beedfd7b8096e8f
|
[
"MIT"
] | null | null | null |
{-# OPTIONS --safe #-}
module Cubical.Algebra.Algebra.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Equiv.HalfAdjoint
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Function
open import Cubical.Foundations.SIP
open import Cubical.Data.Sigma
open import Cubical.Displayed.Base
open import Cubical.Displayed.Auto
open import Cubical.Displayed.Record
open import Cubical.Displayed.Universe
open import Cubical.Reflection.RecordEquiv
open import Cubical.Algebra.Module
open import Cubical.Algebra.Ring
open import Cubical.Algebra.AbGroup
open import Cubical.Algebra.Group
open import Cubical.Algebra.Monoid
open Iso
private
variable
ℓ ℓ' ℓ'' ℓ''' : Level
record IsAlgebra (R : Ring ℓ) {A : Type ℓ'}
(0a 1a : A) (_+_ _·_ : A → A → A) (-_ : A → A)
(_⋆_ : ⟨ R ⟩ → A → A) : Type (ℓ-max ℓ ℓ') where
constructor isalgebra
open RingStr (snd R) using (1r) renaming (_+_ to _+r_; _·_ to _·r_)
field
isLeftModule : IsLeftModule R 0a _+_ -_ _⋆_
·-isMonoid : IsMonoid 1a _·_
dist : (x y z : A) → (x · (y + z) ≡ (x · y) + (x · z))
× ((x + y) · z ≡ (x · z) + (y · z))
⋆-lassoc : (r : ⟨ R ⟩) (x y : A) → (r ⋆ x) · y ≡ r ⋆ (x · y)
⋆-rassoc : (r : ⟨ R ⟩) (x y : A) → r ⋆ (x · y) ≡ x · (r ⋆ y)
open IsLeftModule isLeftModule public
isRing : IsRing _ _ _ _ _
isRing = isring (IsLeftModule.+-isAbGroup isLeftModule) ·-isMonoid dist
open IsRing isRing public hiding (_-_; +Assoc; +Lid; +Linv; +Rid; +Rinv; +Comm)
unquoteDecl IsAlgebraIsoΣ = declareRecordIsoΣ IsAlgebraIsoΣ (quote IsAlgebra)
record AlgebraStr (R : Ring ℓ) (A : Type ℓ') : Type (ℓ-max ℓ ℓ') where
constructor algebrastr
field
0a : A
1a : A
_+_ : A → A → A
_·_ : A → A → A
-_ : A → A
_⋆_ : ⟨ R ⟩ → A → A
isAlgebra : IsAlgebra R 0a 1a _+_ _·_ -_ _⋆_
open IsAlgebra isAlgebra public
Algebra : (R : Ring ℓ) → ∀ ℓ' → Type (ℓ-max ℓ (ℓ-suc ℓ'))
Algebra R ℓ' = Σ[ A ∈ Type ℓ' ] AlgebraStr R A
module commonExtractors {R : Ring ℓ} where
Algebra→Module : (A : Algebra R ℓ') → LeftModule R ℓ'
Algebra→Module (_ , algebrastr A _ _ _ _ _ (isalgebra isLeftModule _ _ _ _)) =
_ , leftmodulestr A _ _ _ isLeftModule
Algebra→Ring : (A : Algebra R ℓ') → Ring ℓ'
Algebra→Ring (_ , str) = _ , ringstr _ _ _ _ _ (IsAlgebra.isRing (AlgebraStr.isAlgebra str))
Algebra→AbGroup : (A : Algebra R ℓ') → AbGroup ℓ'
Algebra→AbGroup A = LeftModule→AbGroup (Algebra→Module A)
Algebra→Group : (A : Algebra R ℓ') → Group ℓ'
Algebra→Group A = Ring→Group (Algebra→Ring A)
Algebra→AddMonoid : (A : Algebra R ℓ') → Monoid ℓ'
Algebra→AddMonoid A = Group→Monoid (Algebra→Group A)
Algebra→MultMonoid : (A : Algebra R ℓ') → Monoid ℓ'
Algebra→MultMonoid A = Ring→MultMonoid (Algebra→Ring A)
isSetAlgebra : (A : Algebra R ℓ') → isSet ⟨ A ⟩
isSetAlgebra A = isSetAbGroup (Algebra→AbGroup A)
open RingStr (snd R) using (1r; ·Ldist+) renaming (_+_ to _+r_; _·_ to _·s_)
makeIsAlgebra : {A : Type ℓ'} {0a 1a : A}
{_+_ _·_ : A → A → A} { -_ : A → A} {_⋆_ : ⟨ R ⟩ → A → A}
(isSet-A : isSet A)
(+-assoc : (x y z : A) → x + (y + z) ≡ (x + y) + z)
(+-rid : (x : A) → x + 0a ≡ x)
(+-rinv : (x : A) → x + (- x) ≡ 0a)
(+-comm : (x y : A) → x + y ≡ y + x)
(·-assoc : (x y z : A) → x · (y · z) ≡ (x · y) · z)
(·-rid : (x : A) → x · 1a ≡ x)
(·-lid : (x : A) → 1a · x ≡ x)
(·-rdist-+ : (x y z : A) → x · (y + z) ≡ (x · y) + (x · z))
(·-ldist-+ : (x y z : A) → (x + y) · z ≡ (x · z) + (y · z))
(⋆-assoc : (r s : ⟨ R ⟩) (x : A) → (r ·s s) ⋆ x ≡ r ⋆ (s ⋆ x))
(⋆-ldist : (r s : ⟨ R ⟩) (x : A) → (r +r s) ⋆ x ≡ (r ⋆ x) + (s ⋆ x))
(⋆-rdist : (r : ⟨ R ⟩) (x y : A) → r ⋆ (x + y) ≡ (r ⋆ x) + (r ⋆ y))
(⋆-lid : (x : A) → 1r ⋆ x ≡ x)
(⋆-lassoc : (r : ⟨ R ⟩) (x y : A) → (r ⋆ x) · y ≡ r ⋆ (x · y))
(⋆-rassoc : (r : ⟨ R ⟩) (x y : A) → r ⋆ (x · y) ≡ x · (r ⋆ y))
→ IsAlgebra R 0a 1a _+_ _·_ -_ _⋆_
makeIsAlgebra isSet-A
+-assoc +-rid +-rinv +-comm
·-assoc ·-rid ·-lid ·-rdist-+ ·-ldist-+
⋆-assoc ⋆-ldist ⋆-rdist ⋆-lid ⋆-lassoc ⋆-rassoc =
isalgebra
(makeIsLeftModule isSet-A
+-assoc +-rid +-rinv +-comm
⋆-assoc ⋆-ldist ⋆-rdist ⋆-lid)
(makeIsMonoid isSet-A ·-assoc ·-rid ·-lid)
(λ x y z → ·-rdist-+ x y z , ·-ldist-+ x y z)
⋆-lassoc ⋆-rassoc
open commonExtractors public
record IsAlgebraHom {R : Ring ℓ} {A : Type ℓ'} {B : Type ℓ''}
(M : AlgebraStr R A) (f : A → B) (N : AlgebraStr R B)
: Type (ℓ-max ℓ (ℓ-max ℓ' ℓ''))
where
-- Shorter qualified names
private
module M = AlgebraStr M
module N = AlgebraStr N
field
pres0 : f M.0a ≡ N.0a
pres1 : f M.1a ≡ N.1a
pres+ : (x y : A) → f (x M.+ y) ≡ f x N.+ f y
pres· : (x y : A) → f (x M.· y) ≡ f x N.· f y
pres- : (x : A) → f (M.- x) ≡ N.- (f x)
pres⋆ : (r : ⟨ R ⟩) (y : A) → f (r M.⋆ y) ≡ r N.⋆ f y
unquoteDecl IsAlgebraHomIsoΣ = declareRecordIsoΣ IsAlgebraHomIsoΣ (quote IsAlgebraHom)
open IsAlgebraHom
AlgebraHom : {R : Ring ℓ} (M : Algebra R ℓ') (N : Algebra R ℓ'') → Type (ℓ-max ℓ (ℓ-max ℓ' ℓ''))
AlgebraHom M N = Σ[ f ∈ (⟨ M ⟩ → ⟨ N ⟩) ] IsAlgebraHom (M .snd) f (N .snd)
IsAlgebraEquiv : {R : Ring ℓ} {A : Type ℓ'} {B : Type ℓ''}
(M : AlgebraStr R A) (e : A ≃ B) (N : AlgebraStr R B)
→ Type (ℓ-max (ℓ-max ℓ ℓ') ℓ'')
IsAlgebraEquiv M e N = IsAlgebraHom M (e .fst) N
AlgebraEquiv : {R : Ring ℓ} (M : Algebra R ℓ') (N : Algebra R ℓ'') → Type (ℓ-max (ℓ-max ℓ ℓ') ℓ'')
AlgebraEquiv M N = Σ[ e ∈ ⟨ M ⟩ ≃ ⟨ N ⟩ ] IsAlgebraEquiv (M .snd) e (N .snd)
_$a_ : {R : Ring ℓ} {A : Algebra R ℓ'} {B : Algebra R ℓ''} → AlgebraHom A B → ⟨ A ⟩ → ⟨ B ⟩
f $a x = fst f x
AlgebraEquiv→AlgebraHom : {R : Ring ℓ} {A : Algebra R ℓ'} {B : Algebra R ℓ''}
→ AlgebraEquiv A B → AlgebraHom A B
AlgebraEquiv→AlgebraHom (e , eIsHom) = e .fst , eIsHom
isPropIsAlgebra : (R : Ring ℓ) {A : Type ℓ'}
(0a 1a : A)
(_+_ _·_ : A → A → A)
(-_ : A → A)
(_⋆_ : ⟨ R ⟩ → A → A)
→ isProp (IsAlgebra R 0a 1a _+_ _·_ -_ _⋆_)
isPropIsAlgebra R _ _ _ _ _ _ = let open IsLeftModule in
isOfHLevelRetractFromIso 1 IsAlgebraIsoΣ
(isPropΣ
(isPropIsLeftModule _ _ _ _ _)
(λ mo → isProp×3 (isPropIsMonoid _ _)
(isPropΠ3 λ _ _ _ → isProp× (mo .is-set _ _) (mo .is-set _ _))
(isPropΠ3 λ _ _ _ → mo .is-set _ _)
(isPropΠ3 λ _ _ _ → mo .is-set _ _) ))
isPropIsAlgebraHom : (R : Ring ℓ) {A : Type ℓ'} {B : Type ℓ''}
(AS : AlgebraStr R A) (f : A → B) (BS : AlgebraStr R B)
→ isProp (IsAlgebraHom AS f BS)
isPropIsAlgebraHom R AS f BS = isOfHLevelRetractFromIso 1 IsAlgebraHomIsoΣ
(isProp×5 (isSetAlgebra (_ , BS) _ _)
(isSetAlgebra (_ , BS) _ _)
(isPropΠ2 λ _ _ → isSetAlgebra (_ , BS) _ _)
(isPropΠ2 λ _ _ → isSetAlgebra (_ , BS) _ _)
(isPropΠ λ _ → isSetAlgebra (_ , BS) _ _)
(isPropΠ2 λ _ _ → isSetAlgebra (_ , BS) _ _))
isSetAlgebraHom : {R : Ring ℓ} (M : Algebra R ℓ') (N : Algebra R ℓ'')
→ isSet (AlgebraHom M N)
isSetAlgebraHom _ N = isSetΣ (isSetΠ (λ _ → isSetAlgebra N))
λ _ → isProp→isSet (isPropIsAlgebraHom _ _ _ _)
isSetAlgebraEquiv : {R : Ring ℓ} (M N : Algebra R ℓ')
→ isSet (AlgebraEquiv M N)
isSetAlgebraEquiv M N = isSetΣ (isOfHLevel≃ 2 (isSetAlgebra M) (isSetAlgebra N))
λ _ → isProp→isSet (isPropIsAlgebraHom _ _ _ _)
AlgebraHom≡ : {R : Ring ℓ} {A B : Algebra R ℓ'} {φ ψ : AlgebraHom A B} → fst φ ≡ fst ψ → φ ≡ ψ
AlgebraHom≡ = Σ≡Prop λ f → isPropIsAlgebraHom _ _ f _
𝒮ᴰ-Algebra : (R : Ring ℓ) → DUARel (𝒮-Univ ℓ') (AlgebraStr R) (ℓ-max ℓ ℓ')
𝒮ᴰ-Algebra R =
𝒮ᴰ-Record (𝒮-Univ _) (IsAlgebraEquiv {R = R})
(fields:
data[ 0a ∣ nul ∣ pres0 ]
data[ 1a ∣ nul ∣ pres1 ]
data[ _+_ ∣ bin ∣ pres+ ]
data[ _·_ ∣ bin ∣ pres· ]
data[ -_ ∣ autoDUARel _ _ ∣ pres- ]
data[ _⋆_ ∣ autoDUARel _ _ ∣ pres⋆ ]
prop[ isAlgebra ∣ (λ _ _ → isPropIsAlgebra _ _ _ _ _ _ _) ])
where
open AlgebraStr
-- faster with some sharing
nul = autoDUARel (𝒮-Univ _) (λ A → A)
bin = autoDUARel (𝒮-Univ _) (λ A → A → A → A)
AlgebraPath : {R : Ring ℓ} (A B : Algebra R ℓ') → (AlgebraEquiv A B) ≃ (A ≡ B)
AlgebraPath {R = R} = ∫ (𝒮ᴰ-Algebra R) .UARel.ua
uaAlgebra : {R : Ring ℓ} {A B : Algebra R ℓ'} → AlgebraEquiv A B → A ≡ B
uaAlgebra {A = A} {B = B} = equivFun (AlgebraPath A B)
isGroupoidAlgebra : {R : Ring ℓ} → isGroupoid (Algebra R ℓ')
isGroupoidAlgebra _ _ = isOfHLevelRespectEquiv 2 (AlgebraPath _ _) (isSetAlgebraEquiv _ _)
-- Smart constructor for ring homomorphisms
-- that infers the other equations from pres1, pres+, and pres·
module _ {R : Ring ℓ} {A : Algebra R ℓ'} {B : Algebra R ℓ''} {f : ⟨ A ⟩ → ⟨ B ⟩} where
private
module A = AlgebraStr (A .snd)
module B = AlgebraStr (B .snd)
module _
(p1 : f A.1a ≡ B.1a)
(p+ : (x y : ⟨ A ⟩) → f (x A.+ y) ≡ f x B.+ f y)
(p· : (x y : ⟨ A ⟩) → f (x A.· y) ≡ f x B.· f y)
(p⋆ : (r : ⟨ R ⟩) (x : ⟨ A ⟩) → f (r A.⋆ x) ≡ r B.⋆ f x)
where
open IsAlgebraHom
private
isGHom : IsGroupHom (Algebra→Group A .snd) f (Algebra→Group B .snd)
isGHom = makeIsGroupHom p+
makeIsAlgebraHom : IsAlgebraHom (A .snd) f (B .snd)
makeIsAlgebraHom .pres0 = isGHom .IsGroupHom.pres1
makeIsAlgebraHom .pres1 = p1
makeIsAlgebraHom .pres+ = p+
makeIsAlgebraHom .pres· = p·
makeIsAlgebraHom .pres- = isGHom .IsGroupHom.presinv
makeIsAlgebraHom .pres⋆ = p⋆
| 38.451852
| 98
| 0.518494
|
9b6acfe46608be5a5055fe9351a3c0f497f50839
| 5,859
|
agda
|
Agda
|
deBruijn/Substitution/Data/Map.agda
|
nad/dependently-typed-syntax
|
498f8aefc570f7815fd1d6616508eeb92c52abce
|
[
"MIT"
] | 5
|
2020-04-16T12:14:44.000Z
|
2020-07-08T22:51:36.000Z
|
deBruijn/Substitution/Data/Map.agda
|
nad/dependently-typed-syntax
|
498f8aefc570f7815fd1d6616508eeb92c52abce
|
[
"MIT"
] | null | null | null |
deBruijn/Substitution/Data/Map.agda
|
nad/dependently-typed-syntax
|
498f8aefc570f7815fd1d6616508eeb92c52abce
|
[
"MIT"
] | null | null | null |
------------------------------------------------------------------------
-- A map function for the substitutions
------------------------------------------------------------------------
open import Data.Universe.Indexed
module deBruijn.Substitution.Data.Map
{i u e} {Uni : IndexedUniverse i u e} where
import deBruijn.Context; open deBruijn.Context Uni
open import deBruijn.Substitution.Data.Basics
open import Function using (_$_)
import Relation.Binary.PropositionalEquality as P
open P.≡-Reasoning
private
module Dummy
{t₁} {T₁ : Term-like t₁}
{t₂} {T₂ : Term-like t₂}
where
open Term-like T₁ using ()
renaming (_⊢_ to _⊢₁_; _≅-⊢_ to _≅-⊢₁_; [_] to [_]₁)
open Term-like T₂ using () renaming (_≅-⊢_ to _≅-⊢₂_; [_] to [_]₂)
-- Map.
map : ∀ {Γ Δ Ε} {ρ̂₁ : Γ ⇨̂ Δ} {ρ̂₂ : Δ ⇨̂ Ε} →
[ T₁ ⟶ T₂ ] ρ̂₂ → Sub T₁ ρ̂₁ → Sub T₂ (ρ̂₁ ∘̂ ρ̂₂)
map f ε = ε
map {ρ̂₂ = ρ̂₂} f (ρ₁ ▻ t) =
P.subst (λ v → Sub T₂ (⟦ ρ₁ ⟧⇨ ∘̂ ρ̂₂ ▻̂ v))
(≅-Value-⇒-≡ $ P.sym $ corresponds f t)
(map f ρ₁ ▻ f · t)
abstract
-- An unfolding lemma.
map-▻ :
∀ {Γ Δ Ε} {ρ̂₁ : Γ ⇨̂ Δ} {ρ̂₂ : Δ ⇨̂ Ε} {σ}
(f : [ T₁ ⟶ T₂ ] ρ̂₂) (ρ : Sub T₁ ρ̂₁) t →
map f (ρ ▻⇨[ σ ] t) ≅-⇨ map f ρ ▻⇨[ σ ] f · t
map-▻ {ρ̂₂ = ρ̂₂} f ρ t =
drop-subst-Sub (λ v → ⟦ ρ ⟧⇨ ∘̂ ρ̂₂ ▻̂ v)
(≅-Value-⇒-≡ $ P.sym $ corresponds f t)
-- A congruence lemma.
map-cong : ∀ {Γ₁ Δ₁ Ε₁} {ρ̂₁₁ : Γ₁ ⇨̂ Δ₁} {ρ̂₂₁ : Δ₁ ⇨̂ Ε₁}
{f₁ : [ T₁ ⟶ T₂ ] ρ̂₂₁} {ρ₁ : Sub T₁ ρ̂₁₁}
{Γ₂ Δ₂ Ε₂} {ρ̂₁₂ : Γ₂ ⇨̂ Δ₂} {ρ̂₂₂ : Δ₂ ⇨̂ Ε₂}
{f₂ : [ T₁ ⟶ T₂ ] ρ̂₂₂} {ρ₂ : Sub T₁ ρ̂₁₂} →
f₁ ≅-⟶ f₂ → ρ₁ ≅-⇨ ρ₂ → map f₁ ρ₁ ≅-⇨ map f₂ ρ₂
map-cong {f₁ = _ , _} {f₂ = ._ , _} {ρ₂ = ε} [ P.refl ] P.refl =
P.refl
map-cong {f₁ = f₁} {f₂ = f₂} {ρ₂ = ρ ▻ t} f₁≅f₂ P.refl = begin
[ map f₁ (ρ ▻ t) ] ≡⟨ map-▻ f₁ ρ t ⟩
[ map f₁ ρ ▻ f₁ · t ] ≡⟨ ▻⇨-cong P.refl
(map-cong f₁≅f₂ (P.refl {x = [ ρ ]}))
(·-cong f₁≅f₂ (P.refl {x = [ t ]₁})) ⟩
[ map f₂ ρ ▻ f₂ · t ] ≡⟨ P.sym $ map-▻ f₂ ρ t ⟩
[ map f₂ (ρ ▻ t) ] ∎
-- Variants which only require that the functions are
-- extensionally equal.
map-cong-ext₁ : ∀ {Γ₁ Δ Ε₁} {ρ̂₁₁ : Γ₁ ⇨̂ Δ} {ρ̂₂₁ : Δ ⇨̂ Ε₁}
{f₁ : [ T₁ ⟶ T₂ ] ρ̂₂₁} {ρ₁ : Sub T₁ ρ̂₁₁}
{Γ₂ Ε₂} {ρ̂₁₂ : Γ₂ ⇨̂ Δ} {ρ̂₂₂ : Δ ⇨̂ Ε₂}
{f₂ : [ T₁ ⟶ T₂ ] ρ̂₂₂} {ρ₂ : Sub T₁ ρ̂₁₂} →
Ε₁ ≅-Ctxt Ε₂ →
(∀ {σ} (t : Δ ⊢₁ σ) → f₁ · t ≅-⊢₂ f₂ · t) →
ρ₁ ≅-⇨ ρ₂ → map f₁ ρ₁ ≅-⇨ map f₂ ρ₂
map-cong-ext₁ {Δ = Δ} {f₁ = f₁} {f₂ = f₂} {ρ₂ = ρ}
Ε₁≅Ε₂ f₁≅f₂ P.refl = helper ρ
where
helper : ∀ {Γ} {ρ̂ : Γ ⇨̂ Δ} (ρ : Sub T₁ ρ̂) → map f₁ ρ ≅-⇨ map f₂ ρ
helper ε = ε⇨-cong Ε₁≅Ε₂
helper (ρ ▻ t) = begin
[ map f₁ (ρ ▻ t) ] ≡⟨ map-▻ f₁ ρ t ⟩
[ map f₁ ρ ▻ f₁ · t ] ≡⟨ ▻⇨-cong P.refl (helper ρ) (f₁≅f₂ t) ⟩
[ map f₂ ρ ▻ f₂ · t ] ≡⟨ P.sym $ map-▻ f₂ ρ t ⟩
[ map f₂ (ρ ▻ t) ] ∎
map-cong-ext₂ : ∀ {Γ₁ Δ₁ Ε₁} {ρ̂₁₁ : Γ₁ ⇨̂ Δ₁} {ρ̂₂₁ : Δ₁ ⇨̂ Ε₁}
{f₁ : [ T₁ ⟶ T₂ ] ρ̂₂₁} {ρ₁ : Sub T₁ ρ̂₁₁}
{Γ₂ Δ₂ Ε₂} {ρ̂₁₂ : Γ₂ ⇨̂ Δ₂} {ρ̂₂₂ : Δ₂ ⇨̂ Ε₂}
{f₂ : [ T₁ ⟶ T₂ ] ρ̂₂₂} {ρ₂ : Sub T₁ ρ̂₁₂} →
Δ₁ ≅-Ctxt Δ₂ → Ε₁ ≅-Ctxt Ε₂ →
(∀ {σ₁ σ₂} {t₁ : Δ₁ ⊢₁ σ₁} {t₂ : Δ₂ ⊢₁ σ₂} →
t₁ ≅-⊢₁ t₂ → f₁ · t₁ ≅-⊢₂ f₂ · t₂) →
ρ₁ ≅-⇨ ρ₂ → map f₁ ρ₁ ≅-⇨ map f₂ ρ₂
map-cong-ext₂ P.refl Ε₁≅Ε₂ f₁≅f₂ ρ₁≅ρ₂ =
map-cong-ext₁ Ε₁≅Ε₂ (λ t → f₁≅f₂ (P.refl {x = [ t ]₁})) ρ₁≅ρ₂
private
-- A helper lemma.
/∋-map-▻ :
∀ {Γ Δ Ε σ τ} {ρ̂₁ : Γ ⇨̂ Δ} {ρ̂₂ : Δ ⇨̂ Ε} {t} →
(x : Γ ▻ σ ∋ τ) (f : [ T₁ ⟶ T₂ ] ρ̂₂) (ρ : Sub T₁ ρ̂₁) →
x /∋ map f (ρ ▻ t) ≅-⊢₂ x /∋ (map f ρ ▻ f · t)
/∋-map-▻ {t = t} x f ρ =
/∋-cong (P.refl {x = [ x ]}) (map-▻ f ρ t)
-- Some sort of naturality statement for _/∋_.
/∋-map : ∀ {Γ Δ Ε σ} {ρ̂₁ : Γ ⇨̂ Δ} {ρ̂₂ : Δ ⇨̂ Ε} →
(x : Γ ∋ σ) (f : [ T₁ ⟶ T₂ ] ρ̂₂) (ρ : Sub T₁ ρ̂₁) →
x /∋ map f ρ ≅-⊢₂ f · (x /∋ ρ)
/∋-map (zero {σ = σ}) f (ρ ▻ t) = begin
[ zero[ σ ] /∋ map f (ρ ▻ t) ]₂ ≡⟨ /∋-map-▻ zero[ σ ] f ρ ⟩
[ zero[ σ ] /∋ (map f ρ ▻ f · t) ]₂ ≡⟨ P.refl ⟩
[ f · t ]₂ ∎
/∋-map (suc {σ = σ} x) f (ρ ▻ t) = begin
[ suc x /∋ map f (ρ ▻ t) ]₂ ≡⟨ /∋-map-▻ (suc x) f ρ ⟩
[ suc[ σ ] x /∋ (map f ρ ▻ f · t) ]₂ ≡⟨ P.refl ⟩
[ x /∋ map f ρ ]₂ ≡⟨ /∋-map x f ρ ⟩
[ f · (x /∋ ρ) ]₂ ∎
open Dummy public
abstract
-- Map is functorial.
map-[id] : ∀ {t} {T : Term-like t} {Γ Δ} {ρ̂ : Γ ⇨̂ Δ}
(ρ : Sub T ρ̂) → map ([id] {T = T}) ρ ≅-⇨ ρ
map-[id] ε = P.refl
map-[id] (ρ ▻ t) = ▻⇨-cong P.refl (map-[id] ρ) P.refl
map-[∘] :
∀ {t₁} {T₁ : Term-like t₁}
{t₂} {T₂ : Term-like t₂}
{t₃} {T₃ : Term-like t₃}
{Γ Δ Ε Ζ} {ρ̂₁ : Γ ⇨̂ Δ} {ρ̂₂ : Δ ⇨̂ Ε} {ρ̂₃ : Ε ⇨̂ Ζ}
(f₂ : [ T₂ ⟶ T₃ ] ρ̂₃) (f₁ : [ T₁ ⟶ T₂ ] ρ̂₂)
(ρ : Sub T₁ ρ̂₁) →
map (f₂ [∘] f₁) ρ ≅-⇨ map f₂ (map f₁ ρ)
map-[∘] f₂ f₁ ε = P.refl
map-[∘] f₂ f₁ (ρ ▻ t) = begin
[ map (f₂ [∘] f₁) (ρ ▻ t) ] ≡⟨ map-▻ (f₂ [∘] f₁) ρ t ⟩
[ map (f₂ [∘] f₁) ρ ▻ f₂ · (f₁ · t) ] ≡⟨ ▻⇨-cong P.refl (map-[∘] f₂ f₁ ρ) P.refl ⟩
[ map f₂ (map f₁ ρ) ▻ f₂ · (f₁ · t) ] ≡⟨ P.sym $ map-▻ f₂ (map f₁ ρ) (f₁ · t) ⟩
[ map f₂ (map f₁ ρ ▻ f₁ · t) ] ≡⟨ map-cong (f₂ ∎-⟶) (P.sym $ map-▻ f₁ ρ t) ⟩
[ map f₂ (map f₁ (ρ ▻ t)) ] ∎
| 39.06
| 88
| 0.373101
|
56544ef5e4f87f87cc0014bf940970668ae5c16a
| 1,123
|
agda
|
Agda
|
agda/Test.agda
|
halfaya/Alae
|
5b22f5cb073dc2508ad158959a096df7763c57c4
|
[
"MIT"
] | null | null | null |
agda/Test.agda
|
halfaya/Alae
|
5b22f5cb073dc2508ad158959a096df7763c57c4
|
[
"MIT"
] | null | null | null |
agda/Test.agda
|
halfaya/Alae
|
5b22f5cb073dc2508ad158959a096df7763c57c4
|
[
"MIT"
] | null | null | null |
{-# OPTIONS --cubical --safe #-}
module Test where
open import Cubical.Core.Everything using (_≡_; Level; Type; Σ; _,_; fst; snd; _≃_; ~_)
open import Cubical.Foundations.Prelude using (refl; sym; _∙_; cong; transport; subst; funExt; transp; I; i0; i1)
open import Cubical.Foundations.Function using (_∘_)
open import Cubical.Foundations.Univalence using (ua)
open import Cubical.Foundations.Isomorphism using (iso; Iso; isoToPath; section; retract)
open import Data.Bool.Base using (Bool; true; false; _∧_)
open import Data.Nat.Base using (ℕ; zero; suc)
open import Data.Product using (_×_; proj₁; proj₂)
natrec : (P : ℕ → Type) → P 0 → ((n : ℕ) → P n → P (suc n)) → (n : ℕ) → P n
natrec P z s zero = z
natrec P z s (suc n) = s n (natrec P z s n)
_+_ : ℕ → ℕ → ℕ
_+_ = λ m → λ n → natrec (λ _ → ℕ) n (λ _ → suc) m
0=0 : 0 ≡ 0
0=0 = refl
suc=suc : (m n : ℕ) → m ≡ n → suc m ≡ suc n
suc=suc m n e = cong suc e
0+n=n : (n : ℕ) → 0 + n ≡ n
0+n=n = natrec (λ k → 0 + k ≡ k) 0=0 (λ n e → suc=suc n n e)
n=0+n : (n : ℕ) → n + 0 ≡ n
n=0+n = natrec (λ k → k + 0 ≡ k) 0=0 λ n e → suc=suc (n + 0) n e
| 33.029412
| 117
| 0.590383
|
e0b1f8f26908170399b51590794299821ab9028d
| 950
|
agda
|
Agda
|
src/fot/GroupTheory/README.agda
|
asr/fotc
|
2fc9f2b81052a2e0822669f02036c5750371b72d
|
[
"MIT"
] | 11
|
2015-09-03T20:53:42.000Z
|
2021-09-12T16:09:54.000Z
|
src/fot/GroupTheory/README.agda
|
asr/fotc
|
2fc9f2b81052a2e0822669f02036c5750371b72d
|
[
"MIT"
] | 2
|
2016-10-12T17:28:16.000Z
|
2017-01-01T14:34:26.000Z
|
src/fot/GroupTheory/README.agda
|
asr/fotc
|
2fc9f2b81052a2e0822669f02036c5750371b72d
|
[
"MIT"
] | 3
|
2016-09-19T14:18:30.000Z
|
2018-03-14T08:50:00.000Z
|
------------------------------------------------------------------------------
-- Group theory
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
module GroupTheory.README where
------------------------------------------------------------------------------
-- Description
-- Theory of groups using Agda postulates for the group axioms.
------------------------------------------------------------------------------
-- The axioms
open import GroupTheory.Base
-- Basic properties
open import GroupTheory.PropertiesATP
open import GroupTheory.PropertiesI
-- Commutator properties
open import GroupTheory.Commutator.PropertiesATP
open import GroupTheory.Commutator.PropertiesI
-- Abelian groups
open import GroupTheory.AbelianGroup.PropertiesATP
| 30.645161
| 78
| 0.484211
|
d37d6c298e2af82b1ab43693528283047a7fb85e
| 3,661
|
agda
|
Agda
|
test/asset/agda-stdlib-1.0/Data/Vec/Relation/Unary/All.agda
|
omega12345/agda-mode
|
0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71
|
[
"MIT"
] | null | null | null |
test/asset/agda-stdlib-1.0/Data/Vec/Relation/Unary/All.agda
|
omega12345/agda-mode
|
0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71
|
[
"MIT"
] | null | null | null |
test/asset/agda-stdlib-1.0/Data/Vec/Relation/Unary/All.agda
|
omega12345/agda-mode
|
0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71
|
[
"MIT"
] | null | null | null |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Vectors where all elements satisfy a given property
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Vec.Relation.Unary.All where
open import Data.Nat using (zero; suc)
open import Data.Fin using (Fin; zero; suc)
open import Data.Product as Prod using (_,_)
open import Data.Vec as Vec using (Vec; []; _∷_)
open import Function using (_∘_)
open import Level using (_⊔_)
open import Relation.Nullary
import Relation.Nullary.Decidable as Dec
open import Relation.Unary
open import Relation.Binary.PropositionalEquality as P using (subst)
------------------------------------------------------------------------
-- All P xs means that all elements in xs satisfy P.
infixr 5 _∷_
data All {a p} {A : Set a}
(P : A → Set p) : ∀ {k} → Vec A k → Set (p ⊔ a) where
[] : All P []
_∷_ : ∀ {k x} {xs : Vec A k} (px : P x) (pxs : All P xs) → All P (x ∷ xs)
------------------------------------------------------------------------
-- Operations on All
head : ∀ {a p} {A : Set a} {P : A → Set p} {k x} {xs : Vec A k} →
All P (x ∷ xs) → P x
head (px ∷ pxs) = px
tail : ∀ {a p} {A : Set a} {P : A → Set p} {k x} {xs : Vec A k} →
All P (x ∷ xs) → All P xs
tail (px ∷ pxs) = pxs
lookup : ∀ {a p} {A : Set a} {P : A → Set p} {k} {xs : Vec A k} →
(i : Fin k) → All P xs → P (Vec.lookup xs i)
lookup () []
lookup zero (px ∷ pxs) = px
lookup (suc i) (px ∷ pxs) = lookup i pxs
tabulate : ∀ {a p} {A : Set a} {P : A → Set p} {k xs} →
(∀ i → P (Vec.lookup xs i)) → All P {k} xs
tabulate {xs = []} pxs = []
tabulate {xs = _ ∷ _} pxs = pxs zero ∷ tabulate (pxs ∘ suc)
map : ∀ {a p q} {A : Set a} {P : A → Set p} {Q : A → Set q} {k} →
P ⊆ Q → All P {k} ⊆ All Q {k}
map g [] = []
map g (px ∷ pxs) = g px ∷ map g pxs
zipWith : ∀ {a b c p q r} {A : Set a} {B : Set b} {C : Set c} {_⊕_ : A → B → C}
{P : A → Set p} {Q : B → Set q} {R : C → Set r} →
(∀ {x y} → P x → Q y → R (x ⊕ y)) →
∀ {k xs ys} → All P {k} xs → All Q {k} ys →
All R {k} (Vec.zipWith _⊕_ xs ys)
zipWith _⊕_ {xs = []} {[]} [] [] = []
zipWith _⊕_ {xs = x ∷ xs} {y ∷ ys} (px ∷ pxs) (qy ∷ qys) =
px ⊕ qy ∷ zipWith _⊕_ pxs qys
zip : ∀ {a p q k} {A : Set a} {P : A → Set p} {Q : A → Set q} →
All P ∩ All Q ⊆ All (P ∩ Q) {k}
zip ([] , []) = []
zip (px ∷ pxs , qx ∷ qxs) = (px , qx) ∷ zip (pxs , qxs)
unzip : ∀ {a p q k} {A : Set a} {P : A → Set p} {Q : A → Set q} →
All (P ∩ Q) {k} ⊆ All P ∩ All Q
unzip [] = [] , []
unzip (pqx ∷ pqxs) = Prod.zip _∷_ _∷_ pqx (unzip pqxs)
------------------------------------------------------------------------
-- Properties of predicates preserved by All
module _ {a p} {A : Set a} {P : A → Set p} where
all : ∀ {k} → Decidable P → Decidable (All P {k})
all P? [] = yes []
all P? (x ∷ xs) with P? x
... | yes px = Dec.map′ (px ∷_) tail (all P? xs)
... | no ¬px = no (¬px ∘ head)
universal : Universal P → ∀ {k} → Universal (All P {k})
universal u [] = []
universal u (x ∷ xs) = u x ∷ universal u xs
irrelevant : Irrelevant P → ∀ {k} → Irrelevant (All P {k})
irrelevant irr [] [] = P.refl
irrelevant irr (px₁ ∷ pxs₁) (px₂ ∷ pxs₂) =
P.cong₂ _∷_ (irr px₁ px₂) (irrelevant irr pxs₁ pxs₂)
satisfiable : Satisfiable P → ∀ {k} → Satisfiable (All P {k})
satisfiable (x , p) {zero} = [] , []
satisfiable (x , p) {suc k} = Prod.map (x ∷_) (p ∷_) (satisfiable (x , p))
| 36.247525
| 79
| 0.451789
|
e2f38aae9eeb310f1039fb69fcc0f9e88a582625
| 1,147
|
agda
|
Agda
|
LICENSE.agda
|
boystrange/FairSubtypingAgda
|
c4b78e70c3caf68d509f4360b9171d9f80ecb825
|
[
"MIT"
] | 4
|
2021-07-29T14:32:30.000Z
|
2022-01-24T14:38:47.000Z
|
LICENSE.agda
|
boystrange/FairSubtypingAgda
|
c4b78e70c3caf68d509f4360b9171d9f80ecb825
|
[
"MIT"
] | null | null | null |
LICENSE.agda
|
boystrange/FairSubtypingAgda
|
c4b78e70c3caf68d509f4360b9171d9f80ecb825
|
[
"MIT"
] | null | null | null |
-- MIT License
-- Copyright (c) 2021 Luca Ciccone and Luca Padovani
-- 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.
| 45.88
| 68
| 0.763731
|
c228bd1f7b68348496c193ebdd54c79dd98e88ae
| 1,386
|
agda
|
Agda
|
test/asset/agda-stdlib-1.0/Relation/Binary/Construct/FromRel.agda
|
omega12345/agda-mode
|
0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71
|
[
"MIT"
] | 5
|
2020-10-07T12:07:53.000Z
|
2020-10-10T21:41:32.000Z
|
test/asset/agda-stdlib-1.0/Relation/Binary/Construct/FromRel.agda
|
omega12345/agda-mode
|
0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71
|
[
"MIT"
] | null | null | null |
test/asset/agda-stdlib-1.0/Relation/Binary/Construct/FromRel.agda
|
omega12345/agda-mode
|
0debb886eb5dbcd38dbeebd04b34cf9d9c5e0e71
|
[
"MIT"
] | 1
|
2021-11-04T06:54:45.000Z
|
2021-11-04T06:54:45.000Z
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Every respectful binary relation induces a preorder. No claim is
-- made that this preorder is unique.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary
open Setoid using (Carrier)
module Relation.Binary.Construct.FromRel
{s₁ s₂} (S : Setoid s₁ s₂) -- The underlying equality
{a r} {A : Set a} (_R_ : REL A (Carrier S) r) -- The relation
where
open import Data.Product
open import Function
open import Level using (_⊔_)
open module Eq = Setoid S using (_≈_) renaming (Carrier to B)
------------------------------------------------------------------------
-- Definition
Resp : Rel B (a ⊔ r)
Resp x y = ∀ {a} → a R x → a R y
------------------------------------------------------------------------
-- Properties
reflexive : (∀ {a} → (a R_) Respects _≈_) → _≈_ ⇒ Resp
reflexive resp x≈y = resp x≈y
trans : Transitive Resp
trans x∼y y∼z = y∼z ∘ x∼y
isPreorder : (∀ {a} → (a R_) Respects _≈_) → IsPreorder _≈_ Resp
isPreorder resp = record
{ isEquivalence = Eq.isEquivalence
; reflexive = reflexive resp
; trans = trans
}
preorder : (∀ {a} → (a R_) Respects _≈_) → Preorder _ _ _
preorder resp = record
{ isPreorder = isPreorder resp
}
| 27.72
| 74
| 0.508658
|
c2661ad449e415a672cce6f696b1df6ec6fefa5b
| 7,636
|
agda
|
Agda
|
Cubical/Foundations/Pointed/Homogeneous.agda
|
thomas-lamiaux/cubical
|
58c0b83bb0fed0dc683f3d29b1709effe51c1689
|
[
"MIT"
] | 1
|
2021-10-31T17:32:49.000Z
|
2021-10-31T17:32:49.000Z
|
Cubical/Foundations/Pointed/Homogeneous.agda
|
thomas-lamiaux/cubical
|
58c0b83bb0fed0dc683f3d29b1709effe51c1689
|
[
"MIT"
] | null | null | null |
Cubical/Foundations/Pointed/Homogeneous.agda
|
thomas-lamiaux/cubical
|
58c0b83bb0fed0dc683f3d29b1709effe51c1689
|
[
"MIT"
] | null | null | null |
{-
Definition of a homogeneous pointed type, and proofs that pi, product, path, and discrete types are homogeneous
Portions of this file adapted from Nicolai Kraus' code here:
https://bitbucket.org/nicolaikraus/agda/src/e30d70c72c6af8e62b72eefabcc57623dd921f04/trunc-inverse.lagda
-}
{-# OPTIONS --safe #-}
module Cubical.Foundations.Pointed.Homogeneous where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Univalence
open import Cubical.Foundations.Path
open import Cubical.Data.Sigma
open import Cubical.Data.Empty as ⊥
open import Cubical.Relation.Nullary
open import Cubical.Foundations.GroupoidLaws
open import Cubical.Foundations.Pointed.Base
open import Cubical.Foundations.Pointed.Properties
open import Cubical.Structures.Pointed
isHomogeneous : ∀ {ℓ} → Pointed ℓ → Type (ℓ-suc ℓ)
isHomogeneous {ℓ} (A , x) = ∀ y → Path (Pointed ℓ) (A , x) (A , y)
-- Pointed functions into a homogeneous type are equal as soon as they are equal
-- as unpointed functions
→∙Homogeneous≡ : ∀ {ℓ ℓ'} {A∙ : Pointed ℓ} {B∙ : Pointed ℓ'} {f∙ g∙ : A∙ →∙ B∙}
(h : isHomogeneous B∙) → f∙ .fst ≡ g∙ .fst → f∙ ≡ g∙
→∙Homogeneous≡ {A∙ = A∙@(_ , a₀)} {B∙@(B , _)} {f∙@(_ , f₀)} {g∙@(_ , g₀)} h p =
subst (λ Q∙ → PathP (λ i → A∙ →∙ Q∙ i) f∙ g∙) (sym (flipSquare fix)) badPath
where
badPath : PathP (λ i → A∙ →∙ (B , (sym f₀ ∙∙ funExt⁻ p a₀ ∙∙ g₀) i)) f∙ g∙
badPath i .fst = p i
badPath i .snd j = doubleCompPath-filler (sym f₀) (funExt⁻ p a₀) g₀ j i
fix : PathP (λ i → B∙ ≡ (B , (sym f₀ ∙∙ funExt⁻ p a₀ ∙∙ g₀) i)) refl refl
fix i =
hcomp
(λ j → λ
{ (i = i0) → lCancel (h (pt B∙)) j
; (i = i1) → lCancel (h (pt B∙)) j
})
(sym (h (pt B∙)) ∙ h ((sym f₀ ∙∙ funExt⁻ p a₀ ∙∙ g₀) i))
→∙Homogeneous≡Path : ∀ {ℓ ℓ'} {A∙ : Pointed ℓ} {B∙ : Pointed ℓ'} {f∙ g∙ : A∙ →∙ B∙}
(h : isHomogeneous B∙) → (p q : f∙ ≡ g∙) → cong fst p ≡ cong fst q → p ≡ q
→∙Homogeneous≡Path {A∙ = A∙@(A , a₀)} {B∙@(B , b)} {f∙@(f , f₀)} {g∙@(g , g₀)} h p q r =
transport (λ k
→ PathP (λ i
→ PathP (λ j → (A , a₀) →∙ newPath-refl p q r i j (~ k))
(f , f₀) (g , g₀)) p q)
(badPath p q r)
where
newPath : (p q : f∙ ≡ g∙) (r : cong fst p ≡ cong fst q)
→ Square (refl {x = b}) refl refl refl
newPath p q r i j =
hcomp (λ k → λ {(i = i0) → cong snd p j k
; (i = i1) → cong snd q j k
; (j = i0) → f₀ k
; (j = i1) → g₀ k})
(r i j a₀)
newPath-refl : (p q : f∙ ≡ g∙) (r : cong fst p ≡ cong fst q)
→ PathP (λ i → (PathP (λ j → B∙ ≡ (B , newPath p q r i j))) refl refl) refl refl
newPath-refl p q r i j k =
hcomp (λ w → λ { (i = i0) → lCancel (h b) w k
; (i = i1) → lCancel (h b) w k
; (j = i0) → lCancel (h b) w k
; (j = i1) → lCancel (h b) w k
; (k = i0) → lCancel (h b) w k
; (k = i1) → B , newPath p q r i j})
((sym (h b) ∙ h (newPath p q r i j)) k)
badPath : (p q : f∙ ≡ g∙) (r : cong fst p ≡ cong fst q)
→ PathP (λ i →
PathP (λ j → A∙ →∙ (B , newPath p q r i j))
(f , f₀) (g , g₀))
p q
fst (badPath p q r i j) = r i j
snd (badPath p q s i j) k =
hcomp (λ r → λ { (i = i0) → snd (p j) (r ∧ k)
; (i = i1) → snd (q j) (r ∧ k)
; (j = i0) → f₀ (k ∧ r)
; (j = i1) → g₀ (k ∧ r)
; (k = i0) → s i j a₀})
(s i j a₀)
isHomogeneousPi : ∀ {ℓ ℓ'} {A : Type ℓ} {B∙ : A → Pointed ℓ'}
→ (∀ a → isHomogeneous (B∙ a)) → isHomogeneous (Πᵘ∙ A B∙)
isHomogeneousPi h f i .fst = ∀ a → typ (h a (f a) i)
isHomogeneousPi h f i .snd a = pt (h a (f a) i)
isHomogeneousΠ∙ : ∀ {ℓ ℓ'} (A : Pointed ℓ) (B : typ A → Type ℓ')
→ (b₀ : B (pt A))
→ ((a : typ A) (x : B a) → isHomogeneous (B a , x))
→ (f : Π∙ A B b₀)
→ isHomogeneous (Π∙ A B b₀ , f)
fst (isHomogeneousΠ∙ A B b₀ h f g i) =
Σ[ r ∈ ((a : typ A) → fst ((h a (fst f a) (fst g a)) i)) ]
r (pt A) ≡ hcomp (λ k → λ {(i = i0) → snd f k
; (i = i1) → snd g k})
(snd (h (pt A) (fst f (pt A)) (fst g (pt A)) i))
snd (isHomogeneousΠ∙ A B b₀ h f g i) =
(λ a → snd (h a (fst f a) (fst g a) i))
, λ j → hcomp (λ k → λ { (i = i0) → snd f (k ∧ j)
; (i = i1) → snd g (k ∧ j)
; (j = i0) → snd (h (pt A) (fst f (pt A))
(fst g (pt A)) i)})
(snd (h (pt A) (fst f (pt A)) (fst g (pt A)) i))
isHomogeneous→∙ : ∀ {ℓ ℓ'} {A∙ : Pointed ℓ} {B∙ : Pointed ℓ'}
→ isHomogeneous B∙ → isHomogeneous (A∙ →∙ B∙ ∙)
isHomogeneous→∙ {A∙ = A∙} {B∙} h f∙ =
ΣPathP
( (λ i → Π∙ A∙ (λ a → T a i) (t₀ i))
, PathPIsoPath _ _ _ .Iso.inv
(→∙Homogeneous≡ h
(PathPIsoPath (λ i → (a : typ A∙) → T a i) (λ _ → pt B∙) _ .Iso.fun
(λ i a → pt (h (f∙ .fst a) i))))
)
where
T : ∀ a → typ B∙ ≡ typ B∙
T a i = typ (h (f∙ .fst a) i)
t₀ : PathP (λ i → T (pt A∙) i) (pt B∙) (pt B∙)
t₀ = cong pt (h (f∙ .fst (pt A∙))) ▷ f∙ .snd
isHomogeneousProd : ∀ {ℓ ℓ'} {A∙ : Pointed ℓ} {B∙ : Pointed ℓ'}
→ isHomogeneous A∙ → isHomogeneous B∙ → isHomogeneous (A∙ ×∙ B∙)
isHomogeneousProd hA hB (a , b) i .fst = typ (hA a i) × typ (hB b i)
isHomogeneousProd hA hB (a , b) i .snd .fst = pt (hA a i)
isHomogeneousProd hA hB (a , b) i .snd .snd = pt (hB b i)
isHomogeneousPath : ∀ {ℓ} (A : Type ℓ) {x y : A} (p : x ≡ y) → isHomogeneous ((x ≡ y) , p)
isHomogeneousPath A {x} {y} p q
= pointed-sip ((x ≡ y) , p) ((x ≡ y) , q) (eqv , compPathr-cancel p q)
where eqv : (x ≡ y) ≃ (x ≡ y)
eqv = compPathlEquiv (q ∙ sym p)
module HomogeneousDiscrete {ℓ} {A∙ : Pointed ℓ} (dA : Discrete (typ A∙)) (y : typ A∙) where
-- switches pt A∙ with y
switch : typ A∙ → typ A∙
switch x with dA x (pt A∙)
... | yes _ = y
... | no _ with dA x y
... | yes _ = pt A∙
... | no _ = x
switch-ptA∙ : switch (pt A∙) ≡ y
switch-ptA∙ with dA (pt A∙) (pt A∙)
... | yes _ = refl
... | no ¬p = ⊥.rec (¬p refl)
switch-idp : ∀ x → switch (switch x) ≡ x
switch-idp x with dA x (pt A∙)
switch-idp x | yes p with dA y (pt A∙)
switch-idp x | yes p | yes q = q ∙ sym p
switch-idp x | yes p | no _ with dA y y
switch-idp x | yes p | no _ | yes _ = sym p
switch-idp x | yes p | no _ | no ¬p = ⊥.rec (¬p refl)
switch-idp x | no ¬p with dA x y
switch-idp x | no ¬p | yes p with dA y (pt A∙)
switch-idp x | no ¬p | yes p | yes q = ⊥.rec (¬p (p ∙ q))
switch-idp x | no ¬p | yes p | no _ with dA (pt A∙) (pt A∙)
switch-idp x | no ¬p | yes p | no _ | yes _ = sym p
switch-idp x | no ¬p | yes p | no _ | no ¬q = ⊥.rec (¬q refl)
switch-idp x | no ¬p | no ¬q with dA x (pt A∙)
switch-idp x | no ¬p | no ¬q | yes p = ⊥.rec (¬p p)
switch-idp x | no ¬p | no ¬q | no _ with dA x y
switch-idp x | no ¬p | no ¬q | no _ | yes q = ⊥.rec (¬q q)
switch-idp x | no ¬p | no ¬q | no _ | no _ = refl
switch-eqv : typ A∙ ≃ typ A∙
switch-eqv = isoToEquiv (iso switch switch switch-idp switch-idp)
isHomogeneousDiscrete : ∀ {ℓ} {A∙ : Pointed ℓ} (dA : Discrete (typ A∙)) → isHomogeneous A∙
isHomogeneousDiscrete {ℓ} {A∙} dA y
= pointed-sip (typ A∙ , pt A∙) (typ A∙ , y) (switch-eqv , switch-ptA∙)
where open HomogeneousDiscrete {ℓ} {A∙} dA y
| 41.275676
| 111
| 0.490309
|
8cd05c271dcf1bbb6fa5a45e079b6c06f8babc66
| 715
|
agda
|
Agda
|
test/Succeed/NatEquals.agda
|
cruhland/agda
|
7f58030124fa99dfbf8db376659416f3ad8384de
|
[
"MIT"
] | 1,989
|
2015-01-09T23:51:16.000Z
|
2022-03-30T18:20:48.000Z
|
test/Succeed/NatEquals.agda
|
cruhland/agda
|
7f58030124fa99dfbf8db376659416f3ad8384de
|
[
"MIT"
] | 4,066
|
2015-01-10T11:24:51.000Z
|
2022-03-31T21:14:49.000Z
|
test/Succeed/NatEquals.agda
|
cruhland/agda
|
7f58030124fa99dfbf8db376659416f3ad8384de
|
[
"MIT"
] | 371
|
2015-01-03T14:04:08.000Z
|
2022-03-30T19:00:30.000Z
|
-- Andreas, 2013-10-21
-- There was a bug in Rules/Builtin such that NATEQUALS' equations
-- would be checked at type Nat instead of Bool.
-- This bug surfaced only because of today's refactoring in Conversion,
-- because then I got a strange unsolved constraint true == true : Nat.
module NatEquals where
import Common.Level
data Bool : Set where
true false : Bool
{-# BUILTIN BOOL Bool #-}
{-# BUILTIN TRUE true #-}
{-# BUILTIN FALSE false #-}
data Nat : Set where
zero : Nat
suc : Nat -> Nat
{-# BUILTIN NATURAL Nat #-}
infix 40 _=?=_
_=?=_ : Nat -> Nat -> Bool
zero =?= zero = true
zero =?= suc _ = false
suc _ =?= zero = false
suc n =?= suc m = n =?= m
{-# BUILTIN NATEQUALS _=?=_ #-}
| 21.666667
| 72
| 0.643357
|
5be73f0f10b3fae753cf0b6efd2373d05d1ed04d
| 1,847
|
agda
|
Agda
|
theorems/stash/modalities/JoinAdj.agda
|
timjb/HoTT-Agda
|
66f800adef943afdf08c17b8ecfba67340fead5e
|
[
"MIT"
] | 294
|
2015-01-09T16:23:23.000Z
|
2022-03-20T13:54:45.000Z
|
theorems/stash/modalities/JoinAdj.agda
|
timjb/HoTT-Agda
|
66f800adef943afdf08c17b8ecfba67340fead5e
|
[
"MIT"
] | 31
|
2015-03-05T20:09:00.000Z
|
2021-10-03T19:15:25.000Z
|
theorems/stash/modalities/JoinAdj.agda
|
timjb/HoTT-Agda
|
66f800adef943afdf08c17b8ecfba67340fead5e
|
[
"MIT"
] | 50
|
2015-01-10T01:48:08.000Z
|
2022-02-14T03:03:25.000Z
|
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import stash.modalities.gbm.GbmUtil
module stash.modalities.JoinAdj {i j k}
(A : Type i) (B : Type j) (C : Type k) where
private
module From (f : B → C) (γ : A → hfiber cst f)
= JoinRec (fst ∘ γ) f (λ a b → app= (snd (γ a)) b)
from-β : (f : B → C) (γ : A → hfiber cst f)
(a : A) (b : B) → ap (From.f f γ) (jglue a b) == app= (snd (γ a)) b
from-β f γ a b = From.glue-β f γ a b
to : (A * B → C) → Σ (B → C) (λ f → A → hfiber cst f)
to φ = φ ∘ right , (λ a → φ (left a) , λ= (λ b → ap φ (glue (a , b))))
from : Σ (B → C) (λ f → A → hfiber cst f) → A * B → C
from (f , γ) = From.f f γ
abstract
to-from : (ψ : Σ (B → C) (λ f → A → hfiber cst f)) → to (from ψ) == ψ
to-from (f , γ) = pair= idp (λ= coh)
where coh : (a : A) → from (f , γ) (left a) , λ= (λ b → ap (from (f , γ)) (glue (a , b))) == γ a
coh a = pair= idp (ap λ= (λ= (λ b → from-β f γ a b)) ∙ ! (λ=-η (snd (γ a))))
from-to : (φ : A * B → C) → from (to φ) == φ
from-to φ = λ= (Join-elim (λ a → idp) (λ b → idp) (λ a b → ↓-==-in (coh a b)))
where coh : ∀ a b → ap φ (jglue a b) == ap (from (to φ)) (jglue a b) ∙ idp
coh a b = ap φ (jglue a b)
=⟨ ! (app=-β (λ b → ap φ (jglue a b)) b) ⟩
app= (λ= (λ b → ap φ (jglue a b))) b
=⟨ ! (from-β (fst (to φ)) (snd (to φ)) a b) ⟩
ap (From.f (fst (to φ)) (snd (to φ))) (jglue a b)
=⟨ ! (∙-unit-r (ap (from (to φ)) (jglue a b))) ⟩
ap (from (to φ)) (jglue a b) ∙ idp
=∎
join-adj : (A * B → C) ≃ Σ (B → C) (λ f → A → hfiber cst f)
join-adj = equiv to from to-from from-to
| 38.479167
| 104
| 0.40823
|
b1a6a0dfbd711db19c3d0cdbcd89b8b1a7a8cf3f
| 375
|
agda
|
Agda
|
test/Succeed/Issue3314.agda
|
phadej/agda
|
2fa8ede09451d43647f918dbfb24ff7b27c52edc
|
[
"BSD-3-Clause"
] | null | null | null |
test/Succeed/Issue3314.agda
|
phadej/agda
|
2fa8ede09451d43647f918dbfb24ff7b27c52edc
|
[
"BSD-3-Clause"
] | null | null | null |
test/Succeed/Issue3314.agda
|
phadej/agda
|
2fa8ede09451d43647f918dbfb24ff7b27c52edc
|
[
"BSD-3-Clause"
] | null | null | null |
{-# OPTIONS --cubical #-}
module _ where
open import Agda.Builtin.Nat
open import Agda.Builtin.Cubical.Path
postulate
admit : ∀ {A : Set} → A
data Z : Set where
pos : Nat → Z
neg : Nat → Z
sameZero : pos 0 ≡ neg 0
_+Z_ : Z → Z → Z
pos x +Z pos x₁ = admit
pos x +Z neg x₁ = admit
pos x +Z sameZero x₁ = admit
neg x +Z z' = admit
sameZero x +Z z' = admit
| 17.857143
| 37
| 0.605333
|
2711bfdf52d86df49ae0db72837570581b746dfa
| 328
|
agda
|
Agda
|
hott/level/closure/lift.agda
|
HoTT/M-types
|
beebe176981953ab48f37de5eb74557cfc5402f4
|
[
"BSD-3-Clause"
] | 27
|
2015-04-14T15:47:03.000Z
|
2022-01-09T07:26:57.000Z
|
src/hott/level/closure/lift.agda
|
pcapriotti/agda-base
|
bbbc3bfb2f80ad08c8e608cccfa14b83ea3d258c
|
[
"BSD-3-Clause"
] | 4
|
2015-02-02T14:32:16.000Z
|
2016-10-26T11:57:26.000Z
|
src/hott/level/closure/lift.agda
|
pcapriotti/agda-base
|
bbbc3bfb2f80ad08c8e608cccfa14b83ea3d258c
|
[
"BSD-3-Clause"
] | 4
|
2015-02-02T12:17:00.000Z
|
2019-05-04T19:31:00.000Z
|
{-# OPTIONS --without-K #-}
module hott.level.closure.lift where
open import level
open import function.isomorphism.lift
open import hott.level.core
open import hott.level.closure.core
-- lifting preserves h-levels
↑-level : ∀ {i n} j {X : Set i}
→ h n X
→ h n (↑ j X)
↑-level j {X} = iso-level (lift-iso j X)
| 23.428571
| 40
| 0.652439
|
ae363ec0dc0183c076a34ebc8cfc8607418a324c
| 4,453
|
agda
|
Agda
|
Structure/Relator/Properties.agda
|
Lolirofle/stuff-in-agda
|
70f4fba849f2fd779c5aaa5af122ccb6a5b271ba
|
[
"MIT"
] | 6
|
2020-04-07T17:58:13.000Z
|
2022-02-05T06:53:22.000Z
|
Structure/Relator/Properties.agda
|
Lolirofle/stuff-in-agda
|
70f4fba849f2fd779c5aaa5af122ccb6a5b271ba
|
[
"MIT"
] | null | null | null |
Structure/Relator/Properties.agda
|
Lolirofle/stuff-in-agda
|
70f4fba849f2fd779c5aaa5af122ccb6a5b271ba
|
[
"MIT"
] | null | null | null |
module Structure.Relator.Properties where
open import Functional
import Lvl
open import Lang.Instance
open import Logic
import Structure.Relator.Names as Names
open import Type
private variable ℓ ℓ₁ ℓ₂ ℓ₃ ℓ₄ : Lvl.Level
private variable T A B C D E : Type{ℓ}
-- Definition of a reflexive binary relation
module _ {T : Type{ℓ₁}} (_▫_ : T → T → Stmt{ℓ₂}) where
record Reflexivity : Stmt{ℓ₁ Lvl.⊔ ℓ₂} where
constructor intro
field proof : Names.Reflexivity(_▫_)
reflexivity = inst-fn Reflexivity.proof
-- Definition of a transitive binary relation
module _ {T : Type{ℓ₁}} (_▫_ : T → T → Stmt{ℓ₂}) where
record Transitivity : Stmt{ℓ₁ Lvl.⊔ ℓ₂} where
constructor intro
field proof : Names.Transitivity(_▫_)
transitivity = inst-fn Transitivity.proof
-- Definition of a antisymmetric binary relation
module _ {T : Type{ℓ₁}} (_▫₁_ : T → T → Stmt{ℓ₂}) (_▫₂_ : T → T → Stmt{ℓ₃}) where
record Antisymmetry : Stmt{ℓ₁ Lvl.⊔ ℓ₂ Lvl.⊔ ℓ₃} where
constructor intro
field proof : Names.Antisymmetry(_▫₁_)(_▫₂_)
antisymmetry = inst-fn Antisymmetry.proof
-- Definition of a irreflexive binary relation
module _ {T : Type{ℓ₁}} (_▫_ : T → T → Stmt{ℓ₂}) where
record Irreflexivity : Stmt{ℓ₁ Lvl.⊔ ℓ₂} where
constructor intro
field proof : Names.Irreflexivity(_▫_)
irreflexivity = inst-fn Irreflexivity.proof
-- Definition of a total binary relation.
-- Total in the sense that it, or its converse, holds.
module _ {T : Type{ℓ₁}} (_▫_ : T → T → Stmt{ℓ₂}) where
record ConverseTotal : Stmt{ℓ₁ Lvl.⊔ ℓ₂} where
constructor intro
field proof : Names.ConverseTotal(_▫_)
converseTotal = inst-fn ConverseTotal.proof
-- Definition of a converse dichotomy.
-- It or its converse always holds, but never both at the same time.
module _ {T : Type{ℓ₁}} (_▫_ : T → T → Stmt{ℓ₂}) where
record ConverseDichotomy : Stmt{ℓ₁ Lvl.⊔ ℓ₂} where
constructor intro
field proof : Names.ConverseDichotomy(_▫_)
dichotomy = inst-fn ConverseDichotomy.proof
module _ {T : Type{ℓ₁}} (_▫₁_ : T → T → Stmt{ℓ₂}) (_▫₂_ : T → T → Stmt{ℓ₃}) where
record ConverseTrichotomy : Stmt{ℓ₁ Lvl.⊔ ℓ₂ Lvl.⊔ ℓ₃} where
constructor intro
field proof : Names.ConverseTrichotomy(_▫₁_)(_▫₂_)
trichotomy = inst-fn ConverseTrichotomy.proof
-- Definition of a converse binary operation for a binary operation
-- record Converse {T₁ T₂ : Type} (_▫₁_ : T₁ → T₂ → Stmt) (_▫₂_ : T₂ → T₁ → Stmt) : Stmt where
-- constructor intro
--
-- field
-- converseₗ : Names.ConversePattern (_▫₂_) (_▫₁_)
-- converseᵣ : Names.ConversePattern (_▫₁_) (_▫₂_)
-- open Converse ⦃ ... ⦄ public
-- {x : T₁}{y : T₂} → (x ▫₁ y) ↔ (y ▫₂ x)
-- Definition of a symmetric binary operation
module _ {T : Type{ℓ₁}} (_▫_ : T → T → Stmt{ℓ₂}) where
record Symmetry : Stmt{ℓ₁ Lvl.⊔ ℓ₂} where
constructor intro
field proof : Names.Symmetry(_▫_)
symmetry = inst-fn Symmetry.proof
-- {x y : T} → (x ▫ y) → (y ▫ x)
-- Definition of an asymmetric binary operation
module _ {T : Type{ℓ₁}} (_▫_ : T → T → Stmt{ℓ₂}) where
record Asymmetry : Stmt{ℓ₁ Lvl.⊔ ℓ₂} where
constructor intro
field proof : Names.Asymmetry(_▫_)
asymmetry = inst-fn Asymmetry.proof
-- {x y : T} → (x ▫ y) → ¬(y ▫ x)
module _ (_▫₁_ : A → B → Stmt{ℓ₁}) (_▫₂_ : A → B → Stmt{ℓ₂}) where
record _⊆₂_ : Stmt{Lvl.of(A) Lvl.⊔ Lvl.of(B) Lvl.⊔ ℓ₁ Lvl.⊔ ℓ₂} where
constructor intro
field proof : Names.Subrelation(_▫₁_)(_▫₂_)
sub₂ = inst-fn _⊆₂_.proof
module _ (_▫₁_ : A → B → Stmt{ℓ₁}) (_▫₂_ : A → B → Stmt{ℓ₂}) where
_⊇₂_ = (_▫₂_) ⊆₂ (_▫₁_)
module _⊇₂_ inst = _⊆₂_ {_▫₁_ = _▫₂_}{_▫₂_ = _▫₁_} inst
super₂ = inst-fn _⊇₂_.proof
module _ (_▫₁_ : A → B → Stmt{ℓ₁}) (_▫₂_ : A → A → Stmt{ℓ₂}) where
record Subtransitivityₗ : Stmt{Lvl.of(A) Lvl.⊔ Lvl.of(B) Lvl.⊔ ℓ₁ Lvl.⊔ ℓ₂} where
constructor intro
field proof : Names.Subtransitivityₗ(_▫₁_)(_▫₂_)
subtransitivityₗ = inst-fn Subtransitivityₗ.proof
module _ (_▫₁_ : A → B → Stmt{ℓ₁}) (_▫₂_ : B → B → Stmt{ℓ₂}) where
record Subtransitivityᵣ : Stmt{Lvl.of(A) Lvl.⊔ Lvl.of(B) Lvl.⊔ ℓ₁ Lvl.⊔ ℓ₂} where
constructor intro
field proof : Names.Subtransitivityᵣ(_▫₁_)(_▫₂_)
subtransitivityᵣ = inst-fn Subtransitivityᵣ.proof
-- Definition of a cotransitive binary relation
module _ {T : Type{ℓ₁}} (_▫_ : T → T → Stmt{ℓ₂}) where
record CoTransitivity : Stmt{ℓ₁ Lvl.⊔ ℓ₂} where
constructor intro
field proof : Names.CoTransitivity(_▫_)
cotransitivity = inst-fn CoTransitivity.proof
| 37.737288
| 94
| 0.665843
|
5d671adf23315717dcdf5bb4215a27d9d949c107
| 10,557
|
agda
|
Agda
|
src/fot/DistributiveLaws/TaskB-I.agda
|
asr/fotc
|
2fc9f2b81052a2e0822669f02036c5750371b72d
|
[
"MIT"
] | 11
|
2015-09-03T20:53:42.000Z
|
2021-09-12T16:09:54.000Z
|
src/fot/DistributiveLaws/TaskB-I.agda
|
asr/fotc
|
2fc9f2b81052a2e0822669f02036c5750371b72d
|
[
"MIT"
] | 2
|
2016-10-12T17:28:16.000Z
|
2017-01-01T14:34:26.000Z
|
src/fot/DistributiveLaws/TaskB-I.agda
|
asr/fotc
|
2fc9f2b81052a2e0822669f02036c5750371b72d
|
[
"MIT"
] | 3
|
2016-09-19T14:18:30.000Z
|
2018-03-14T08:50:00.000Z
|
------------------------------------------------------------------------------
-- Distributive laws on a binary operation: Task B
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
module DistributiveLaws.TaskB-I where
open import DistributiveLaws.Base
open import DistributiveLaws.PropertiesI
open import Common.FOL.Relation.Binary.EqReasoning
------------------------------------------------------------------------------
prop₂ : ∀ u x y z →
(x · y · (z · u)) · ((x · y · (z · u)) · (x · z · (y · u))) ≡
x · z · (y · u)
prop₂ u x y z =
xy·zu · (xy·zu · xz·yu) ≡⟨ j₁ ⟩
xy·zu · (x·zu · y·zu · xz·yu) ≡⟨ j₂ ⟩
xy·zu · (x·zu · xz·yu · (y·zu · xz·yu)) ≡⟨ j₃ ⟩
-- Note: The paper proof has a typo in the third proof step:
-- xy·zu · (xz·xu · xz·yu · (z·zu · xz·yu))
xy·zu · (xz·xu · xz·yu · (y·zu · xz·yu)) ≡⟨ j₄ ⟩
xy·zu · (xz · xu·yu · (y·zu · xz·yu)) ≡⟨ j₅ ⟩
xy·zu · (xz · xyu · (y·zu · xz·yu)) ≡⟨ j₆ ⟩
xy·zu · (xz · xyu · (yz·yu · xz·yu)) ≡⟨ j₇ ⟩
xy·zu · (xz · xyu · (yz·xz · yu)) ≡⟨ j₈ ⟩
xy·zu · (xz · xyu · (yxz · yu)) ≡⟨ j₉ ⟩
xy·zu · (xz · xyu · (yx·yu · z·yu)) ≡⟨ j₁₀ ⟩
xy·zu · (xz · xyu · (y·xu · z·yu)) ≡⟨ j₁₁ ⟩
xyz · xyu · (xz · xyu · (y·xu · z·yu)) ≡⟨ j₁₂ ⟩
xz·yz · xyu · (xz · xyu · (y·xu · z·yu)) ≡⟨ j₁₃ ⟩
xz · xyu · (yz · xyu) · (xz · xyu · (y·xu · z·yu)) ≡⟨ j₁₄ ⟩
xz · xyu · (yz · xyu · (y·xu · z·yu)) ≡⟨ j₁₅ ⟩
xz · xyu · (yz · xu·yu · (y·xu · z·yu)) ≡⟨ j₁₆ ⟩
xz · xyu · (y · xu·yu · (z · xu·yu) · (y·xu · z·yu)) ≡⟨ j₁₇ ⟩
xz · xyu ·
(y · xu·yu · (y·xu · z·yu) · (z · xu·yu · (y·xu · z·yu))) ≡⟨ j₁₈ ⟩
xz · xyu ·
(y·xu · y·yu · (y·xu · z·yu) · (z · xu·yu · (y·xu · z·yu))) ≡⟨ j₁₉ ⟩
xz · xyu · (y·xu · (y·yu · z·yu) · (z · xu·yu · (y·xu · z·yu))) ≡⟨ j₂₀ ⟩
xz · xyu · (y·xu · yz·yu · (z · xu·yu · (y·xu · z·yu))) ≡⟨ j₂₁ ⟩
xz · xyu · (y·xu · y·zu · (z · xu·yu · (y·xu · z·yu))) ≡⟨ j₂₂ ⟩
xz · xyu · (y · xu·zu · (z · xu·yu · (y·xu · z·yu))) ≡⟨ j₂₃ ⟩
xz · xyu · (y · xu·zu · (z·xu · z·yu · (y·xu · z·yu))) ≡⟨ j₂₄ ⟩
(xz · xyu) · (y · xu·zu · (z·xu · y·xu · z·yu)) ≡⟨ j₂₅ ⟩
xz · xyu · (y · xu·zu · (zy·xu · z·yu)) ≡⟨ j₂₆ ⟩
xz · xyu · (y · xu·zu · (zy·xu · zy·zu)) ≡⟨ j₂₇ ⟩
xz · xyu · (y · xu·zu · (zy · xu·zu)) ≡⟨ j₂₈ ⟩
xz · xyu · (y·zy · xu·zu) ≡⟨ j₂₉ ⟩
xz · xyu · (y·zy · xzu) ≡⟨ j₃₀ ⟩
xz·xy · xzu · (y·zy · xzu) ≡⟨ j₃₁ ⟩
x·zy · xzu · (y·zy · xzu) ≡⟨ j₃₂ ⟩
x·zy · y·zy · xzu ≡⟨ j₃₃ ⟩
xy·zy · xzu ≡⟨ j₃₄ ⟩
xzy · xzu ≡⟨ j₃₅ ⟩
xz·yu ∎
where
-- Two variables abbreviations
xz = x · z
yu = y · u
yz = y · z
zy = z · y
-- Three variables abbreviations
xyu = x · y · u
xyz = x · y · z
xzu = x · z · u
xzy = x · z · y
yxz = y · x · z
x·yu = x · (y · u)
x·zu = x · (z · u)
x·zy = x · (z · y)
y·xu = y · (x · u)
y·yu = y · (y · u)
y·zu = y · (z · u)
y·zy = y · (z · y)
z·xu = z · (x · u)
z·yu = z · (y · u)
-- Four variables abbreviations
xu·yu = x · u · (y · u)
xu·zu = x · u · (z · u)
xy·yz = x · y · (y · z)
xy·zu = x · y · (z · u)
xy·zy = x · y · (z · y)
xz·xu = x · z · (x · u)
xz·xy = x · z · (x · y)
xz·yu = x · z · (y · u)
xz·yz = x · z · (y · z)
yx·yu = y · x · (y · u)
yz·xz = y · z · (x · z)
yz·yu = y · z · (y · u)
zy·xu = z · y · (x · u)
zy·zu = z · y · (z · u)
-- Steps justifications
j₁ : xy·zu · (xy·zu · xz·yu) ≡
xy·zu · (x·zu · y·zu · xz·yu)
j₁ = ·-rightCong (·-leftCong (rightDistributive x y (z · u)))
j₂ : xy·zu · (x·zu · y·zu · xz·yu) ≡
xy·zu · (x·zu · xz·yu · (y·zu · xz·yu))
j₂ = ·-rightCong (rightDistributive x·zu y·zu xz·yu)
j₃ : xy·zu · (x·zu · xz·yu · (y·zu · xz·yu)) ≡
xy·zu · (xz·xu · xz·yu · (y·zu · xz·yu))
j₃ = ·-rightCong (·-leftCong (·-leftCong (leftDistributive x z u)))
j₄ : xy·zu · (xz·xu · xz·yu · (y·zu · xz·yu)) ≡
xy·zu · (xz · xu·yu · (y·zu · xz·yu))
j₄ = ·-rightCong (·-leftCong (sym (leftDistributive (x · z) (x · u) (y · u))))
j₅ : xy·zu · (xz · xu·yu · (y·zu · xz·yu)) ≡
xy·zu · (xz · xyu · (y·zu · xz·yu))
j₅ = ·-rightCong (·-leftCong (·-rightCong (sym (rightDistributive x y u))))
j₆ : xy·zu · (xz · xyu · (y·zu · xz·yu)) ≡
xy·zu · (xz · xyu · (yz·yu · xz·yu))
j₆ = ·-rightCong (·-rightCong (·-leftCong (leftDistributive y z u)))
j₇ : xy·zu · (xz · xyu · (yz·yu · xz·yu)) ≡
xy·zu · (xz · xyu · (yz·xz · yu))
j₇ = ·-rightCong (·-rightCong (sym (rightDistributive (y · z) (x · z) (y · u))))
j₈ : xy·zu · (xz · xyu · (yz·xz · yu)) ≡
xy·zu · (xz · xyu · (yxz · yu))
j₈ = ·-rightCong (·-rightCong (·-leftCong (sym (rightDistributive y x z))))
j₉ : xy·zu · (xz · xyu · (yxz · yu)) ≡
xy·zu · (xz · xyu · (yx·yu · z·yu))
j₉ = ·-rightCong (·-rightCong (rightDistributive (y · x) z yu))
j₁₀ : xy·zu · (xz · xyu · (yx·yu · z·yu)) ≡
xy·zu · (xz · xyu · (y·xu · z·yu))
j₁₀ = ·-rightCong (·-rightCong (·-leftCong (sym (leftDistributive y x u))))
j₁₁ : xy·zu · (xz · xyu · (y·xu · z·yu)) ≡
xyz · xyu · (xz · xyu · (y·xu · z·yu))
j₁₁ = ·-leftCong (leftDistributive (x · y) z u)
j₁₂ : xyz · xyu · (xz · xyu · (y·xu · z·yu)) ≡
xz·yz · xyu · (xz · xyu · (y·xu · z·yu))
j₁₂ = ·-leftCong (·-leftCong (rightDistributive x y z))
j₁₃ : xz·yz · xyu · (xz · xyu · (y·xu · z·yu)) ≡
xz · xyu · (yz · xyu) · (xz · xyu · (y·xu · z·yu))
j₁₃ = ·-leftCong (rightDistributive (x · z) (y · z) xyu)
j₁₄ : xz · xyu · (yz · xyu) · (xz · xyu · (y·xu · z·yu)) ≡
xz · xyu · (yz · xyu · (y·xu · z·yu))
j₁₄ = sym (leftDistributive (xz · xyu) (yz · xyu) (y·xu · z·yu))
j₁₅ : xz · xyu · (yz · xyu · (y·xu · z·yu)) ≡
xz · xyu · (yz · xu·yu · (y·xu · z·yu))
j₁₅ = ·-rightCong (·-leftCong (·-rightCong (rightDistributive x y u)))
j₁₆ : xz · xyu · (yz · xu·yu · (y·xu · z·yu)) ≡
xz · xyu · (y · xu·yu · (z · xu·yu) · (y·xu · z·yu))
j₁₆ = ·-rightCong (·-leftCong (rightDistributive y z xu·yu))
j₁₇ : xz · xyu · (y · xu·yu · (z · xu·yu) · (y·xu · z·yu)) ≡
xz · xyu ·
(y · xu·yu · (y·xu · z·yu) · (z · xu·yu · (y·xu · z·yu)))
j₁₇ = subst (λ t → xz · xyu · (y · xu·yu · (z · xu·yu) · (y·xu · z·yu)) ≡
xz · xyu · t)
(rightDistributive (y · xu·yu) (z · xu·yu) (y·xu · z·yu))
refl
j₁₈ : xz · xyu ·
(y · xu·yu · (y·xu · z·yu) · (z · xu·yu · (y·xu · z·yu))) ≡
xz · xyu ·
(y·xu · y·yu · (y·xu · z·yu) · (z · xu·yu · (y·xu · z·yu)))
j₁₈ = ·-rightCong (·-leftCong (·-leftCong (leftDistributive y (x · u) (y · u))))
j₁₉ : xz · xyu ·
(y·xu · y·yu · (y·xu · z·yu) · (z · xu·yu · (y·xu · z·yu))) ≡
xz · xyu · (y·xu · (y·yu · z·yu) · (z · xu·yu · (y·xu · z·yu)))
j₁₉ = subst (λ t → xz · xyu ·
(y·xu · y·yu · (y·xu · z·yu) · (z · xu·yu · (y·xu · z·yu)))
≡
xz · xyu · (t · (z · xu·yu · (y·xu · z·yu))))
(sym (leftDistributive y·xu y·yu z·yu))
refl
j₂₀ : xz · xyu · (y·xu · (y·yu · z·yu) · (z · xu·yu · (y·xu · z·yu))) ≡
xz · xyu · (y·xu · yz·yu · (z · xu·yu · (y·xu · z·yu)))
j₂₀ = ·-rightCong (·-leftCong (·-rightCong (sym (rightDistributive y z (y · u)))))
j₂₁ : xz · xyu · (y·xu · yz·yu · (z · xu·yu · (y·xu · z·yu))) ≡
xz · xyu · (y·xu · y·zu · (z · xu·yu · (y·xu · z·yu)))
j₂₁ = ·-rightCong (·-leftCong (·-rightCong (sym (leftDistributive y z u))))
j₂₂ : xz · xyu · (y·xu · y·zu · (z · xu·yu · (y·xu · z·yu))) ≡
xz · xyu · (y · xu·zu · (z · xu·yu · (y·xu · z·yu)))
j₂₂ = ·-rightCong (·-leftCong (sym (leftDistributive y (x · u) (z · u))))
j₂₃ : xz · xyu · (y · xu·zu · (z · xu·yu · (y·xu · z·yu))) ≡
xz · xyu · (y · xu·zu · (z·xu · z·yu · (y·xu · z·yu)))
j₂₃ = ·-rightCong (·-rightCong (·-leftCong (leftDistributive z (x · u) (y · u))))
j₂₄ : xz · xyu · (y · xu·zu · (z·xu · z·yu · (y·xu · z·yu))) ≡
(xz · xyu) · (y · xu·zu · (z·xu · y·xu · z·yu))
j₂₄ = ·-rightCong (·-rightCong (sym (rightDistributive z·xu y·xu z·yu)))
j₂₅ : (xz · xyu) · (y · xu·zu · (z·xu · y·xu · z·yu)) ≡
xz · xyu · (y · xu·zu · (zy·xu · z·yu))
j₂₅ = ·-rightCong (·-rightCong (·-leftCong (sym (rightDistributive z y (x · u)))))
j₂₆ : xz · xyu · (y · xu·zu · (zy·xu · z·yu)) ≡
xz · xyu · (y · xu·zu · (zy·xu · zy·zu))
j₂₆ = ·-rightCong (·-rightCong (·-rightCong (leftDistributive z y u)))
j₂₇ : xz · xyu · (y · xu·zu · (zy·xu · zy·zu)) ≡
xz · xyu · (y · xu·zu · (zy · xu·zu))
j₂₇ = ·-rightCong (·-rightCong (sym (leftDistributive (z · y) (x · u) (z · u))))
j₂₈ : xz · xyu · (y · xu·zu · (zy · xu·zu)) ≡
xz · xyu · (y·zy · xu·zu)
j₂₈ = ·-rightCong (sym (rightDistributive y zy xu·zu))
j₂₉ : xz · xyu · (y·zy · xu·zu) ≡
xz · xyu · (y·zy · xzu)
j₂₉ = ·-rightCong (·-rightCong (sym (rightDistributive x z u)))
j₃₀ : xz · xyu · (y·zy · xzu) ≡
xz·xy · xzu · (y·zy · xzu)
j₃₀ = ·-leftCong (leftDistributive xz (x · y) u)
j₃₁ : xz·xy · xzu · (y·zy · xzu) ≡
x·zy · xzu · (y·zy · xzu)
j₃₁ = ·-leftCong (·-leftCong (sym (leftDistributive x z y)))
j₃₂ : x·zy · xzu · (y·zy · xzu) ≡
x·zy · y·zy · xzu
j₃₂ = sym (rightDistributive x·zy y·zy xzu)
j₃₃ : x·zy · y·zy · xzu ≡
xy·zy · xzu
j₃₃ = ·-leftCong (sym (rightDistributive x y zy))
j₃₄ : xy·zy · xzu ≡
xzy · xzu
j₃₄ = ·-leftCong (sym (rightDistributive x z y))
j₃₅ : xzy · xzu ≡
xz·yu
j₃₅ = sym (leftDistributive xz y u)
| 39.68797
| 84
| 0.399261
|
f7328a080f08b6349548eb1a3cf218663798a113
| 269
|
agda
|
Agda
|
src/Generic/Test/Data/Lift.agda
|
turion/Generic
|
e102b0ec232f2796232bd82bf8e3906c1f8a93fe
|
[
"MIT"
] | 30
|
2016-07-19T21:10:54.000Z
|
2022-02-05T10:19:38.000Z
|
src/Generic/Test/Data/Lift.agda
|
turion/Generic
|
e102b0ec232f2796232bd82bf8e3906c1f8a93fe
|
[
"MIT"
] | 9
|
2017-04-06T18:58:09.000Z
|
2022-01-04T15:43:14.000Z
|
src/Generic/Test/Data/Lift.agda
|
turion/Generic
|
e102b0ec232f2796232bd82bf8e3906c1f8a93fe
|
[
"MIT"
] | 4
|
2017-07-17T07:23:39.000Z
|
2021-01-27T12:57:09.000Z
|
module Generic.Test.Data.Lift where
open import Generic.Main as Main hiding (Lift; lift; lower)
Lift : ∀ {α} β -> Set α -> Set (α ⊔ β)
Lift = readData Main.Lift
pattern lift x = !#₀ (relv x , lrefl)
lower : ∀ {α} {A : Set α} β -> Lift β A -> A
lower β (lift x) = x
| 22.416667
| 59
| 0.613383
|
ea74c4e2980e40040df49b3ec4f9203e8bd2bb2a
| 166
|
agda
|
Agda
|
test/Succeed/Issue1760e.agda
|
shlevy/agda
|
ed8ac6f4062ea8a20fa0f62d5db82d4e68278338
|
[
"BSD-3-Clause"
] | 1,989
|
2015-01-09T23:51:16.000Z
|
2022-03-30T18:20:48.000Z
|
test/Succeed/Issue1760e.agda
|
shlevy/agda
|
ed8ac6f4062ea8a20fa0f62d5db82d4e68278338
|
[
"BSD-3-Clause"
] | 4,066
|
2015-01-10T11:24:51.000Z
|
2022-03-31T21:14:49.000Z
|
test/Succeed/Issue1760e.agda
|
Agda-zh/agda
|
231d6ad8e77b67ff8c4b1cb35a6c31ccd988c3e9
|
[
"BSD-3-Clause"
] | 371
|
2015-01-03T14:04:08.000Z
|
2022-03-30T19:00:30.000Z
|
module Issue1760e where
-- Skipping a single record definition in a private block.
private
{-# NO_POSITIVITY_CHECK #-}
record U : Set where
field ap : U → U
| 20.75
| 58
| 0.704819
|
f464b2df8eacb77ecf428956bb572dfc837f7745
| 44
|
agda
|
Agda
|
test/fail/Issue477.agda
|
asr/agda-kanso
|
aa10ae6a29dc79964fe9dec2de07b9df28b61ed5
|
[
"MIT"
] | 1
|
2019-11-27T04:41:05.000Z
|
2019-11-27T04:41:05.000Z
|
test/fail/Issue477.agda
|
masondesu/agda
|
70c8a575c46f6a568c7518150a1a64fcd03aa437
|
[
"MIT"
] | null | null | null |
test/fail/Issue477.agda
|
masondesu/agda
|
70c8a575c46f6a568c7518150a1a64fcd03aa437
|
[
"MIT"
] | null | null | null |
module Issue477 where
data D where
c : D
| 8.8
| 21
| 0.704545
|
23307b665dfaacc542141a98fcc6c08a659a4b7c
| 444
|
agda
|
Agda
|
src/data/lib/prim/Agda/Builtin/String.agda
|
redfish64/autonomic-agda
|
c0ae7d20728b15d7da4efff6ffadae6fe4590016
|
[
"BSD-3-Clause"
] | null | null | null |
src/data/lib/prim/Agda/Builtin/String.agda
|
redfish64/autonomic-agda
|
c0ae7d20728b15d7da4efff6ffadae6fe4590016
|
[
"BSD-3-Clause"
] | null | null | null |
src/data/lib/prim/Agda/Builtin/String.agda
|
redfish64/autonomic-agda
|
c0ae7d20728b15d7da4efff6ffadae6fe4590016
|
[
"BSD-3-Clause"
] | null | null | null |
module Agda.Builtin.String where
open import Agda.Builtin.Bool
open import Agda.Builtin.List
open import Agda.Builtin.Char
postulate String : Set
{-# BUILTIN STRING String #-}
primitive
primStringToList : String → List Char
primStringFromList : List Char → String
primStringAppend : String → String → String
primStringEquality : String → String → Bool
primShowChar : Char → String
primShowString : String → String
| 24.666667
| 47
| 0.736486
|
2222cc8169baf9b81a23e491999280ae5ddd70af
| 3,060
|
agda
|
Agda
|
OutsideIn/Inference/Separator.agda
|
liamoc/outside-in
|
fc1fc1bba2af95806d9075296f9ed1074afa4c24
|
[
"BSD-3-Clause"
] | 2
|
2015-09-14T05:22:15.000Z
|
2020-11-19T14:30:07.000Z
|
OutsideIn/Inference/Separator.agda
|
liamoc/outside-in
|
fc1fc1bba2af95806d9075296f9ed1074afa4c24
|
[
"BSD-3-Clause"
] | null | null | null |
OutsideIn/Inference/Separator.agda
|
liamoc/outside-in
|
fc1fc1bba2af95806d9075296f9ed1074afa4c24
|
[
"BSD-3-Clause"
] | null | null | null |
open import OutsideIn.Prelude
open import OutsideIn.X
module OutsideIn.Inference.Separator(x : X) where
import OutsideIn.Constraints as C
open C(x)
open X(x)
open import Data.List hiding (map)
mutual
data SeparatedConstraint (n : Set) : Shape → Set where
SC : ∀ {s} → QConstraint n → Implications n s → SeparatedConstraint n s
data Implications (n : Set) : Shape → Set where
imp-ε : Implications n Nullary
imp : ∀ {s} → Implication (λ n → SeparatedConstraint n s) n → Implications n (Unary s)
_imp-∧_ : ∀ {s₁ s₂} → Implications n s₁ → Implications n s₂ → Implications n (Binary s₁ s₂)
mutual
data _simpl:_ {n : Set} : Constraint n Flat → QConstraint n → Set where
Simpl-QC : ∀ {c} → QC c simpl: c
Simpl-∧ : ∀ {a b}{a′ b′} → a simpl: a′ → b simpl: b′ → (a ∧′ b) simpl: (a′ ∧ b′)
Simpl-Imp : ∀ {i} → Imp i simpl: ε
data _separate:_,_ {n : Set} : Constraint n Flat → (r : Shape) → SeparatedConstraint n r → Set where
Separate : ∀ {C}{Q}{r}{I} → C simpl: Q → C implic: r , I → C separate: r , SC Q I
data _implic:_,_ {n : Set} : Constraint n Flat → (r : Shape) → Implications n r → Set where
Implic-Qc : ∀ {c} → QC c implic: Nullary , imp-ε
Implic-∧ : ∀{a b}{r₁ r₂}{a′}{b′} → a implic: r₁ , a′ → b implic: r₂ , b′ → (a ∧′ b) implic: Binary r₁ r₂ , (a′ imp-∧ b′)
Implic-I : ∀{n}{Q}{C}{s}{v} → C separate: s , v → Imp (∃ n · Q ⊃ C) implic: Unary s , imp (∃ n · Q ⊃ v)
simpl : ∀ {n} → (C : Constraint n Flat) → ∃ (λ Q → C simpl: Q)
simpl (QC c) = _ , Simpl-QC
simpl (a ∧′ b) with simpl a | simpl b
... | q₁ , p₁ | q₂ , p₂ = _ , Simpl-∧ p₁ p₂
simpl (Imp _) = _ , Simpl-Imp
separate : ∀ {n} → (C : Constraint n Flat) → ∃ (λ r → ∃ (λ S → C separate: r , S))
implic : ∀ {n} → (C : Constraint n Flat) → ∃ (λ r → ∃ (λ I → C implic: r , I ))
separate c with implic c | simpl c
... | s , v , p | q , p′ = _ , _ , Separate p′ p
implic (QC c) = _ , _ , Implic-Qc
implic (a ∧′ b) with implic a | implic b
... | s , v , p | s′ , v′ , p′ = _ , _ , Implic-∧ p p′
implic (Imp (∃ n · Q ⊃ C)) with separate C
... | s , v , p = _ , _ , Implic-I p
-- Substitution for separated constraints
substituteSep : ∀ {s}{a b} → (a → Type b) → SeparatedConstraint a s → SeparatedConstraint b s
substituteImp : ∀ {s}{a b} → (a → Type b) → Implications a s → Implications b s
substituteSep f (SC qc imps) = SC (qc-substitute f qc) (substituteImp f imps)
where open Monad (type-is-monad)
open Functor (type-is-functor)
substituteImp f (imp-ε) = imp-ε
substituteImp {Unary s} f (imp (∃ n · Q ⊃ C)) = imp (∃ n · constraint-types (join ∘ map f) Q
⊃ substituteSep f′ C)
where module PlusN-f = Functor (Monad.is-functor (PlusN-is-monad {n}))
open Monad (type-is-monad)
open Functor (type-is-functor)
f′ = sequence-PlusN {n = n} ⦃ type-is-monad ⦄ ∘ PlusN-f.map f
substituteImp f (a imp-∧ b) = substituteImp f a imp-∧ substituteImp f b
| 51
| 127
| 0.558497
|
6d00062b19a8ba60bcd102b75a50a158fc967e82
| 1,499
|
agda
|
Agda
|
test/succeed/Issue558b.agda
|
asr/agda-kanso
|
aa10ae6a29dc79964fe9dec2de07b9df28b61ed5
|
[
"MIT"
] | 1
|
2019-11-27T04:41:05.000Z
|
2019-11-27T04:41:05.000Z
|
test/succeed/Issue558b.agda
|
masondesu/agda
|
70c8a575c46f6a568c7518150a1a64fcd03aa437
|
[
"MIT"
] | null | null | null |
test/succeed/Issue558b.agda
|
masondesu/agda
|
70c8a575c46f6a568c7518150a1a64fcd03aa437
|
[
"MIT"
] | 1
|
2022-03-12T11:35:18.000Z
|
2022-03-12T11:35:18.000Z
|
module Issue558b where
data Nat : Set where
Z : Nat
S : Nat → Nat
data _≡_ {A : Set} (a : A) : A → Set where
Refl : a ≡ a
plus : Nat → Nat → Nat
plus Z n = n
plus (S n) m = S (plus n m)
data Addable (τ : Set) : Set where
addable : (τ → τ → τ) → Addable τ
plus' : {τ : Set} → Addable τ → τ → τ → τ
plus' (addable p) = p
record ⊤ : Set where
module AddableM {τ : Set} {a : ⊤} (a : Addable τ) where
_+_ : τ → τ → τ
_+_ = plus' a
-- record Addable (τ : Set) : Set where
-- constructor addable
-- field
-- _+_ : τ → τ → τ
open module AddableIFS {t : Set} {a : ⊤} {{r : Addable t}} = AddableM {t} r
data CommAddable (τ : Set) {a : ⊤} : Set where
commAddable : (addable : Addable τ) → ((a b : τ) → (a + b) ≡ (b + a)) → CommAddable τ
private
addableCA' : {τ : Set} (ca : CommAddable τ) → Addable τ
addableCA' (commAddable a _) = a
comm' : {τ : Set} (ca : CommAddable τ) →
let a = addableCA' ca in (a b : τ) → (a + b) ≡ (b + a)
comm' (commAddable _ c) = c
module CommAddableM {τ : Set} {a : ⊤} (ca : CommAddable τ) where
addableCA : Addable τ
addableCA = addableCA' ca
comm : (a b : τ) → (a + b) ≡ (b + a)
comm = comm' ca
natAdd : Addable Nat
natAdd = addable plus
postulate commPlus : (a b : Nat) → plus a b ≡ plus b a
commNatAdd : CommAddable Nat
commNatAdd = commAddable natAdd commPlus
open CommAddableM {{...}}
test : (Z + Z) ≡ Z
test = comm Z Z
a : {x y : Nat} → (S (S Z) + (x + y)) ≡ ((x + y) + S (S Z))
a {x}{y} = comm (S (S Z)) (x + y)
| 22.712121
| 86
| 0.550367
|
5a1e4c7cdc16d5bdef0dd1b63c1c2c792df2be06
| 135
|
agda
|
Agda
|
UniDB/Subst.agda
|
skeuchel/unidb-agda
|
7ae52205db44ad4f463882ba7e5082120fb76349
|
[
"MIT"
] | null | null | null |
UniDB/Subst.agda
|
skeuchel/unidb-agda
|
7ae52205db44ad4f463882ba7e5082120fb76349
|
[
"MIT"
] | null | null | null |
UniDB/Subst.agda
|
skeuchel/unidb-agda
|
7ae52205db44ad4f463882ba7e5082120fb76349
|
[
"MIT"
] | null | null | null |
module UniDB.Subst where
open import UniDB.Subst.Core public
open import UniDB.Subst.Pair public
open import UniDB.Subst.Inst public
| 19.285714
| 35
| 0.822222
|
ac7816eb4cde3dcd21b63032dab459006c443b5e
| 4,539
|
agda
|
Agda
|
src/Dimension/PartialWeakening.agda
|
andreasabel/cubical
|
914f655c7c0417754c2ffe494d3f6ea7a357b1c3
|
[
"MIT"
] | null | null | null |
src/Dimension/PartialWeakening.agda
|
andreasabel/cubical
|
914f655c7c0417754c2ffe494d3f6ea7a357b1c3
|
[
"MIT"
] | null | null | null |
src/Dimension/PartialWeakening.agda
|
andreasabel/cubical
|
914f655c7c0417754c2ffe494d3f6ea7a357b1c3
|
[
"MIT"
] | null | null | null |
{-# OPTIONS --without-K #-}
import Level
open import Data.Empty using (⊥-elim)
open import Data.Nat using (ℕ; zero; suc; _+_)
open import Data.Fin using (Fin; zero; suc)
open import Relation.Binary.PropositionalEquality
open ≡-Reasoning
open import Control.Category
module Dimension.PartialWeakening (E : Set) where
-- Partial weakenings from n to m are injective maps from Fin n to Fin m
-- that can raise exceptions in E.
data PWeak : (n m : ℕ) → Set where
[] : PWeak 0 0 -- empty
_∷_ : ∀ {n m} (e : E) (f : PWeak n m) → PWeak (1 + n) m -- partial
lift : ∀ {n m} (f : PWeak n m) → PWeak (1 + n) (1 + m) -- new name
weak : ∀ {n m} (f : PWeak n m) → PWeak n (1 + m) -- unused n.
-- Empty.
empty : ∀ {m} → PWeak 0 m
empty {m = 0} = []
empty {m = suc m} = weak (empty {m = m})
-- Identity.
id : ∀ {n} → PWeak n n
id {n = 0} = []
id {n = suc n} = lift (id {n = n})
-- Composition.
comp : ∀ {n m l} → PWeak n m → PWeak m l → PWeak n l
comp [] _ = empty
comp (e ∷ f) g = e ∷ comp f g
comp (lift f) (e ∷ g) = e ∷ comp f g
comp (lift f) (lift g) = lift (comp f g)
comp (lift f) (weak g) = weak (comp (lift f) g)
comp (weak f) (e ∷ g) = comp f g
comp (weak f) (lift g) = weak (comp f g)
comp (weak f) (weak g) = weak (comp (weak f) g)
module Laws where
-- Empty is initial (i.e., equal to any (g : PWeak 0 m))
abstract
empty-extensional : ∀ {m} (g : PWeak 0 m) → g ≡ empty
empty-extensional [] = refl
empty-extensional (weak g) = cong weak (empty-extensional g)
-- Empty is left dominant
abstract
empty-comp : ∀ {n m} (g : PWeak n m) → comp empty g ≡ empty
empty-comp g = empty-extensional (comp empty g)
{-
empty-comp [] = refl
empty-comp (e ∷ g) = empty-comp g
empty-comp (lift g) = cong weak (empty-comp g)
empty-comp {n = zero } (weak g) = refl
empty-comp {n = suc n} (weak g) = cong weak (empty-comp g)
-}
-- Left identity.
abstract
left-id : ∀ {n m} (g : PWeak n m) → comp id g ≡ g
left-id [] = refl
left-id (e ∷ g) = cong (_∷_ e) (left-id g)
left-id (lift g) = cong lift (left-id g)
left-id {n = zero} (weak g) = cong weak (sym (empty-extensional g))
left-id {n = suc n} (weak g) = cong weak (left-id g)
-- Right identity.
abstract
right-id : ∀ {n m} (g : PWeak n m) → comp g id ≡ g
right-id [] = refl
right-id (e ∷ g) = cong (_∷_ e) (right-id g)
right-id (lift g) = cong lift (right-id g)
right-id {n = zero } (weak g) = cong weak (right-id g)
right-id {n = suc n} (weak g) = cong weak (right-id g)
-- Associativity.
abstract
assoc : ∀ {n m l k} (f : PWeak n m) (g : PWeak m l) (h : PWeak l k) →
comp (comp f g) h ≡ comp f (comp g h)
assoc [] g h = empty-extensional _
assoc (e ∷ f) g h = cong (_∷_ e) (assoc f g h)
assoc (lift f) (e ∷ g) h = cong (_∷_ e) (assoc f g h)
assoc (lift f) (lift g) (e ∷ h) = cong (_∷_ e) (assoc f g h)
assoc (lift f) (lift g) (lift h) = cong lift (assoc f g h)
assoc (lift f) (lift g) (weak h) = cong weak (assoc (lift f) (lift g) h)
assoc (lift f) (weak g) (e ∷ h) = assoc (lift f) g h
assoc (lift f) (weak g) (lift h) = cong weak (assoc (lift f) g h)
assoc (lift f) (weak g) (weak h) = cong weak (assoc (lift f) (weak g) h)
assoc (weak f) (e ∷ g) h = assoc f g h
assoc (weak f) (lift g) (e ∷ h) = assoc f g h
assoc (weak f) (lift g) (lift h) = cong weak (assoc f g h)
assoc (weak f) (lift g) (weak h) = cong weak (assoc (weak f) (lift g) h)
assoc (weak f) (weak g) (e ∷ h) = assoc (weak f) g h
assoc (weak f) (weak g) (lift h) = cong weak (assoc (weak f) g h)
assoc (weak f) (weak g) (weak h) = cong weak (assoc (weak f) (weak g) h)
open Laws
-- PWeak is a category with initial object
SPWeak = λ n m → setoid (PWeak n m)
pWeakIsCategory : IsCategory SPWeak
pWeakIsCategory = record
{ ops = record
{ id = id
; _⟫_ = comp
}
; laws = record
{ id-first = left-id _
; id-last = right-id _
; ∘-assoc = λ f → assoc f _ _
; ∘-cong = cong₂ comp
}
}
emptyIsInitial : IsInitial SPWeak 0
emptyIsInitial = record
{ initial = empty
; initial-universal = empty-extensional _
}
-- The category PWEAK
PWEAK : Category _ _ _
PWEAK = record { Hom = SPWeak; isCategory = pWeakIsCategory }
-- -}
| 31.303448
| 78
| 0.538224
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.