hexsha
stringlengths
40
40
size
int64
3
1.05M
ext
stringclasses
163 values
lang
stringclasses
53 values
max_stars_repo_path
stringlengths
3
945
max_stars_repo_name
stringlengths
4
112
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
sequencelengths
1
10
max_stars_count
float64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
945
max_issues_repo_name
stringlengths
4
113
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
sequencelengths
1
10
max_issues_count
float64
1
116k
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
945
max_forks_repo_name
stringlengths
4
113
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
sequencelengths
1
10
max_forks_count
float64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
3
1.05M
avg_line_length
float64
1
966k
max_line_length
int64
1
977k
alphanum_fraction
float64
0
1
594239c7224280202cda8ba0c63e8ccafbc8845a
4,799
ads
Ada
source/amf/uml/amf-uml-models-collections.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/amf/uml/amf-uml-models-collections.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/amf/uml/amf-uml-models-collections.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 © 2011-2012, Vadim Godunko <[email protected]> -- -- 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 AMF.Generic_Collections; package AMF.UML.Models.Collections is pragma Preelaborate; package UML_Model_Collections is new AMF.Generic_Collections (UML_Model, UML_Model_Access); type Set_Of_UML_Model is new UML_Model_Collections.Set with null record; Empty_Set_Of_UML_Model : constant Set_Of_UML_Model; type Ordered_Set_Of_UML_Model is new UML_Model_Collections.Ordered_Set with null record; Empty_Ordered_Set_Of_UML_Model : constant Ordered_Set_Of_UML_Model; type Bag_Of_UML_Model is new UML_Model_Collections.Bag with null record; Empty_Bag_Of_UML_Model : constant Bag_Of_UML_Model; type Sequence_Of_UML_Model is new UML_Model_Collections.Sequence with null record; Empty_Sequence_Of_UML_Model : constant Sequence_Of_UML_Model; private Empty_Set_Of_UML_Model : constant Set_Of_UML_Model := (UML_Model_Collections.Set with null record); Empty_Ordered_Set_Of_UML_Model : constant Ordered_Set_Of_UML_Model := (UML_Model_Collections.Ordered_Set with null record); Empty_Bag_Of_UML_Model : constant Bag_Of_UML_Model := (UML_Model_Collections.Bag with null record); Empty_Sequence_Of_UML_Model : constant Sequence_Of_UML_Model := (UML_Model_Collections.Sequence with null record); end AMF.UML.Models.Collections;
52.163043
78
0.495937
3d1fce916d581dbec837710b8c537bd102a2113a
1,270
ads
Ada
3-mid/opengl/source/lean/model/opengl-model-hexagon-lit_colored_textured.ads
charlie5/lace
e9b7dc751d500ff3f559617a6fc3089ace9dc134
[ "0BSD" ]
20
2015-11-04T09:23:59.000Z
2022-01-14T10:21:42.000Z
3-mid/opengl/source/lean/model/opengl-model-hexagon-lit_colored_textured.ads
charlie5/lace
e9b7dc751d500ff3f559617a6fc3089ace9dc134
[ "0BSD" ]
2
2015-11-04T17:05:56.000Z
2015-12-08T03:16:13.000Z
3-mid/opengl/source/lean/model/opengl-model-hexagon-lit_colored_textured.ads
charlie5/lace
e9b7dc751d500ff3f559617a6fc3089ace9dc134
[ "0BSD" ]
1
2015-12-07T12:53:52.000Z
2015-12-07T12:53:52.000Z
with openGL.Geometry, openGL.Texture; package openGL.Model.hexagon.lit_colored_textured -- -- Models a lit, colored and textured hexagon. -- is type Item is new Model.item with private; type View is access all Item'Class; type Face is record center_Color : lucid_Color; -- The color at the center of the hex. Colors : lucid_Colors (1 .. 6); -- The color at each of the hexes 6 vertices. Texture : openGL.Texture.Object := openGL.Texture.null_Object; -- The texture to be applied to the hex.. end record; --------- --- Forge -- function new_Hexagon (Radius : in Real; Face : in lit_colored_textured.Face) return View; -------------- --- Attributes -- overriding function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class; Fonts : in Font.font_id_Map_of_font) return Geometry.views; private type Item is new Model.hexagon.item with record Face : lit_colored_textured.Face; end record; end openGL.Model.hexagon.lit_colored_textured;
27.608696
125
0.577165
1d7ae873d52c4b170c4a874053b4852f77d04321
23,832
adb
Ada
src/tests.adb
mokafiht/u2f_key_SDCC
2febfaf075eb4f414a937c7369149d68cbffbf2e
[ "BSD-2-Clause" ]
1
2018-02-02T16:24:03.000Z
2018-02-02T16:24:03.000Z
src/tests.adb
mokafiht/u2f_key_SDCC
2febfaf075eb4f414a937c7369149d68cbffbf2e
[ "BSD-2-Clause" ]
null
null
null
src/tests.adb
mokafiht/u2f_key_SDCC
2febfaf075eb4f414a937c7369149d68cbffbf2e
[ "BSD-2-Clause" ]
null
null
null
M:tests S:Ltests.aligned_alloc$size$1$26({2}SI:U),B,1,-4 S:Ltests.aligned_alloc$alignment$1$26({2}SI:U),B,1,1 T:Ftests$SI_UU32[({0}S:S$u32$0$0({4}SL:U),Z,0,0)({0}S:S$s32$0$0({4}SL:S),Z,0,0)({0}S:S$uu16$0$0({4}DA2d,STSI_UU16:S),Z,0,0)({0}S:S$u16$0$0({4}DA2d,SI:U),Z,0,0)({0}S:S$s16$0$0({4}DA2d,SI:S),Z,0,0)({0}S:S$u8$0$0({4}DA4d,SC:U),Z,0,0)({0}S:S$s8$0$0({4}DA4d,SC:S),Z,0,0)] T:Ftests$SI_UU16[({0}S:S$u16$0$0({2}SI:U),Z,0,0)({0}S:S$s16$0$0({2}SI:S),Z,0,0)({0}S:S$u8$0$0({2}DA2d,SC:U),Z,0,0)({0}S:S$s8$0$0({2}DA2d,SC:S),Z,0,0)] T:Ftests$u2f_hid_nonce[({0}S:S$nonce$0$0({8}DA8d,SC:U),Z,0,0)] T:Ftests$config_msg[({0}S:S$cmd$0$0({1}SC:U),Z,0,0)({1}S:S$buf$0$0({63}DA63d,SC:U),Z,0,0)] T:Ftests$SI_GEN_PTR[({0}S:S$u8$0$0({3}DA3d,SC:U),Z,0,0)({0}S:S$gptr$0$0({3}ST__00000000:S),Z,0,0)] T:Ftests$__00000000[({0}S:S$memtype$0$0({1}SC:U),Z,0,0)({1}S:S$address$0$0({2}STSI_UU16:S),Z,0,0)] T:Ftests$__00000010[({0}S:S$bits$0$0({1}ST__00000011:S),Z,0,0)({0}S:S$c$0$0({1}SC:U),Z,0,0)] T:Ftests$__00000001[({0}S:S$bmRequestType$0$0({1}ST__00000002:S),Z,0,0)({1}S:S$bRequest$0$0({1}SC:U),Z,0,0)({2}S:S$wValue$0$0({2}SI:U),Z,0,0)({4}S:S$wIndex$0$0({2}SI:U),Z,0,0)({6}S:S$wLength$0$0({2}SI:U),Z,0,0)] T:Ftests$__00000011[({0}S:S$callback$0$0({1}SB0$1:U),Z,0,0)({0}S:S$outPacketPending$0$0({1}SB1$1:U),Z,0,0)({0}S:S$inPacketPending$0$0({1}SB2$1:U),Z,0,0)({0}S:S$waitForRead$0$0({1}SB3$1:U),Z,0,0)] T:Ftests$__00000002[({0}S:S$Recipient$0$0({1}SB0$5:U),Z,0,0)({0}S:S$Type$0$0({1}SB5$2:U),Z,0,0)({0}S:S$Direction$0$0({1}SB7$1:U),Z,0,0)] T:Ftests$__00000012[({0}S:S$configurationValue$0$0({1}SC:U),Z,0,0)({1}S:S$numberOfStrings$0$0({1}SC:U),Z,0,0)({2}S:S$state$0$0({1}SC:U),Z,0,0)({3}S:S$savedState$0$0({1}SC:U),Z,0,0)({4}S:S$setup$0$0({8}ST__00000001:S),Z,0,0)({12}S:S$ep0String$0$0({1}ST__00000013:S),Z,0,0)({13}S:S$ep0$0$0({7}ST__00000009:S),Z,0,0)({20}S:S$ep1in$0$0({7}ST__00000009:S),Z,0,0)({27}S:S$ep1out$0$0({7}ST__00000009:S),Z,0,0)({34}S:S$deviceDescriptor$0$0({3}DG,ST__00000004:S),Z,0,0)({37}S:S$configDescriptor$0$0({3}DG,ST__00000005:S),Z,0,0)({40}S:S$stringDescriptors$0$0({3}DG,DG,DG,SC:U),Z,0,0)] T:Ftests$__00000003[({0}S:S$setup$0$0({8}ST__00000001:S),Z,0,0)({0}S:S$c$0$0({8}DA8d,SC:U),Z,0,0)({0}S:S$i$0$0({8}DA4d,SI:U),Z,0,0)] T:Ftests$__00000013[({0}S:S$encoding$0$0({1}ST__00000014:S),Z,0,0)({0}S:S$c$0$0({1}SC:U),Z,0,0)] T:Ftests$__00000004[({0}S:S$bLength$0$0({1}SC:U),Z,0,0)({1}S:S$bDescriptorType$0$0({1}SC:U),Z,0,0)({2}S:S$bcdUSB$0$0({2}SI:U),Z,0,0)({4}S:S$bDeviceClass$0$0({1}SC:U),Z,0,0)({5}S:S$bDeviceSubClass$0$0({1}SC:U),Z,0,0)({6}S:S$bDeviceProtocol$0$0({1}SC:U),Z,0,0)({7}S:S$bMaxPacketSize0$0$0({1}SC:U),Z,0,0)({8}S:S$idVendor$0$0({2}SI:U),Z,0,0)({10}S:S$idProduct$0$0({2}SI:U),Z,0,0)({12}S:S$bcdDevice$0$0({2}SI:U),Z,0,0)({14}S:S$iManufacturer$0$0({1}SC:U),Z,0,0)({15}S:S$iProduct$0$0({1}SC:U),Z,0,0)({16}S:S$iSerialNumber$0$0({1}SC:U),Z,0,0)({17}S:S$bNumConfigurations$0$0({1}SC:U),Z,0,0)] T:Ftests$__00000014[({0}S:S$type$0$0({1}SB0$7:U),Z,0,0)({0}S:S$init$0$0({1}SB7$1:U),Z,0,0)] T:Ftests$__00000005[({0}S:S$bLength$0$0({1}SC:U),Z,0,0)({1}S:S$bDescriptorType$0$0({1}SC:U),Z,0,0)({2}S:S$wTotalLength$0$0({2}SI:U),Z,0,0)({4}S:S$bNumInterfaces$0$0({1}SC:U),Z,0,0)({5}S:S$bConfigurationValue$0$0({1}SC:U),Z,0,0)({6}S:S$iConfiguration$0$0({1}SC:U),Z,0,0)({7}S:S$bmAttributes$0$0({1}SC:U),Z,0,0)({8}S:S$bMaxPower$0$0({1}SC:U),Z,0,0)] T:Ftests$__00000015[({0}S:S$init$0$0({60}ST__00000016:S),Z,0,0)({0}S:S$cont$0$0({60}ST__00000017:S),Z,0,0)] T:Ftests$__00000006[({0}S:S$bLength$0$0({1}SC:U),Z,0,0)({1}S:S$bDescriptorType$0$0({1}SC:U),Z,0,0)({2}S:S$bInterfaceNumber$0$0({1}SC:U),Z,0,0)({3}S:S$bAlternateSetting$0$0({1}SC:U),Z,0,0)({4}S:S$bNumEndpoints$0$0({1}SC:U),Z,0,0)({5}S:S$bInterfaceClass$0$0({1}SC:U),Z,0,0)({6}S:S$bInterfaceSubClass$0$0({1}SC:U),Z,0,0)({7}S:S$bInterfaceProtocol$0$0({1}SC:U),Z,0,0)({8}S:S$iInterface$0$0({1}SC:U),Z,0,0)] T:Ftests$__00000016[({0}S:S$cmd$0$0({1}SC:U),Z,0,0)({1}S:S$bcnth$0$0({1}SC:U),Z,0,0)({2}S:S$bcntl$0$0({1}SC:U),Z,0,0)({3}S:S$payload$0$0({57}DA57d,SC:U),Z,0,0)] T:Ftests$__00000007[({0}S:S$bLength$0$0({1}SC:U),Z,0,0)({1}S:S$bDescriptorType$0$0({1}SC:U),Z,0,0)({2}S:S$bEndpointAddress$0$0({1}SC:U),Z,0,0)({3}S:S$bmAttributes$0$0({1}SC:U),Z,0,0)({4}S:S$wMaxPacketSize$0$0({2}SI:U),Z,0,0)({6}S:S$bInterval$0$0({1}SC:U),Z,0,0)] T:Ftests$__00000017[({0}S:S$seq$0$0({1}SC:U),Z,0,0)({1}S:S$payload$0$0({59}DA59d,SC:U),Z,0,0)] T:Ftests$__00000008[({0}S:S$deviceDescriptor$0$0({3}DG,ST__00000004:S),Z,0,0)({3}S:S$configDescriptor$0$0({3}DG,SC:U),Z,0,0)({6}S:S$stringDescriptors$0$0({3}DG,DG,DG,SC:U),Z,0,0)({9}S:S$numberOfStrings$0$0({1}SC:U),Z,0,0)] T:Ftests$u2f_hid_msg[({0}S:S$cid$0$0({4}SL:U),Z,0,0)({4}S:S$pkt$0$0({60}ST__00000015:S),Z,0,0)] T:Ftests$__00000009[({0}S:S$buf$0$0({3}DG,SC:U),Z,0,0)({3}S:S$remaining$0$0({2}SI:U),Z,0,0)({5}S:S$state$0$0({1}SC:U),Z,0,0)({6}S:S$misc$0$0({1}ST__00000010:S),Z,0,0)] T:Ftests$APP_DATA[({0}S:S$tmp$0$0({70}DA70d,SC:U),Z,0,0)] T:Ftests$atecc_key_config[({0}S:S$private$0$0({1}SB0$1:U),Z,0,0)({0}S:S$pubinfo$0$0({1}SB1$1:U),Z,0,0)({0}S:S$keytype$0$0({1}SB2$3:U),Z,0,0)({0}S:S$lockable$0$0({1}SB5$1:U),Z,0,0)({0}S:S$reqrandom$0$0({1}SB6$1:U),Z,0,0)({0}S:S$reqauth$0$0({1}SB7$1:U),Z,0,0)({1}S:S$authkey$0$0({1}SB0$4:U),Z,0,0)({1}S:S$intrusiondisable$0$0({1}SB4$1:U),Z,0,0)({1}S:S$rfu$0$0({1}SB5$1:U),Z,0,0)({1}S:S$x509id$0$0({1}SB6$2:U),Z,0,0)] T:Ftests$u2f_hid_init_response[({0}S:S$cid$0$0({4}SL:U),Z,0,0)({4}S:S$version_id$0$0({1}SC:U),Z,0,0)({5}S:S$version_major$0$0({1}SC:U),Z,0,0)({6}S:S$version_minor$0$0({1}SC:U),Z,0,0)({7}S:S$version_build$0$0({1}SC:U),Z,0,0)({8}S:S$cflags$0$0({1}SC:U),Z,0,0)] T:Ftests$smb_interrupt_interface[({0}S:S$addr$0$0({1}SC:U),Z,0,0)({1}S:S$crc$0$0({2}SI:U),Z,0,0)({3}S:S$crc_offset$0$0({1}SC:U),Z,0,0)({4}S:S$write_buf$0$0({3}DG,SC:U),Z,0,0)({7}S:S$write_len$0$0({1}SC:U),Z,0,0)({8}S:S$write_offset$0$0({1}SC:U),Z,0,0)({9}S:S$read_len$0$0({1}SC:U),Z,0,0)({10}S:S$read_offset$0$0({1}SC:U),Z,0,0)({11}S:S$read_buf$0$0({3}DG,SC:U),Z,0,0)({14}S:S$write_ext_buf$0$0({3}DG,SC:U),Z,0,0)({17}S:S$write_ext_len$0$0({1}SC:U),Z,0,0)({18}S:S$write_ext_offset$0$0({1}SC:U),Z,0,0)({19}S:S$preflags$0$0({1}SC:U),Z,0,0)] T:Ftests$atecc_response[({0}S:S$len$0$0({1}SC:U),Z,0,0)({1}S:S$buf$0$0({3}DG,SC:U),Z,0,0)] T:Ftests$atecc_slot_config[({0}S:S$readkey$0$0({1}SB0$4:U),Z,0,0)({0}S:S$nomac$0$0({1}SB4$1:U),Z,0,0)({0}S:S$limiteduse$0$0({1}SB5$1:U),Z,0,0)({0}S:S$encread$0$0({1}SB6$1:U),Z,0,0)({0}S:S$secret$0$0({1}SB7$1:U),Z,0,0)({1}S:S$writekey$0$0({1}SB0$4:U),Z,0,0)({1}S:S$writeconfig$0$0({1}SB4$4:U),Z,0,0)] S:G$appdata$0$0({70}STAPP_DATA:S),E,0,0 S:G$_MS_$0$0({4}SL:U),E,0,0 S:G$SMB_addr$0$0({1}SC:U),E,0,0 S:G$SMB_write_len$0$0({1}SC:U),E,0,0 S:G$SMB_write_offset$0$0({1}SC:U),E,0,0 S:G$SMB_read_len$0$0({1}SC:U),E,0,0 S:G$SMB_read_offset$0$0({1}SC:U),E,0,0 S:G$SMB_write_ext_len$0$0({1}SC:U),E,0,0 S:G$SMB_write_ext_offset$0$0({1}SC:U),E,0,0 S:G$SMB_crc_offset$0$0({1}SC:U),E,0,0 S:G$SMB_FLAGS$0$0({1}SC:U),E,0,0 S:G$hidmsgbuf$0$0({64}DA64d,SC:U),F,0,0 S:G$myUsbDevice$0$0({43}ST__00000012:S),F,0,0 S:G$SMB_write_buf$0$0({3}DG,SC:U),F,0,0 S:G$SMB_read_buf$0$0({3}DG,SC:U),F,0,0 S:G$SMB_write_ext_buf$0$0({3}DG,SC:U),F,0,0 S:G$SMB_preflags$0$0({1}SC:U),F,0,0 S:G$SMB_crc$0$0({2}SI:U),F,0,0 S:G$ACC$0$0({1}SC:U),I,0,0 S:G$ADC0AC$0$0({1}SC:U),I,0,0 S:G$ADC0CF$0$0({1}SC:U),I,0,0 S:G$ADC0CN0$0$0({1}SC:U),I,0,0 S:G$ADC0CN1$0$0({1}SC:U),I,0,0 S:G$ADC0GTH$0$0({1}SC:U),I,0,0 S:G$ADC0GTL$0$0({1}SC:U),I,0,0 S:G$ADC0H$0$0({1}SC:U),I,0,0 S:G$ADC0L$0$0({1}SC:U),I,0,0 S:G$ADC0LTH$0$0({1}SC:U),I,0,0 S:G$ADC0LTL$0$0({1}SC:U),I,0,0 S:G$ADC0MX$0$0({1}SC:U),I,0,0 S:G$ADC0PWR$0$0({1}SC:U),I,0,0 S:G$ADC0TK$0$0({1}SC:U),I,0,0 S:G$B$0$0({1}SC:U),I,0,0 S:G$CKCON0$0$0({1}SC:U),I,0,0 S:G$CKCON1$0$0({1}SC:U),I,0,0 S:G$CLKSEL$0$0({1}SC:U),I,0,0 S:G$CMP0CN0$0$0({1}SC:U),I,0,0 S:G$CMP0CN1$0$0({1}SC:U),I,0,0 S:G$CMP0MD$0$0({1}SC:U),I,0,0 S:G$CMP0MX$0$0({1}SC:U),I,0,0 S:G$CMP1CN0$0$0({1}SC:U),I,0,0 S:G$CMP1CN1$0$0({1}SC:U),I,0,0 S:G$CMP1MD$0$0({1}SC:U),I,0,0 S:G$CMP1MX$0$0({1}SC:U),I,0,0 S:G$CRC0CN0$0$0({1}SC:U),I,0,0 S:G$CRC0CN1$0$0({1}SC:U),I,0,0 S:G$CRC0CNT$0$0({1}SC:U),I,0,0 S:G$CRC0DAT$0$0({1}SC:U),I,0,0 S:G$CRC0FLIP$0$0({1}SC:U),I,0,0 S:G$CRC0IN$0$0({1}SC:U),I,0,0 S:G$CRC0ST$0$0({1}SC:U),I,0,0 S:G$DERIVID$0$0({1}SC:U),I,0,0 S:G$DEVICEID$0$0({1}SC:U),I,0,0 S:G$DPH$0$0({1}SC:U),I,0,0 S:G$DPL$0$0({1}SC:U),I,0,0 S:G$EIE1$0$0({1}SC:U),I,0,0 S:G$EIE2$0$0({1}SC:U),I,0,0 S:G$EIP1$0$0({1}SC:U),I,0,0 S:G$EIP1H$0$0({1}SC:U),I,0,0 S:G$EIP2$0$0({1}SC:U),I,0,0 S:G$EIP2H$0$0({1}SC:U),I,0,0 S:G$EMI0CN$0$0({1}SC:U),I,0,0 S:G$FLKEY$0$0({1}SC:U),I,0,0 S:G$HFO0CAL$0$0({1}SC:U),I,0,0 S:G$HFO1CAL$0$0({1}SC:U),I,0,0 S:G$HFOCN$0$0({1}SC:U),I,0,0 S:G$I2C0CN0$0$0({1}SC:U),I,0,0 S:G$I2C0DIN$0$0({1}SC:U),I,0,0 S:G$I2C0DOUT$0$0({1}SC:U),I,0,0 S:G$I2C0FCN0$0$0({1}SC:U),I,0,0 S:G$I2C0FCN1$0$0({1}SC:U),I,0,0 S:G$I2C0FCT$0$0({1}SC:U),I,0,0 S:G$I2C0SLAD$0$0({1}SC:U),I,0,0 S:G$I2C0STAT$0$0({1}SC:U),I,0,0 S:G$IE$0$0({1}SC:U),I,0,0 S:G$IP$0$0({1}SC:U),I,0,0 S:G$IPH$0$0({1}SC:U),I,0,0 S:G$IT01CF$0$0({1}SC:U),I,0,0 S:G$LFO0CN$0$0({1}SC:U),I,0,0 S:G$P0$0$0({1}SC:U),I,0,0 S:G$P0MASK$0$0({1}SC:U),I,0,0 S:G$P0MAT$0$0({1}SC:U),I,0,0 S:G$P0MDIN$0$0({1}SC:U),I,0,0 S:G$P0MDOUT$0$0({1}SC:U),I,0,0 S:G$P0SKIP$0$0({1}SC:U),I,0,0 S:G$P1$0$0({1}SC:U),I,0,0 S:G$P1MASK$0$0({1}SC:U),I,0,0 S:G$P1MAT$0$0({1}SC:U),I,0,0 S:G$P1MDIN$0$0({1}SC:U),I,0,0 S:G$P1MDOUT$0$0({1}SC:U),I,0,0 S:G$P1SKIP$0$0({1}SC:U),I,0,0 S:G$P2$0$0({1}SC:U),I,0,0 S:G$P2MASK$0$0({1}SC:U),I,0,0 S:G$P2MAT$0$0({1}SC:U),I,0,0 S:G$P2MDIN$0$0({1}SC:U),I,0,0 S:G$P2MDOUT$0$0({1}SC:U),I,0,0 S:G$P2SKIP$0$0({1}SC:U),I,0,0 S:G$P3$0$0({1}SC:U),I,0,0 S:G$P3MDIN$0$0({1}SC:U),I,0,0 S:G$P3MDOUT$0$0({1}SC:U),I,0,0 S:G$PCA0CENT$0$0({1}SC:U),I,0,0 S:G$PCA0CLR$0$0({1}SC:U),I,0,0 S:G$PCA0CN0$0$0({1}SC:U),I,0,0 S:G$PCA0CPH0$0$0({1}SC:U),I,0,0 S:G$PCA0CPH1$0$0({1}SC:U),I,0,0 S:G$PCA0CPH2$0$0({1}SC:U),I,0,0 S:G$PCA0CPL0$0$0({1}SC:U),I,0,0 S:G$PCA0CPL1$0$0({1}SC:U),I,0,0 S:G$PCA0CPL2$0$0({1}SC:U),I,0,0 S:G$PCA0CPM0$0$0({1}SC:U),I,0,0 S:G$PCA0CPM1$0$0({1}SC:U),I,0,0 S:G$PCA0CPM2$0$0({1}SC:U),I,0,0 S:G$PCA0H$0$0({1}SC:U),I,0,0 S:G$PCA0L$0$0({1}SC:U),I,0,0 S:G$PCA0MD$0$0({1}SC:U),I,0,0 S:G$PCA0POL$0$0({1}SC:U),I,0,0 S:G$PCA0PWM$0$0({1}SC:U),I,0,0 S:G$PCON0$0$0({1}SC:U),I,0,0 S:G$PCON1$0$0({1}SC:U),I,0,0 S:G$PFE0CN$0$0({1}SC:U),I,0,0 S:G$PRTDRV$0$0({1}SC:U),I,0,0 S:G$PSCTL$0$0({1}SC:U),I,0,0 S:G$PSW$0$0({1}SC:U),I,0,0 S:G$REF0CN$0$0({1}SC:U),I,0,0 S:G$REG0CN$0$0({1}SC:U),I,0,0 S:G$REG1CN$0$0({1}SC:U),I,0,0 S:G$REVID$0$0({1}SC:U),I,0,0 S:G$RSTSRC$0$0({1}SC:U),I,0,0 S:G$SBCON1$0$0({1}SC:U),I,0,0 S:G$SBRLH1$0$0({1}SC:U),I,0,0 S:G$SBRLL1$0$0({1}SC:U),I,0,0 S:G$SBUF0$0$0({1}SC:U),I,0,0 S:G$SBUF1$0$0({1}SC:U),I,0,0 S:G$SCON0$0$0({1}SC:U),I,0,0 S:G$SCON1$0$0({1}SC:U),I,0,0 S:G$SFRPAGE$0$0({1}SC:U),I,0,0 S:G$SFRPGCN$0$0({1}SC:U),I,0,0 S:G$SFRSTACK$0$0({1}SC:U),I,0,0 S:G$SMB0ADM$0$0({1}SC:U),I,0,0 S:G$SMB0ADR$0$0({1}SC:U),I,0,0 S:G$SMB0CF$0$0({1}SC:U),I,0,0 S:G$SMB0CN0$0$0({1}SC:U),I,0,0 S:G$SMB0DAT$0$0({1}SC:U),I,0,0 S:G$SMB0FCN0$0$0({1}SC:U),I,0,0 S:G$SMB0FCN1$0$0({1}SC:U),I,0,0 S:G$SMB0FCT$0$0({1}SC:U),I,0,0 S:G$SMB0RXLN$0$0({1}SC:U),I,0,0 S:G$SMB0TC$0$0({1}SC:U),I,0,0 S:G$SMOD1$0$0({1}SC:U),I,0,0 S:G$SP$0$0({1}SC:U),I,0,0 S:G$SPI0CFG$0$0({1}SC:U),I,0,0 S:G$SPI0CKR$0$0({1}SC:U),I,0,0 S:G$SPI0CN0$0$0({1}SC:U),I,0,0 S:G$SPI0DAT$0$0({1}SC:U),I,0,0 S:G$SPI0FCN0$0$0({1}SC:U),I,0,0 S:G$SPI0FCN1$0$0({1}SC:U),I,0,0 S:G$SPI0FCT$0$0({1}SC:U),I,0,0 S:G$TCON$0$0({1}SC:U),I,0,0 S:G$TH0$0$0({1}SC:U),I,0,0 S:G$TH1$0$0({1}SC:U),I,0,0 S:G$TL0$0$0({1}SC:U),I,0,0 S:G$TL1$0$0({1}SC:U),I,0,0 S:G$TMOD$0$0({1}SC:U),I,0,0 S:G$TMR2CN0$0$0({1}SC:U),I,0,0 S:G$TMR2CN1$0$0({1}SC:U),I,0,0 S:G$TMR2H$0$0({1}SC:U),I,0,0 S:G$TMR2L$0$0({1}SC:U),I,0,0 S:G$TMR2RLH$0$0({1}SC:U),I,0,0 S:G$TMR2RLL$0$0({1}SC:U),I,0,0 S:G$TMR3CN0$0$0({1}SC:U),I,0,0 S:G$TMR3CN1$0$0({1}SC:U),I,0,0 S:G$TMR3H$0$0({1}SC:U),I,0,0 S:G$TMR3L$0$0({1}SC:U),I,0,0 S:G$TMR3RLH$0$0({1}SC:U),I,0,0 S:G$TMR3RLL$0$0({1}SC:U),I,0,0 S:G$TMR4CN0$0$0({1}SC:U),I,0,0 S:G$TMR4CN1$0$0({1}SC:U),I,0,0 S:G$TMR4H$0$0({1}SC:U),I,0,0 S:G$TMR4L$0$0({1}SC:U),I,0,0 S:G$TMR4RLH$0$0({1}SC:U),I,0,0 S:G$TMR4RLL$0$0({1}SC:U),I,0,0 S:G$UART1FCN0$0$0({1}SC:U),I,0,0 S:G$UART1FCN1$0$0({1}SC:U),I,0,0 S:G$UART1FCT$0$0({1}SC:U),I,0,0 S:G$UART1LIN$0$0({1}SC:U),I,0,0 S:G$USB0ADR$0$0({1}SC:U),I,0,0 S:G$USB0AEC$0$0({1}SC:U),I,0,0 S:G$USB0CDCF$0$0({1}SC:U),I,0,0 S:G$USB0CDCN$0$0({1}SC:U),I,0,0 S:G$USB0CDSTA$0$0({1}SC:U),I,0,0 S:G$USB0CF$0$0({1}SC:U),I,0,0 S:G$USB0DAT$0$0({1}SC:U),I,0,0 S:G$USB0XCN$0$0({1}SC:U),I,0,0 S:G$VDM0CN$0$0({1}SC:U),I,0,0 S:G$WDTCN$0$0({1}SC:U),I,0,0 S:G$XBR0$0$0({1}SC:U),I,0,0 S:G$XBR1$0$0({1}SC:U),I,0,0 S:G$XBR2$0$0({1}SC:U),I,0,0 S:G$ADC0GT$0$0({2}SI:U),I,0,0 S:G$ADC0$0$0({2}SI:U),I,0,0 S:G$ADC0LT$0$0({2}SI:U),I,0,0 S:G$DP$0$0({2}SI:U),I,0,0 S:G$PCA0CP0$0$0({2}SI:U),I,0,0 S:G$PCA0CP1$0$0({2}SI:U),I,0,0 S:G$PCA0CP2$0$0({2}SI:U),I,0,0 S:G$PCA0$0$0({2}SI:U),I,0,0 S:G$SBRL1$0$0({2}SI:U),I,0,0 S:G$TMR2$0$0({2}SI:U),I,0,0 S:G$TMR2RL$0$0({2}SI:U),I,0,0 S:G$TMR3$0$0({2}SI:U),I,0,0 S:G$TMR3RL$0$0({2}SI:U),I,0,0 S:G$TMR4$0$0({2}SI:U),I,0,0 S:G$TMR4RL$0$0({2}SI:U),I,0,0 S:G$_XPAGE$0$0({1}SC:U),I,0,0 S:G$ACC_ACC0$0$0({1}SX:U),J,0,0 S:G$ACC_ACC1$0$0({1}SX:U),J,0,0 S:G$ACC_ACC2$0$0({1}SX:U),J,0,0 S:G$ACC_ACC3$0$0({1}SX:U),J,0,0 S:G$ACC_ACC4$0$0({1}SX:U),J,0,0 S:G$ACC_ACC5$0$0({1}SX:U),J,0,0 S:G$ACC_ACC6$0$0({1}SX:U),J,0,0 S:G$ACC_ACC7$0$0({1}SX:U),J,0,0 S:G$ADC0CN0_ADCM0$0$0({1}SX:U),J,0,0 S:G$ADC0CN0_ADCM1$0$0({1}SX:U),J,0,0 S:G$ADC0CN0_ADCM2$0$0({1}SX:U),J,0,0 S:G$ADC0CN0_ADWINT$0$0({1}SX:U),J,0,0 S:G$ADC0CN0_ADBUSY$0$0({1}SX:U),J,0,0 S:G$ADC0CN0_ADINT$0$0({1}SX:U),J,0,0 S:G$ADC0CN0_ADBMEN$0$0({1}SX:U),J,0,0 S:G$ADC0CN0_ADEN$0$0({1}SX:U),J,0,0 S:G$B_B0$0$0({1}SX:U),J,0,0 S:G$B_B1$0$0({1}SX:U),J,0,0 S:G$B_B2$0$0({1}SX:U),J,0,0 S:G$B_B3$0$0({1}SX:U),J,0,0 S:G$B_B4$0$0({1}SX:U),J,0,0 S:G$B_B5$0$0({1}SX:U),J,0,0 S:G$B_B6$0$0({1}SX:U),J,0,0 S:G$B_B7$0$0({1}SX:U),J,0,0 S:G$IE_EX0$0$0({1}SX:U),J,0,0 S:G$IE_ET0$0$0({1}SX:U),J,0,0 S:G$IE_EX1$0$0({1}SX:U),J,0,0 S:G$IE_ET1$0$0({1}SX:U),J,0,0 S:G$IE_ES0$0$0({1}SX:U),J,0,0 S:G$IE_ET2$0$0({1}SX:U),J,0,0 S:G$IE_ESPI0$0$0({1}SX:U),J,0,0 S:G$IE_EA$0$0({1}SX:U),J,0,0 S:G$IP_PX0$0$0({1}SX:U),J,0,0 S:G$IP_PT0$0$0({1}SX:U),J,0,0 S:G$IP_PX1$0$0({1}SX:U),J,0,0 S:G$IP_PT1$0$0({1}SX:U),J,0,0 S:G$IP_PS0$0$0({1}SX:U),J,0,0 S:G$IP_PT2$0$0({1}SX:U),J,0,0 S:G$IP_PSPI0$0$0({1}SX:U),J,0,0 S:G$P0_B0$0$0({1}SX:U),J,0,0 S:G$P0_B1$0$0({1}SX:U),J,0,0 S:G$P0_B2$0$0({1}SX:U),J,0,0 S:G$P0_B3$0$0({1}SX:U),J,0,0 S:G$P0_B4$0$0({1}SX:U),J,0,0 S:G$P0_B5$0$0({1}SX:U),J,0,0 S:G$P0_B6$0$0({1}SX:U),J,0,0 S:G$P0_B7$0$0({1}SX:U),J,0,0 S:G$P1_B0$0$0({1}SX:U),J,0,0 S:G$P1_B1$0$0({1}SX:U),J,0,0 S:G$P1_B2$0$0({1}SX:U),J,0,0 S:G$P1_B3$0$0({1}SX:U),J,0,0 S:G$P1_B4$0$0({1}SX:U),J,0,0 S:G$P1_B5$0$0({1}SX:U),J,0,0 S:G$P1_B6$0$0({1}SX:U),J,0,0 S:G$P1_B7$0$0({1}SX:U),J,0,0 S:G$P2_B0$0$0({1}SX:U),J,0,0 S:G$P2_B1$0$0({1}SX:U),J,0,0 S:G$P2_B2$0$0({1}SX:U),J,0,0 S:G$P2_B3$0$0({1}SX:U),J,0,0 S:G$P3_B0$0$0({1}SX:U),J,0,0 S:G$P3_B1$0$0({1}SX:U),J,0,0 S:G$PCA0CN0_CCF0$0$0({1}SX:U),J,0,0 S:G$PCA0CN0_CCF1$0$0({1}SX:U),J,0,0 S:G$PCA0CN0_CCF2$0$0({1}SX:U),J,0,0 S:G$PCA0CN0_CR$0$0({1}SX:U),J,0,0 S:G$PCA0CN0_CF$0$0({1}SX:U),J,0,0 S:G$PSW_PARITY$0$0({1}SX:U),J,0,0 S:G$PSW_F1$0$0({1}SX:U),J,0,0 S:G$PSW_OV$0$0({1}SX:U),J,0,0 S:G$PSW_RS0$0$0({1}SX:U),J,0,0 S:G$PSW_RS1$0$0({1}SX:U),J,0,0 S:G$PSW_F0$0$0({1}SX:U),J,0,0 S:G$PSW_AC$0$0({1}SX:U),J,0,0 S:G$PSW_CY$0$0({1}SX:U),J,0,0 S:G$SCON0_RI$0$0({1}SX:U),J,0,0 S:G$SCON0_TI$0$0({1}SX:U),J,0,0 S:G$SCON0_RB8$0$0({1}SX:U),J,0,0 S:G$SCON0_TB8$0$0({1}SX:U),J,0,0 S:G$SCON0_REN$0$0({1}SX:U),J,0,0 S:G$SCON0_MCE$0$0({1}SX:U),J,0,0 S:G$SCON0_SMODE$0$0({1}SX:U),J,0,0 S:G$SCON1_RI$0$0({1}SX:U),J,0,0 S:G$SCON1_TI$0$0({1}SX:U),J,0,0 S:G$SCON1_RBX$0$0({1}SX:U),J,0,0 S:G$SCON1_TBX$0$0({1}SX:U),J,0,0 S:G$SCON1_REN$0$0({1}SX:U),J,0,0 S:G$SCON1_PERR$0$0({1}SX:U),J,0,0 S:G$SCON1_OVR$0$0({1}SX:U),J,0,0 S:G$SMB0CN0_SI$0$0({1}SX:U),J,0,0 S:G$SMB0CN0_ACK$0$0({1}SX:U),J,0,0 S:G$SMB0CN0_ARBLOST$0$0({1}SX:U),J,0,0 S:G$SMB0CN0_ACKRQ$0$0({1}SX:U),J,0,0 S:G$SMB0CN0_STO$0$0({1}SX:U),J,0,0 S:G$SMB0CN0_STA$0$0({1}SX:U),J,0,0 S:G$SMB0CN0_TXMODE$0$0({1}SX:U),J,0,0 S:G$SMB0CN0_MASTER$0$0({1}SX:U),J,0,0 S:G$SPI0CN0_SPIEN$0$0({1}SX:U),J,0,0 S:G$SPI0CN0_TXNF$0$0({1}SX:U),J,0,0 S:G$SPI0CN0_NSSMD0$0$0({1}SX:U),J,0,0 S:G$SPI0CN0_NSSMD1$0$0({1}SX:U),J,0,0 S:G$SPI0CN0_RXOVRN$0$0({1}SX:U),J,0,0 S:G$SPI0CN0_MODF$0$0({1}SX:U),J,0,0 S:G$SPI0CN0_WCOL$0$0({1}SX:U),J,0,0 S:G$SPI0CN0_SPIF$0$0({1}SX:U),J,0,0 S:G$TCON_IT0$0$0({1}SX:U),J,0,0 S:G$TCON_IE0$0$0({1}SX:U),J,0,0 S:G$TCON_IT1$0$0({1}SX:U),J,0,0 S:G$TCON_IE1$0$0({1}SX:U),J,0,0 S:G$TCON_TR0$0$0({1}SX:U),J,0,0 S:G$TCON_TF0$0$0({1}SX:U),J,0,0 S:G$TCON_TR1$0$0({1}SX:U),J,0,0 S:G$TCON_TF1$0$0({1}SX:U),J,0,0 S:G$TMR2CN0_T2XCLK0$0$0({1}SX:U),J,0,0 S:G$TMR2CN0_T2XCLK1$0$0({1}SX:U),J,0,0 S:G$TMR2CN0_TR2$0$0({1}SX:U),J,0,0 S:G$TMR2CN0_T2SPLIT$0$0({1}SX:U),J,0,0 S:G$TMR2CN0_TF2CEN$0$0({1}SX:U),J,0,0 S:G$TMR2CN0_TF2LEN$0$0({1}SX:U),J,0,0 S:G$TMR2CN0_TF2L$0$0({1}SX:U),J,0,0 S:G$TMR2CN0_TF2H$0$0({1}SX:U),J,0,0 S:G$TMR4CN0_T4XCLK0$0$0({1}SX:U),J,0,0 S:G$TMR4CN0_T4XCLK1$0$0({1}SX:U),J,0,0 S:G$TMR4CN0_TR4$0$0({1}SX:U),J,0,0 S:G$TMR4CN0_T4SPLIT$0$0({1}SX:U),J,0,0 S:G$TMR4CN0_TF4CEN$0$0({1}SX:U),J,0,0 S:G$TMR4CN0_TF4LEN$0$0({1}SX:U),J,0,0 S:G$TMR4CN0_TF4L$0$0({1}SX:U),J,0,0 S:G$TMR4CN0_TF4H$0$0({1}SX:U),J,0,0 S:G$UART1FCN1_RIE$0$0({1}SX:U),J,0,0 S:G$UART1FCN1_RXTO0$0$0({1}SX:U),J,0,0 S:G$UART1FCN1_RXTO1$0$0({1}SX:U),J,0,0 S:G$UART1FCN1_RFRQ$0$0({1}SX:U),J,0,0 S:G$UART1FCN1_TIE$0$0({1}SX:U),J,0,0 S:G$UART1FCN1_TXHOLD$0$0({1}SX:U),J,0,0 S:G$UART1FCN1_TXNF$0$0({1}SX:U),J,0,0 S:G$UART1FCN1_TFRQ$0$0({1}SX:U),J,0,0 S:G$U2F_BUTTON$0$0({1}SX:U),J,0,0 S:G$U2F_BUTTON_VAL$0$0({1}SX:U),J,0,0 S:G$U2F_RED$0$0({1}SX:U),J,0,0 S:G$U2F_GREEN$0$0({1}SX:U),J,0,0 S:G$U2F_BLUE$0$0({1}SX:U),J,0,0 S:G$_print_format$0$0({2}DF,SI:S),C,0,0 S:G$printf_small$0$0({2}DF,SV:S),C,0,0 S:G$printf$0$0({2}DF,SI:S),C,0,0 S:G$vprintf$0$0({2}DF,SI:S),C,0,0 S:G$sprintf$0$0({2}DF,SI:S),C,0,0 S:G$vsprintf$0$0({2}DF,SI:S),C,0,0 S:G$puts$0$0({2}DF,SI:S),C,0,0 S:G$getchar$0$0({2}DF,SC:U),C,0,0 S:G$putchar$0$0({2}DF,SV:S),C,0,0 S:G$printf_fast$0$0({2}DF,SV:S),C,0,0 S:G$printf_fast_f$0$0({2}DF,SV:S),C,0,0 S:G$printf_tiny$0$0({2}DF,SV:S),C,0,0 S:G$atof$0$0({2}DF,SF:S),C,0,0 S:G$atoi$0$0({2}DF,SI:S),C,0,0 S:G$atol$0$0({2}DF,SL:S),C,0,0 S:G$_uitoa$0$0({2}DF,SV:S),C,0,0 S:G$_itoa$0$0({2}DF,SV:S),C,0,0 S:G$_ultoa$0$0({2}DF,SV:S),C,0,0 S:G$_ltoa$0$0({2}DF,SV:S),C,0,0 S:G$rand$0$0({2}DF,SI:S),C,0,0 S:G$srand$0$0({2}DF,SV:S),C,0,0 S:G$calloc$0$0({2}DF,DX,SV:S),C,0,0 S:G$malloc$0$0({2}DF,DX,SV:S),C,0,0 S:G$realloc$0$0({2}DF,DX,SV:S),C,0,0 S:G$aligned_alloc$0$0({2}DF,DG,SV:S),C,0,2 S:G$free$0$0({2}DF,SV:S),C,0,0 S:G$abs$0$0({2}DF,SI:S),C,0,0 S:G$labs$0$0({2}DF,SL:S),C,0,0 S:G$mblen$0$0({2}DF,SI:S),C,0,0 S:G$mbtowc$0$0({2}DF,SI:S),C,0,0 S:G$wctomb$0$0({2}DF,SI:S),C,0,0 S:G$memcpy$0$0({2}DF,DG,SV:S),C,0,0 S:G$memmove$0$0({2}DF,DG,SV:S),C,0,0 S:G$strcpy$0$0({2}DF,DG,SC:U),C,0,0 S:G$strncpy$0$0({2}DF,DG,SC:U),C,0,0 S:G$strcat$0$0({2}DF,DG,SC:U),C,0,0 S:G$strncat$0$0({2}DF,DG,SC:U),C,0,0 S:G$memcmp$0$0({2}DF,SI:S),C,0,0 S:G$strcmp$0$0({2}DF,SI:S),C,0,0 S:G$strncmp$0$0({2}DF,SI:S),C,0,0 S:G$strxfrm$0$0({2}DF,SI:U),C,0,0 S:G$memchr$0$0({2}DF,DG,SV:S),C,0,0 S:G$strchr$0$0({2}DF,DG,SC:U),C,0,0 S:G$strcspn$0$0({2}DF,SI:U),C,0,0 S:G$strpbrk$0$0({2}DF,DG,SC:U),C,0,0 S:G$strrchr$0$0({2}DF,DG,SC:U),C,0,0 S:G$strspn$0$0({2}DF,SI:U),C,0,0 S:G$strstr$0$0({2}DF,DG,SC:U),C,0,0 S:G$strtok$0$0({2}DF,DG,SC:U),C,0,0 S:G$memset$0$0({2}DF,DG,SV:S),C,0,0 S:G$strlen$0$0({2}DF,SI:U),C,0,0 S:G$USBD_SetUsbState$0$0({2}DF,SV:S),C,0,0 S:G$USBDCH9_SetupCmd$0$0({2}DF,SC:U),C,0,0 S:G$USBD_AbortAllTransfers$0$0({2}DF,SV:S),C,0,0 S:G$USBD_AbortTransfer$0$0({2}DF,SC:S),C,0,0 S:G$USBD_Connect$0$0({2}DF,SV:S),C,0,0 S:G$USBD_Disconnect$0$0({2}DF,SV:S),C,0,0 S:G$USBD_EpIsBusy$0$0({2}DF,SB0$1:U),C,0,0 S:G$USBD_GetUsbState$0$0({2}DF,SC:U),C,0,0 S:G$USBD_Init$0$0({2}DF,SC:S),C,0,0 S:G$USBD_Read$0$0({2}DF,SC:S),C,0,0 S:G$USBD_RemoteWakeup$0$0({2}DF,SC:S),C,0,0 S:G$USBD_StallEp$0$0({2}DF,SC:S),C,0,0 S:G$USBD_Stop$0$0({2}DF,SV:S),C,0,0 S:G$USBD_Suspend$0$0({2}DF,SV:S),C,0,0 S:G$USBD_UnStallEp$0$0({2}DF,SC:S),C,0,0 S:G$USBD_Write$0$0({2}DF,SC:S),C,0,0 S:G$USBD_EnterHandler$0$0({2}DF,SV:S),C,0,0 S:G$USBD_ExitHandler$0$0({2}DF,SV:S),C,0,0 S:G$USBD_ResetCb$0$0({2}DF,SV:S),C,0,0 S:G$USBD_SofCb$0$0({2}DF,SV:S),C,0,0 S:G$USBD_DeviceStateChangeCb$0$0({2}DF,SV:S),C,0,0 S:G$USBD_IsSelfPoweredCb$0$0({2}DF,SB0$1:U),C,0,0 S:G$USBD_SetupCmdCb$0$0({2}DF,SC:U),C,0,0 S:G$USBD_SetInterfaceCb$0$0({2}DF,SC:U),C,0,0 S:G$USBD_RemoteWakeupCb$0$0({2}DF,SB0$1:U),C,0,0 S:G$USBD_RemoteWakeupDelay$0$0({2}DF,SV:S),C,0,0 S:G$USBD_Run$0$0({2}DF,SV:S),C,0,0 S:G$USBD_XferCompleteCb$0$0({2}DF,SI:U),C,0,0 S:G$USB_ReadFIFO$0$0({2}DF,SV:S),C,0,0 S:G$USB_WriteFIFO$0$0({2}DF,SV:S),C,0,0 S:G$USB_GetIntsEnabled$0$0({2}DF,SB0$1:U),C,0,0 S:G$USB_IsRegulatorEnabled$0$0({2}DF,SB0$1:U),C,0,0 S:G$USB_IsPrefetchEnabled$0$0({2}DF,SB0$1:U),C,0,0 S:G$USB_SuspendOscillator$0$0({2}DF,SV:S),C,0,0 S:G$USB_SetIndex$0$0({2}DF,SV:S),C,0,0 S:G$USB_GetCommonInts$0$0({2}DF,SC:U),C,0,0 S:G$USB_GetInInts$0$0({2}DF,SC:U),C,0,0 S:G$USB_GetOutInts$0$0({2}DF,SC:U),C,0,0 S:G$USB_GetIndex$0$0({2}DF,SC:U),C,0,0 S:G$USB_IsSuspended$0$0({2}DF,SB0$1:U),C,0,0 S:G$USB_GetSetupEnd$0$0({2}DF,SB0$1:U),C,0,0 S:G$USB_Ep0SentStall$0$0({2}DF,SB0$1:U),C,0,0 S:G$USB_Ep0InPacketReady$0$0({2}DF,SB0$1:U),C,0,0 S:G$USB_Ep0OutPacketReady$0$0({2}DF,SB0$1:U),C,0,0 S:G$USB_Ep0GetCount$0$0({2}DF,SC:U),C,0,0 S:G$USB_EpnInGetSentStall$0$0({2}DF,SB0$1:U),C,0,0 S:G$USB_EpnGetInPacketReady$0$0({2}DF,SB0$1:U),C,0,0 S:G$USB_EpnOutGetSentStall$0$0({2}DF,SB0$1:U),C,0,0 S:G$USB_EpnGetOutPacketReady$0$0({2}DF,SB0$1:U),C,0,0 S:G$USB_EpOutGetCount$0$0({2}DF,SI:U),C,0,0 S:G$USB_GetSofNumber$0$0({2}DF,SI:U),C,0,0 S:G$USB_AbortInEp$0$0({2}DF,SV:S),C,0,0 S:G$USB_AbortOutEp$0$0({2}DF,SV:S),C,0,0 S:G$USB_ActivateEp$0$0({2}DF,SV:S),C,0,0 S:G$u2f_hid_init$0$0({2}DF,SV:S),C,0,0 S:G$u2f_hid_set_len$0$0({2}DF,SV:S),C,0,0 S:G$u2f_hid_writeback$0$0({2}DF,SV:S),C,0,0 S:G$u2f_hid_flush$0$0({2}DF,SV:S),C,0,0 S:G$u2f_hid_request$0$0({2}DF,SV:S),C,0,0 S:G$u2f_hid_check_timeouts$0$0({2}DF,SV:S),C,0,0 S:G$u2f_print_hid_check_timeouts$0$0({2}DF,SV:S),C,0,0 S:G$set_app_u2f_hid_msg$0$0({2}DF,SV:S),C,0,0 S:G$set_app_error$0$0({2}DF,SV:S),C,0,0 S:G$get_app_error$0$0({2}DF,SC:U),C,0,0 S:G$get_app_state$0$0({2}DF,SC:U),C,0,0 S:G$set_app_state$0$0({2}DF,SV:S),C,0,0 S:G$rgb$0$0({2}DF,SV:S),C,0,0 S:G$app_wink$0$0({2}DF,SV:S),C,0,0 S:G$u2f_init$0$0({2}DF,SV:S),C,0,0 S:G$u2f_wipe_keys$0$0({2}DF,SC:S),C,0,0 S:G$u2f_delay$0$0({2}DF,SV:S),C,0,0 S:G$usb_write$0$0({2}DF,SV:S),C,0,0 S:G$putf$0$0({2}DF,SV:S),C,0,0 S:G$dump_hex$0$0({2}DF,SV:S),C,0,0 S:G$u2f_prints$0$0({2}DF,SV:S),C,0,0 S:G$__int2strn$0$0({2}DF,DG,SC:U),C,0,0 S:G$u2f_putd$0$0({2}DF,SV:S),C,0,0 S:G$u2f_putx$0$0({2}DF,SV:S),C,0,0 S:G$u2f_printd$0$0({2}DF,SV:S),C,0,0 S:G$u2f_printx$0$0({2}DF,SV:S),C,0,0 S:G$u2f_printb$0$0({2}DF,SV:S),C,0,0 S:G$u2f_printlx$0$0({2}DF,SV:S),C,0,0 S:G$smb_init$0$0({2}DF,SV:S),C,0,0 S:G$smb_read$0$0({2}DF,SC:U),C,0,0 S:G$smb_write$0$0({2}DF,SV:S),C,0,0 S:G$smb_set_ext_write$0$0({2}DF,SV:S),C,0,0 S:G$reverse_bits$0$0({2}DF,SI:U),C,0,0 S:G$feed_crc$0$0({2}DF,SI:U),C,0,0 S:G$atecc_idle$0$0({2}DF,SV:S),C,0,0 S:G$atecc_wake$0$0({2}DF,SV:S),C,0,0 S:G$atecc_sleep$0$0({2}DF,SV:S),C,0,0 S:G$atecc_send$0$0({2}DF,SC:S),C,0,0 S:G$atecc_recv$0$0({2}DF,SC:S),C,0,0 S:G$atecc_send_recv$0$0({2}DF,SC:S),C,0,0 S:G$atecc_write_eeprom$0$0({2}DF,SC:S),C,0,0 S:G$eeprom_init$0$0({2}DF,SV:S),C,0,0 S:G$eeprom_read$0$0({2}DF,SV:S),C,0,0 S:G$_eeprom_write$0$0({2}DF,SV:S),C,0,0 S:G$ReportDescriptor0$0$0({34}DA34d,SC:U),D,0,0 S:G$deviceDesc$0$0({0}DA0d,SC:U),D,0,0 S:G$configDesc$0$0({0}DA0d,SC:U),D,0,0 S:G$initstruct$0$0({10}ST__00000008:S),D,0,0 S:G$WMASK$0$0({0}DA0d,SC:U),D,0,0 S:G$RMASK$0$0({0}DA0d,SC:U),D,0,0
43.808824
582
0.606495
576b40fab9dd9b94d33f41cc4047129a583b2ae7
73
ads
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/discr8_pkg3.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/discr8_pkg3.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/discr8_pkg3.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
package Discr8_Pkg3 is function Value return Natural; end Discr8_Pkg3;
18.25
32
0.821918
1d0dda50761cf8ebd0356f9d69de1aaa3e430606
7,841
ads
Ada
include/sf-network-socketudp.ads
danva994/ASFML-1.6
bd74ae700843338a15aef295f99297b866aa0c93
[ "Zlib" ]
1
2017-10-07T06:20:38.000Z
2017-10-07T06:20:38.000Z
include/sf-network-socketudp.ads
danva994/ASFML-1.6
bd74ae700843338a15aef295f99297b866aa0c93
[ "Zlib" ]
3
2020-09-15T21:19:34.000Z
2022-03-02T23:13:46.000Z
include/sf-network-socketudp.ads
danva994/ASFML-1.6
bd74ae700843338a15aef295f99297b866aa0c93
[ "Zlib" ]
2
2020-09-26T21:16:43.000Z
2022-01-16T19:36:48.000Z
-- //////////////////////////////////////////////////////////// -- // -- // SFML - Simple and Fast Multimedia Library -- // Copyright (C) 2007-2009 Laurent Gomila ([email protected]) -- // -- // 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. -- // -- //////////////////////////////////////////////////////////// -- //////////////////////////////////////////////////////////// -- // Headers -- //////////////////////////////////////////////////////////// with Sf.Config; with Sf.Network.IPAddress; with Sf.Network.SocketStatus; with Sf.Network.Types; package Sf.Network.SocketUDP is use Sf.Config; use Sf.Network.IPAddress; use Sf.Network.SocketStatus; use Sf.Network.Types; -- //////////////////////////////////////////////////////////// -- /// Construct a new UDP socket -- /// -- /// \return Pointer to the new socket -- /// -- //////////////////////////////////////////////////////////// function sfSocketUDP_Create return sfSocketUDP_Ptr; -- //////////////////////////////////////////////////////////// -- /// Destroy an existing UDP socket -- /// -- /// \param Socket : Socket to destroy -- /// -- //////////////////////////////////////////////////////////// procedure sfSocketUDP_Destroy (Socket : sfSocketUDP_Ptr); -- //////////////////////////////////////////////////////////// -- /// Change the blocking state of a UDP socket. -- /// The default behaviour of a socket is blocking -- /// -- /// \param Socket : Socket to modify -- /// \param Blocking : Pass sfTrue to set the socket as blocking, or false for non-blocking -- /// -- //////////////////////////////////////////////////////////// procedure sfSocketUDP_SetBlocking (Socket : sfSocketUDP_Ptr; Blocking : sfBool); -- //////////////////////////////////////////////////////////// -- /// Bind a socket to a specific port -- /// -- /// \param Socket : Socket to bind -- /// \param Port : Port to bind the socket to -- /// -- /// \return True if operation has been successful -- /// -- //////////////////////////////////////////////////////////// function sfSocketUDP_Bind (Socket : sfSocketUDP_Ptr; Port : sfUint16) return sfBool; -- //////////////////////////////////////////////////////////// -- /// Unbind a socket from its previous port, if any -- /// -- /// \param Socket : Socket to unbind -- /// -- /// \return sfTrue if operation has been successful -- /// -- //////////////////////////////////////////////////////////// function sfSocketUDP_Unbind (Socket : sfSocketUDP_Ptr) return sfBool; -- //////////////////////////////////////////////////////////// -- /// Send an array of bytes -- /// -- /// \param Socket : Socket to use for sending -- /// \param Data : Pointer to the bytes to send -- /// \param Size : Number of bytes to send -- /// \param Address : Address of the computer to send the packet to -- /// \param Port : Port to use for communication -- /// -- /// \return Socket status -- /// -- //////////////////////////////////////////////////////////// function sfSocketUDP_Send (Socket : sfSocketUDP_Ptr; Data : sfInt8_Ptr; Size : sfSize_t; Address : sfIPAddress; Port : sfUint16) return sfSocketStatus; -- //////////////////////////////////////////////////////////// -- /// Receive an array of bytes. -- /// This function is blocking, ie. it won't return before some -- /// bytes have been received -- /// -- /// \param Socket : Socket to use for receiving -- /// \param Data : Pointer to a byte array to fill (make sure it is big enough) -- /// \param MaxSize : Maximum number of bytes to read -- /// \param SizeReceived : Number of bytes received -- /// \param Address : Address of the computer which sent the data -- /// \param Port : Port on which the remote computer sent the data -- /// -- /// \return Socket status -- /// -- //////////////////////////////////////////////////////////// function sfSocketUDP_Receive (Socket : sfSocketUDP_Ptr; Data : sfInt8_Ptr; MaxSize : sfSize_t; SizeReceived : access sfSize_t; Address : access sfIPAddress; Port : access sfUint16) return sfSocketStatus; -- //////////////////////////////////////////////////////////// -- /// Send a packet of data -- /// -- /// \param Socket : Socket to use for sending -- /// \param Packet : Packet to send -- /// \param Address : Address of the computer to send the packet to -- /// \param Port : Port to use for communication -- /// -- /// \return Socket status -- /// -- //////////////////////////////////////////////////////////// function sfSocketUDP_SendPacket (Socket : sfSocketUDP_Ptr; Packet : sfPacket_Ptr; Address : sfIPAddress; Port : sfUint16) return sfSocketStatus; -- //////////////////////////////////////////////////////////// -- /// Receive a packet. -- /// This function is blocking, ie. it won't return before a -- /// packet is received -- /// -- /// \param Socket : Socket to use for receiving -- /// \param Packet : Packet to fill with received data -- /// \param Address : Address of the computer which sent the packet -- /// \param Port : Port on which the remote computer sent the data -- /// -- /// \return Socket status -- /// -- //////////////////////////////////////////////////////////// function sfSocketUDP_ReceivePacket (Socket : sfSocketUDP_Ptr; Packet : sfPacket_Ptr; Address : access sfIPAddress; Port : access sfUint16) return sfSocketStatus; -- //////////////////////////////////////////////////////////// -- /// Check if a socket is in a valid state ; this function -- /// can be called any time to check if the socket is OK -- /// -- /// \param Socket : Socket to check -- /// -- /// \return sfTrue if the socket is valid -- /// -- //////////////////////////////////////////////////////////// function sfSocketUDP_IsValid (Socket : sfSocketUDP_Ptr) return sfBool; private pragma Import (C, sfSocketUDP_Create, "sfSocketUDP_Create"); pragma Import (C, sfSocketUDP_Destroy, "sfSocketUDP_Destroy"); pragma Import (C, sfSocketUDP_SetBlocking, "sfSocketUDP_SetBlocking"); pragma Import (C, sfSocketUDP_Bind, "sfSocketUDP_Bind"); pragma Import (C, sfSocketUDP_Unbind, "sfSocketUDP_Unbind"); pragma Import (C, sfSocketUDP_Send, "sfSocketUDP_Send"); pragma Import (C, sfSocketUDP_Receive, "sfSocketUDP_Receive"); pragma Import (C, sfSocketUDP_SendPacket, "sfSocketUDP_SendPacket"); pragma Import (C, sfSocketUDP_ReceivePacket, "sfSocketUDP_ReceivePacket"); pragma Import (C, sfSocketUDP_IsValid, "sfSocketUDP_IsValid"); end Sf.Network.SocketUDP;
40.626943
104
0.508864
4113e7b380215915ed1da06167b8488207d2a77f
2,996
adb
Ada
source/slim-players-play_files_visiters.adb
reznikmm/slimp
acbbb895ba9c2a2dfb28e5065e630326ce958502
[ "MIT" ]
null
null
null
source/slim-players-play_files_visiters.adb
reznikmm/slimp
acbbb895ba9c2a2dfb28e5065e630326ce958502
[ "MIT" ]
null
null
null
source/slim-players-play_files_visiters.adb
reznikmm/slimp
acbbb895ba9c2a2dfb28e5065e630326ce958502
[ "MIT" ]
null
null
null
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Ada.Text_IO; with Slim.Messages.cont; package body Slim.Players.Play_Files_Visiters is ---------- -- BUTN -- ---------- overriding procedure BUTN (Self : in out Visiter; Message : not null access Slim.Messages.BUTN.BUTN_Message) is Player : Players.Player renames Self.Player.all; Button : constant Slim.Messages.BUTN.Button_Kind := Message.Button; begin case Button is when Slim.Messages.BUTN.Forward => Player.Play_Next_File; when Slim.Messages.BUTN.Rewind => Player.Play_Previous_File; when Slim.Messages.BUTN.Pause => Slim.Players.Common_Play_Visiters.Visiter (Self).BUTN (Message); if Player.State.Play_State.Paused then Player.Save_Position; end if; when others => Slim.Players.Common_Play_Visiters.Visiter (Self).BUTN (Message); end case; end BUTN; ---------- -- RESP -- ---------- overriding procedure RESP (Self : in out Visiter; Message : not null access Slim.Messages.RESP.RESP_Message) is pragma Unreferenced (Message); Player : Players.Player renames Self.Player.all; Cont : Slim.Messages.cont.Cont_Message; begin Cont.Set_Metaint (0); Write_Message (Player.Socket, Cont); end RESP; ---------- -- STAT -- ---------- overriding procedure STAT (Self : in out Visiter; Message : not null access Slim.Messages.STAT.STAT_Message) is Player : Players.Player renames Self.Player.all; begin Player.WiFi := Message.WiFi_Level; if Message.Event (1 .. 3) /= "STM" then return; elsif Message.Event = "STMd" then -- Decoder ready. Instruct server that we are ready for the next -- track (if any). Player.Play_Next_File (Immediate => False); elsif Message.Event = "STMu" then -- Underrun. Normal end of playback. Player.Stop; elsif Message.Event = "STMt" and then Player.State.Kind = Play_Files then Player.State.Play_State.Seconds := Message.Elapsed_Seconds; elsif not Player.State.Play_State.Current_Song.Is_Empty then null; elsif Message.Event = "STMc" then Player.State.Play_State.Current_Song.Clear; Player.State.Play_State.Current_Song.Append ("Connecting..."); elsif Message.Event = "STMe" then Player.State.Play_State.Current_Song.Clear; Player.State.Play_State.Current_Song.Append ("Connected"); end if; Slim.Players.Common_Play_Visiters.Update_Display (Player); if Message.Event /= "STMt" then Ada.Text_IO.Put_Line (Message.Event); end if; end STAT; end Slim.Players.Play_Files_Visiters;
29.96
76
0.612817
417c5960ec5249f3f0d80363760455520e85c947
9,280
adb
Ada
ada/src/avtas/lmcp/avtas-lmcp-bytebuffers.adb
joffreyhuguet/LmcpGen
3a75248e536f1147d9208ec021cc5105206c3477
[ "NASA-1.3" ]
null
null
null
ada/src/avtas/lmcp/avtas-lmcp-bytebuffers.adb
joffreyhuguet/LmcpGen
3a75248e536f1147d9208ec021cc5105206c3477
[ "NASA-1.3" ]
null
null
null
ada/src/avtas/lmcp/avtas-lmcp-bytebuffers.adb
joffreyhuguet/LmcpGen
3a75248e536f1147d9208ec021cc5105206c3477
[ "NASA-1.3" ]
null
null
null
with GNAT.Byte_Swapping; package body avtas.lmcp.byteBuffers is function To_Int16(Input : ByteArray2) return Int16_t is subtype sourceType is ByteArray2; subtype swapType is ByteArray2; subtype targetType is Int16_t; function Convert is new Ada.Unchecked_Conversion(Source => sourceType, Target => targetType); function SwapBytes is new GNAT.Byte_Swapping.Swapped2 (swapType); begin return Convert(SwapBytes(Input)); end To_Int16; function To_Int32(Input : ByteArray4) return Int32_t is subtype sourceType is ByteArray4; subtype swapType is ByteArray4; subtype targetType is Int32_t; function Convert is new Ada.Unchecked_Conversion(Source => sourceType, Target => targetType); function SwapBytes is new GNAT.Byte_Swapping.Swapped4 (swapType); begin return Convert(SwapBytes(Input)); end To_Int32; function To_Int64(Input : ByteArray8) return Int64_t is subtype sourceType is ByteArray8; subtype swapType is ByteArray8; subtype targetType is Int64_t; function Convert is new Ada.Unchecked_Conversion(Source => sourceType, Target => targetType); function SwapBytes is new GNAT.Byte_Swapping.Swapped8 (swapType); begin return Convert(SwapBytes(Input)); end To_Int64; function To_UInt16(Input : ByteArray2) return UInt16_t is subtype sourceType is ByteArray2; subtype swapType is ByteArray2; subtype targetType is UInt16_t; function Convert is new Ada.Unchecked_Conversion(Source => sourceType, Target => targetType); function SwapBytes is new GNAT.Byte_Swapping.Swapped2 (swapType); begin return Convert(SwapBytes(Input)); end To_UInt16; function To_UInt32(Input : ByteArray4) return UInt32_t is subtype sourceType is ByteArray4; subtype swapType is ByteArray4; subtype targetType is UInt32_t; function Convert is new Ada.Unchecked_Conversion(Source => sourceType, Target => targetType); function SwapBytes is new GNAT.Byte_Swapping.Swapped4 (swapType); begin return Convert(SwapBytes(Input)); end To_UInt32; function To_Float(Input : ByteArray4) return Float_t is subtype sourceType is ByteArray4; subtype swapType is ByteArray4; subtype targetType is Float_t; function Convert is new Ada.Unchecked_Conversion(Source => sourceType, Target => targetType); function SwapBytes is new GNAT.Byte_Swapping.Swapped4 (swapType); begin return Convert(SwapBytes(Input)); end To_Float; function To_Double(Input : ByteArray8) return Double_t is subtype sourceType is ByteArray8; subtype swapType is ByteArray8; subtype targetType is Double_t; function Convert is new Ada.Unchecked_Conversion(Source => sourceType, Target => targetType); function SwapBytes is new GNAT.Byte_Swapping.Swapped8 (swapType); begin return Convert(SwapBytes(Input)); end To_Double; function To_BooleanArray(Input : ByteArray) return BooleanArray is subtype sourceType is ByteArray(Input'Range); subtype targetType is BooleanArray(Input'Range); function convert is new Ada.Unchecked_Conversion(Source => sourceType, Target => targetType); begin return convert(Input); end To_BooleanArray; function To_Int16Array (Input : ByteArray) return Int16Array is subtype sourceType is ByteArray(Input'Range); subtype swapType is ByteArray(1 .. 2); subtype targetType is Int16Array(1 .. Input'Length/2); function convert is new Ada.Unchecked_Conversion(Source => sourceType, Target => targetType); function SwapBytes is new GNAT.Byte_Swapping.Swapped2 (swapType); tempArray : ByteArray := Input; begin for i in 1 .. tempArray'Length/2 loop tempArray(Nat(2*i - 1) .. Nat(2*i)) := SwapBytes(tempArray(Nat(2*i - 1) .. Nat(2*i))); end loop; return convert(tempArray); end To_Int16Array; function To_Int32Array (Input : ByteArray) return Int32Array is subtype sourceType is ByteArray(Input'Range); subtype swapType is ByteArray(1 .. 4); subtype targetType is Int32Array(1 .. Input'Length/4); function convert is new Ada.Unchecked_Conversion(Source => sourceType, Target => targetType); function SwapBytes is new GNAT.Byte_Swapping.Swapped4 (swapType); tempArray : ByteArray := Input; begin for i in 1 .. tempArray'Length/4 loop tempArray(Nat(4*i - 3) .. Nat(4*i)) := SwapBytes(tempArray(Nat(4*i - 3) .. Nat(4*i))); end loop; return convert(tempArray); end To_Int32Array; function To_Int64Array (Input : ByteArray) return Int64Array is subtype sourceType is ByteArray(Input'Range); subtype swapType is ByteArray(1 .. 8); subtype targetType is Int64Array(1 .. Input'Length/8); function convert is new Ada.Unchecked_Conversion(Source => sourceType, Target => targetType); function SwapBytes is new GNAT.Byte_Swapping.Swapped8 (swapType); tempArray : ByteArray := Input; begin for i in 1 .. tempArray'Length/8 loop tempArray(Nat(8*i - 7) .. Nat(8*i)) := SwapBytes(tempArray(Nat(8*i - 7) .. Nat(8*i))); end loop; return convert(tempArray); end To_Int64Array; function To_UInt16Array (Input : ByteArray) return UInt16Array is subtype sourceType is ByteArray(Input'Range); subtype swapType is ByteArray(1 .. 2); subtype targetType is UInt16Array(1 .. Input'Length/2); function convert is new Ada.Unchecked_Conversion(Source => sourceType, Target => targetType); function SwapBytes is new GNAT.Byte_Swapping.Swapped2 (swapType); tempArray : ByteArray := Input; begin for i in 1 .. tempArray'Length/2 loop tempArray(Nat(2*i - 1) .. Nat(2*i)) := SwapBytes(tempArray(Nat(2*i - 1) .. Nat(2*i))); end loop; return convert(tempArray); end To_UInt16Array; function To_UInt32Array (Input : ByteArray) return UInt32Array is subtype sourceType is ByteArray(Input'Range); subtype swapType is ByteArray(1 .. 4); subtype targetType is UInt32Array(1 .. Input'Length/4); function convert is new Ada.Unchecked_Conversion(Source => sourceType, Target => targetType); function SwapBytes is new GNAT.Byte_Swapping.Swapped4 (swapType); tempArray : ByteArray := Input; begin for i in 1 .. tempArray'Length/4 loop tempArray(Nat(4*i - 3) .. Nat(4*i)) := SwapBytes(tempArray(Nat(4*i - 3) .. Nat(4*i))); end loop; return convert(tempArray); end To_UInt32Array; function To_FloatArray(Input : ByteArray) return FloatArray is subtype sourceType is ByteArray(Input'Range); subtype swapType is ByteArray(1 .. 4); subtype targetType is FloatArray(1 .. Input'Length/4); function convert is new Ada.Unchecked_Conversion(Source => sourceType, Target => targetType); function SwapBytes is new GNAT.Byte_Swapping.Swapped4 (swapType); tempArray : ByteArray := Input; begin for i in 1 .. tempArray'Length/4 loop tempArray(Nat(4*i - 3) .. Nat(4*i)) := SwapBytes(tempArray(Nat(4*i - 3) .. Nat(4*i))); end loop; return convert(tempArray); end To_FloatArray; function To_DoubleArray(Input : ByteArray) return DoubleArray is subtype sourceType is ByteArray(Input'Range); subtype swapType is ByteArray(1 .. 8); subtype targetType is DoubleArray(1 .. Input'Length/8); function convert is new Ada.Unchecked_Conversion(Source => sourceType, Target => targetType); function SwapBytes is new GNAT.Byte_Swapping.Swapped8 (swapType); tempArray : ByteArray := Input; begin for i in 1 .. tempArray'Length/8 loop tempArray(Nat(8*i - 7) .. Nat(8*i)) := SwapBytes(tempArray(Nat(8*i - 7) .. Nat(8*i))); end loop; return convert(tempArray); end To_DoubleArray; function To_String(Input : ByteArray) return Unbounded_String is subtype sourceType is ByteArray(Input'Range); subtype targetType is Unbounded_String; function convert is new Ada.Unchecked_Conversion(Source => sourceType, Target => targetType); begin return convert(Input); end To_String; function To_StringArray(Input : ByteArray) return StringArray is arrayElements : UInt16_t := To_UInt16(ByteArray2(Input(1 .. 2))); position : UInt32_t := 3; stringLength : UInt16_t; tempString : Unbounded_String; output : StringArray(Nat(1) .. Nat(arrayElements)); function convert is new Ada.Unchecked_Conversion(Source => Byte, Target => Character); begin Put(arrayElements'Image); New_Line; for i in 1 .. arrayElements loop stringLength := To_UInt16(ByteArray2(Input(Nat(position) .. Nat(position + 1)))); Put(stringLength'Image); New_Line; tempString := To_Unbounded_String(""); position := position + 2; for j in 1 .. stringLength loop tempString := tempString & convert(Input(Nat(position) + Nat(j) - Nat(1))); end loop; position := position + UInt32_t(stringLength); output(Nat(i)) := tempString; end loop; return output; end To_StringArray; end avtas.lmcp.byteBuffers;
43.162791
99
0.690948
5751bd2269d050a48791b3a44175225a35b6dbac
9,316
ads
Ada
ada/rts/boards/i386/adainclude/system.ads
Schol-R-LEA/sarcos
5a9982766602ec1f4ef1e338682589eb5f343575
[ "Unlicense" ]
null
null
null
ada/rts/boards/i386/adainclude/system.ads
Schol-R-LEA/sarcos
5a9982766602ec1f4ef1e338682589eb5f343575
[ "Unlicense" ]
null
null
null
ada/rts/boards/i386/adainclude/system.ads
Schol-R-LEA/sarcos
5a9982766602ec1f4ef1e338682589eb5f343575
[ "Unlicense" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M -- -- -- -- S p e c -- -- (Compiler Version) -- -- -- -- Copyright (C) 1992-2019, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- -- apply solely to the contents of the part following the private keyword. -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ -- This version of System is a generic version that is used in building the -- compiler. Right now, we have a host/target problem if we try to use the -- "proper" System, and since the compiler itself does not care about most -- System parameters, this generic version works fine. pragma Restrictions (No_Implicit_Dynamic_Code); -- We want to avoid trampolines in the compiler, so it can be used in systems -- which prevent execution of code on the stack, e.g. in windows environments -- with DEP (Data Execution Protection) enabled. pragma Restrictions (No_Finalization); -- Use restriction No_Finalization to avoid pulling finalization (not allowed -- in GNAT) inside sem_spark.adb, when defining type Perm_Tree_Access as an -- access type on incomplete type Perm_Tree_Wrapper (which is required for -- defining a recursive type). package System is pragma Pure; -- Note that we take advantage of the implementation permission to make -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada -- 2005, this is Pure in any case (AI-362). pragma No_Elaboration_Code_All; -- Allow the use of that restriction in units that WITH this unit type Name is (SYSTEM_NAME_GNAT); System_Name : constant Name := SYSTEM_NAME_GNAT; -- System-Dependent Named Numbers Min_Int : constant := Long_Long_Integer'First; Max_Int : constant := Long_Long_Integer'Last; Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size; Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1; Max_Base_Digits : constant := Long_Long_Float'Digits; Max_Digits : constant := Long_Long_Float'Digits; Max_Mantissa : constant := 63; Fine_Delta : constant := 2.0 ** (-Max_Mantissa); Tick : constant := 0.01; -- Storage-related Declarations type Address is private; -- Note that we do NOT add pragma Preelaborable_Initialization in this -- version of System, since it is used for the compiler only, and typical -- earlier bootstrap compilers don't support this pragma. We don't need -- it in this context, so there is no problem in omitting it. Null_Address : constant Address; Storage_Unit : constant := Standard'Storage_Unit; Word_Size : constant := Standard'Word_Size; Memory_Size : constant := 2 ** Standard'Address_Size; -- Address comparison function "<" (Left, Right : Address) return Boolean; function "<=" (Left, Right : Address) return Boolean; function ">" (Left, Right : Address) return Boolean; function ">=" (Left, Right : Address) return Boolean; function "=" (Left, Right : Address) return Boolean; pragma Import (Intrinsic, "<"); pragma Import (Intrinsic, "<="); pragma Import (Intrinsic, ">"); pragma Import (Intrinsic, ">="); pragma Import (Intrinsic, "="); -- Other System-Dependent Declarations type Bit_Order is (High_Order_First, Low_Order_First); Default_Bit_Order : constant Bit_Order := Bit_Order'Val (Standard'Default_Bit_Order); pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning -- Priority-related Declarations (RM D.1) Max_Priority : constant Positive := 30; Max_Interrupt_Priority : constant Positive := 31; subtype Any_Priority is Integer range 0 .. 31; subtype Priority is Any_Priority range 0 .. 30; subtype Interrupt_Priority is Any_Priority range 31 .. 31; Default_Priority : constant Priority := 15; private Run_Time_Name : constant String := "Bare Bones Run Time"; type Address is mod Memory_Size; Null_Address : constant Address := 0; -------------------------------------- -- System Implementation Parameters -- -------------------------------------- -- These parameters provide information about the target that is used by -- the compiler. They are in the private part of System, where they can be -- accessed using the special circuitry in the Targparm unit whose source -- should be consulted for more detailed descriptions of the individual -- switch values. -- This version of system.ads is used only for building the compiler. -- We really ought to use the proper target system (i.e. the one that -- corresponds to the host for the compiler), but that causes as yet -- unsolved makefile problems. For the most part the setting of these -- parameters is not too critical for the compiler version (e.g. we -- do not use floating-point anyway in the compiler). AAMP : constant Boolean := False; Backend_Divide_Checks : constant Boolean := False; Backend_Overflow_Checks : constant Boolean := False; Command_Line_Args : constant Boolean := False; Configurable_Run_Time : constant Boolean := True; Denorm : constant Boolean := True; Duration_32_Bits : constant Boolean := False; Exit_Status_Supported : constant Boolean := False; Fractional_Fixed_Ops : constant Boolean := False; Frontend_Layout : constant Boolean := False; Machine_Overflows : constant Boolean := False; Machine_Rounds : constant Boolean := True; Preallocated_Stacks : constant Boolean := False; Signed_Zeros : constant Boolean := True; Stack_Check_Default : constant Boolean := False; Stack_Check_Probes : constant Boolean := False; Stack_Check_Limits : constant Boolean := False; Support_Aggregates : constant Boolean := True; Support_Composite_Assign : constant Boolean := True; Support_Composite_Compare : constant Boolean := True; Support_Long_Shifts : constant Boolean := True; Always_Compatible_Rep : constant Boolean := True; Suppress_Standard_Library : constant Boolean := True; Use_Ada_Main_Program_Name : constant Boolean := False; Frontend_Exceptions : constant Boolean := False; ZCX_By_Default : constant Boolean := False; -- Obsolete entries, to be removed eventually (bootstrap issues) Front_End_ZCX_Support : constant Boolean := False; High_Integrity_Mode : constant Boolean := False; Long_Shifts_Inlined : constant Boolean := True; Functions_Return_By_DSP : constant Boolean := False; Support_64_Bit_Divides : constant Boolean := True; GCC_ZCX_Support : constant Boolean := False; end System;
50.356757
79
0.589416
50292d28de77dd57724526b2324250f2d7104ec5
1,849
ads
Ada
src/counters/basic_counters.ads
jhumphry/auto_counters
bc7dfabf82febd09facf90371c8c11a628a06266
[ "0BSD" ]
5
2016-02-22T10:29:26.000Z
2021-12-18T08:20:12.000Z
src/counters/basic_counters.ads
jhumphry/auto_counters
bc7dfabf82febd09facf90371c8c11a628a06266
[ "0BSD" ]
1
2022-02-16T03:38:08.000Z
2022-02-20T21:11:30.000Z
src/counters/basic_counters.ads
jhumphry/auto_counters
bc7dfabf82febd09facf90371c8c11a628a06266
[ "0BSD" ]
null
null
null
-- basic_counters.ads -- Basic non-task safe counters for use with smart_ptrs -- Copyright (c) 2016, James Humphry -- -- 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. pragma Profile (No_Implementation_Extensions); with Counters_Spec; package Basic_Counters is type Counter is record SP_Count : Natural; WP_Count : Natural; end record; type Counter_Ptr is access Counter; function Make_New_Counter return Counter_Ptr; procedure Deallocate_If_Unused (C : in out Counter_Ptr) with Inline; function Use_Count (C : in Counter) return Natural is (C.SP_Count) with Inline; procedure Check_Increment_Use_Count (C : in out Counter) with Inline; procedure Decrement_Use_Count (C : in out Counter) with Inline; function Weak_Ptr_Count (C : in Counter) return Natural is (C.WP_Count) with Inline; procedure Increment_Weak_Ptr_Count (C : in out Counter) with Inline; procedure Decrement_Weak_Ptr_Count (C : in out Counter) with Inline; package Basic_Counters_Spec is new Counters_Spec(Counter => Counter, Counter_Ptr => Counter_Ptr); end Basic_Counters;
34.886792
80
0.738237
4194e01a7078b17c9530e3b48a7a079fdec2fda1
290
ads
Ada
specs/ada/server/ike/tkmrpc-operation_handlers-ike-cc_add_certificate.ads
DrenfongWong/tkm-rpc
075d22871cf81d497aac656c7f03a513278b641c
[ "BSD-3-Clause" ]
null
null
null
specs/ada/server/ike/tkmrpc-operation_handlers-ike-cc_add_certificate.ads
DrenfongWong/tkm-rpc
075d22871cf81d497aac656c7f03a513278b641c
[ "BSD-3-Clause" ]
null
null
null
specs/ada/server/ike/tkmrpc-operation_handlers-ike-cc_add_certificate.ads
DrenfongWong/tkm-rpc
075d22871cf81d497aac656c7f03a513278b641c
[ "BSD-3-Clause" ]
null
null
null
with Tkmrpc.Request; with Tkmrpc.Response; package Tkmrpc.Operation_Handlers.Ike.Cc_Add_Certificate is procedure Handle (Req : Request.Data_Type; Res : out Response.Data_Type); -- Handler for the cc_add_certificate operation. end Tkmrpc.Operation_Handlers.Ike.Cc_Add_Certificate;
29
76
0.806897
29cc7dc0cf53a8c7cdae0bed68f526226079507a
833
ads
Ada
src/screen_settings.ads
Robert-Tice/EmbeddedFractal
7c451cf8dc9d9b0844111cdef8dc64fc8c1cc703
[ "MIT" ]
null
null
null
src/screen_settings.ads
Robert-Tice/EmbeddedFractal
7c451cf8dc9d9b0844111cdef8dc64fc8c1cc703
[ "MIT" ]
null
null
null
src/screen_settings.ads
Robert-Tice/EmbeddedFractal
7c451cf8dc9d9b0844111cdef8dc64fc8c1cc703
[ "MIT" ]
2
2021-04-16T19:49:20.000Z
2021-05-03T15:54:27.000Z
with SAM.Device; with SAM.GPIO; with SAM.SPI; with FT801; package Screen_Settings is Screen_Width : constant := 480; Screen_Height : constant := 272; Header_Height : constant := 50; Button_Width : constant := 80; Image_Height : constant := Screen_Height - Header_Height; Image_Width : constant := Image_Height; Image_Pos_X : constant := (Screen_Width - Image_Width) / 2; Image_Pos_Y : constant := Header_Height; SPI_Port : SAM.SPI.SPI_Port renames SAM.Device.SPI_0_Cs1; Screen_Power_Down : SAM.GPIO.GPIO_Point renames SAM.Device.PA5; Screen : FT801.FT801_Device (Port => SPI_Port'Access, PD => Screen_Power_Down'Access); Screen_Cfg : FT801.Display_Settings := FT801.WQVGA_480x272; end Screen_Settings;
27.766667
71
0.653061
1d53814c70206736a2327e9e750481ac3786269a
1,692
adb
Ada
test/ctestc/src/generic_callback.adb
ficorax/PortAudioAda
565cf8a3ad4ec3f6cbe1ed2dae75f42d001f052e
[ "MIT" ]
2
2022-02-26T04:14:01.000Z
2022-03-07T09:57:25.000Z
test/ctestc/src/generic_callback.adb
ficorax/PortAudioAda
565cf8a3ad4ec3f6cbe1ed2dae75f42d001f052e
[ "MIT" ]
null
null
null
test/ctestc/src/generic_callback.adb
ficorax/PortAudioAda
565cf8a3ad4ec3f6cbe1ed2dae75f42d001f052e
[ "MIT" ]
null
null
null
with Interfaces.C; with System; package body Generic_Callback is function paMinLatCallback (inputBuffer : System.Address; outputBuffer : System.Address; framesPerBuffer : IC.unsigned_long; timeInfo : access PaStreamCallbackTimeInfo; statusFlags : PaStreamCallbackFlags; userData : System.Address) return PaStreamCallbackResult with Export => True, Convention => C; --------------------- -- PAA_Open_Stream -- --------------------- function PAA_Open_Stream (stream : access PaStream_Ptr; inputParameters : access PaStreamParameters; outputParameters : access PaStreamParameters; sampleRate : Long_Float; framesPerBuffer : Long_Integer; streamFlags : PaStreamFlags; pre : Pre_Callback; post : Post_Callback; userData : User_Data) return PaError is begin end PAA_Open_Stream; ---------------------- -- paMinLatCallback -- ---------------------- function paMinLatCallback (inputBuffer : System.Address; outputBuffer : System.Address; framesPerBuffer : Interfaces.C.unsigned_long; timeInfo : access PaStreamCallbackTimeInfo; statusFlags : PaStreamCallbackFlags; userData : System.Address) return PaStreamCallbackResult is begin for i in 1 .. Integer (framesPerBuffer) loop null; end loop; return paContinue; end paMinLatCallback; end Generic_Callback;
29.172414
58
0.562648
a1152bbd226bd2901cda3d834c6011311e3eabaf
30,027
adb
Ada
project/adl/arch/ARM/STM32/devices/stm32f42x/stm32-device.adb
corentingay/adaboy
68f08afa246c8255a42897376d375edcb4e2efc2
[ "MIT" ]
null
null
null
project/adl/arch/ARM/STM32/devices/stm32f42x/stm32-device.adb
corentingay/adaboy
68f08afa246c8255a42897376d375edcb4e2efc2
[ "MIT" ]
null
null
null
project/adl/arch/ARM/STM32/devices/stm32f42x/stm32-device.adb
corentingay/adaboy
68f08afa246c8255a42897376d375edcb4e2efc2
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015-2016, AdaCore -- -- -- -- 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 System; use System; pragma Warnings (Off, "* is an internal GNAT unit"); with System.BB.Parameters; pragma Warnings (On, "* is an internal GNAT unit"); with STM32_SVD.RCC; use STM32_SVD.RCC; package body STM32.Device is HSE_VALUE : constant UInt32 := UInt32 (System.BB.Parameters.HSE_Clock); -- External oscillator in Hz HSI_VALUE : constant := 16_000_000; -- Internal oscillator in Hz HPRE_Presc_Table : constant array (UInt4) of UInt32 := (1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 8, 16, 64, 128, 256, 512); PPRE_Presc_Table : constant array (UInt3) of UInt32 := (1, 1, 1, 1, 2, 4, 8, 16); ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : aliased in out GPIO_Port) is begin if This'Address = GPIOA_Base then RCC_Periph.AHB1ENR.GPIOAEN := True; elsif This'Address = GPIOB_Base then RCC_Periph.AHB1ENR.GPIOBEN := True; elsif This'Address = GPIOC_Base then RCC_Periph.AHB1ENR.GPIOCEN := True; elsif This'Address = GPIOD_Base then RCC_Periph.AHB1ENR.GPIODEN := True; elsif This'Address = GPIOE_Base then RCC_Periph.AHB1ENR.GPIOEEN := True; elsif This'Address = GPIOF_Base then RCC_Periph.AHB1ENR.GPIOFEN := True; elsif This'Address = GPIOG_Base then RCC_Periph.AHB1ENR.GPIOGEN := True; elsif This'Address = GPIOH_Base then RCC_Periph.AHB1ENR.GPIOHEN := True; elsif This'Address = GPIOI_Base then RCC_Periph.AHB1ENR.GPIOIEN := True; elsif This'Address = GPIOJ_Base then RCC_Periph.AHB1ENR.GPIOJEN := True; elsif This'Address = GPIOK_Base then RCC_Periph.AHB1ENR.GPIOKEN := True; else raise Unknown_Device; end if; end Enable_Clock; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (Point : GPIO_Point) is begin Enable_Clock (Point.Periph.all); end Enable_Clock; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (Points : GPIO_Points) is begin for Point of Points loop Enable_Clock (Point.Periph.all); end loop; end Enable_Clock; ----------- -- Reset -- ----------- procedure Reset (This : aliased in out GPIO_Port) is begin if This'Address = GPIOA_Base then RCC_Periph.AHB1RSTR.GPIOARST := True; RCC_Periph.AHB1RSTR.GPIOARST := False; elsif This'Address = GPIOB_Base then RCC_Periph.AHB1RSTR.GPIOBRST := True; RCC_Periph.AHB1RSTR.GPIOBRST := False; elsif This'Address = GPIOC_Base then RCC_Periph.AHB1RSTR.GPIOCRST := True; RCC_Periph.AHB1RSTR.GPIOCRST := False; elsif This'Address = GPIOD_Base then RCC_Periph.AHB1RSTR.GPIODRST := True; RCC_Periph.AHB1RSTR.GPIODRST := False; elsif This'Address = GPIOE_Base then RCC_Periph.AHB1RSTR.GPIOERST := True; RCC_Periph.AHB1RSTR.GPIOERST := False; elsif This'Address = GPIOF_Base then RCC_Periph.AHB1RSTR.GPIOFRST := True; RCC_Periph.AHB1RSTR.GPIOFRST := False; elsif This'Address = GPIOG_Base then RCC_Periph.AHB1RSTR.GPIOGRST := True; RCC_Periph.AHB1RSTR.GPIOGRST := False; elsif This'Address = GPIOH_Base then RCC_Periph.AHB1RSTR.GPIOHRST := True; RCC_Periph.AHB1RSTR.GPIOHRST := False; elsif This'Address = GPIOI_Base then RCC_Periph.AHB1RSTR.GPIOIRST := True; RCC_Periph.AHB1RSTR.GPIOIRST := False; elsif This'Address = GPIOJ_Base then RCC_Periph.AHB1RSTR.GPIOJRST := True; RCC_Periph.AHB1RSTR.GPIOJRST := False; elsif This'Address = GPIOK_Base then RCC_Periph.AHB1RSTR.GPIOKRST := True; RCC_Periph.AHB1RSTR.GPIOKRST := False; else raise Unknown_Device; end if; end Reset; ----------- -- Reset -- ----------- procedure Reset (Point : GPIO_Point) is begin Reset (Point.Periph.all); end Reset; ----------- -- Reset -- ----------- procedure Reset (Points : GPIO_Points) is Do_Reset : Boolean; begin for J in Points'Range loop Do_Reset := True; for K in Points'First .. J - 1 loop if Points (K).Periph = Points (J).Periph then Do_Reset := False; exit; end if; end loop; if Do_Reset then Reset (Points (J).Periph.all); end if; end loop; end Reset; ------------------------------ -- GPIO_Port_Representation -- ------------------------------ function GPIO_Port_Representation (Port : GPIO_Port) return UInt4 is begin -- TODO: rather ugly to have this board-specific range here if Port'Address = GPIOA_Base then return 0; elsif Port'Address = GPIOB_Base then return 1; elsif Port'Address = GPIOC_Base then return 2; elsif Port'Address = GPIOD_Base then return 3; elsif Port'Address = GPIOE_Base then return 4; elsif Port'Address = GPIOF_Base then return 5; elsif Port'Address = GPIOG_Base then return 6; elsif Port'Address = GPIOH_Base then return 7; elsif Port'Address = GPIOI_Base then return 8; elsif Port'Address = GPIOJ_Base then return 9; elsif Port'Address = GPIOK_Base then return 10; else raise Program_Error; end if; end GPIO_Port_Representation; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : aliased in out Analog_To_Digital_Converter) is begin if This'Address = ADC1_Base then RCC_Periph.APB2ENR.ADC1EN := True; elsif This'Address = ADC2_Base then RCC_Periph.APB2ENR.ADC2EN := True; elsif This'Address = ADC3_Base then RCC_Periph.APB2ENR.ADC3EN := True; else raise Unknown_Device; end if; end Enable_Clock; ------------------------- -- Reset_All_ADC_Units -- ------------------------- procedure Reset_All_ADC_Units is begin RCC_Periph.APB2RSTR.ADCRST := True; RCC_Periph.APB2RSTR.ADCRST := False; end Reset_All_ADC_Units; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : aliased in out Digital_To_Analog_Converter) is pragma Unreferenced (This); begin RCC_Periph.APB1ENR.DACEN := True; end Enable_Clock; ----------- -- Reset -- ----------- procedure Reset (This : aliased in out Digital_To_Analog_Converter) is pragma Unreferenced (This); begin RCC_Periph.APB1RSTR.DACRST := True; RCC_Periph.APB1RSTR.DACRST := False; end Reset; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : aliased in out USART) is begin if This.Periph.all'Address = USART1_Base then RCC_Periph.APB2ENR.USART1EN := True; elsif This.Periph.all'Address = USART2_Base then RCC_Periph.APB1ENR.USART2EN := True; elsif This.Periph.all'Address = USART3_Base then RCC_Periph.APB1ENR.USART3EN := True; elsif This.Periph.all'Address = UART4_Base then RCC_Periph.APB1ENR.UART4EN := True; elsif This.Periph.all'Address = UART5_Base then RCC_Periph.APB1ENR.UART5EN := True; elsif This.Periph.all'Address = USART6_Base then RCC_Periph.APB2ENR.USART6EN := True; elsif This.Periph.all'Address = UART7_Base then RCC_Periph.APB1ENR.UART7ENR := True; elsif This.Periph.all'Address = UART8_Base then RCC_Periph.APB1ENR.UART8ENR := True; else raise Unknown_Device; end if; end Enable_Clock; ----------- -- Reset -- ----------- procedure Reset (This : aliased in out USART) is begin if This.Periph.all'Address = USART1_Base then RCC_Periph.APB2RSTR.USART1RST := True; RCC_Periph.APB2RSTR.USART1RST := False; elsif This.Periph.all'Address = USART2_Base then RCC_Periph.APB1RSTR.UART2RST := True; RCC_Periph.APB1RSTR.UART2RST := False; elsif This.Periph.all'Address = USART3_Base then RCC_Periph.APB1RSTR.UART3RST := True; RCC_Periph.APB1RSTR.UART3RST := False; elsif This.Periph.all'Address = UART4_Base then RCC_Periph.APB1RSTR.UART4RST := True; RCC_Periph.APB1RSTR.UART4RST := False; elsif This.Periph.all'Address = UART5_Base then RCC_Periph.APB1RSTR.UART5RST := True; RCC_Periph.APB1RSTR.UART5RST := False; elsif This.Periph.all'Address = USART6_Base then RCC_Periph.APB2RSTR.USART6RST := True; RCC_Periph.APB2RSTR.USART6RST := False; elsif This.Periph.all'Address = UART7_Base then RCC_Periph.APB1RSTR.UART7RST := True; RCC_Periph.APB1RSTR.UART7RST := False; elsif This.Periph.all'Address = UART8_Base then RCC_Periph.APB1RSTR.UART8RST := True; RCC_Periph.APB1RSTR.UART8RST := False; else raise Unknown_Device; end if; end Reset; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : aliased in out DMA_Controller) is begin if This'Address = STM32_SVD.DMA1_Base then RCC_Periph.AHB1ENR.DMA1EN := True; elsif This'Address = STM32_SVD.DMA2_Base then RCC_Periph.AHB1ENR.DMA2EN := True; else raise Unknown_Device; end if; end Enable_Clock; ----------- -- Reset -- ----------- procedure Reset (This : aliased in out DMA_Controller) is begin if This'Address = STM32_SVD.DMA1_Base then RCC_Periph.AHB1RSTR.DMA1RST := True; RCC_Periph.AHB1RSTR.DMA1RST := False; elsif This'Address = STM32_SVD.DMA2_Base then RCC_Periph.AHB1RSTR.DMA2RST := True; RCC_Periph.AHB1RSTR.DMA2RST := False; else raise Unknown_Device; end if; end Reset; ---------------- -- As_Port_Id -- ---------------- function As_Port_Id (Port : I2C_Port'Class) return I2C_Port_Id is begin if Port.Periph.all'Address = I2C1_Base then return I2C_Id_1; elsif Port.Periph.all'Address = I2C2_Base then return I2C_Id_2; elsif Port.Periph.all'Address = I2C3_Base then return I2C_Id_3; else raise Unknown_Device; end if; end As_Port_Id; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : I2C_Port'Class) is begin Enable_Clock (As_Port_Id (This)); end Enable_Clock; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : I2C_Port_Id) is begin case This is when I2C_Id_1 => RCC_Periph.APB1ENR.I2C1EN := True; when I2C_Id_2 => RCC_Periph.APB1ENR.I2C2EN := True; when I2C_Id_3 => RCC_Periph.APB1ENR.I2C3EN := True; end case; end Enable_Clock; ----------- -- Reset -- ----------- procedure Reset (This : I2C_Port'Class) is begin Reset (As_Port_Id (This)); end Reset; ----------- -- Reset -- ----------- procedure Reset (This : I2C_Port_Id) is begin case This is when I2C_Id_1 => RCC_Periph.APB1RSTR.I2C1RST := True; RCC_Periph.APB1RSTR.I2C1RST := False; when I2C_Id_2 => RCC_Periph.APB1RSTR.I2C2RST := True; RCC_Periph.APB1RSTR.I2C2RST := False; when I2C_Id_3 => RCC_Periph.APB1RSTR.I2C3RST := True; RCC_Periph.APB1RSTR.I2C3RST := False; end case; end Reset; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : SPI_Port'Class) is begin if This.Periph.all'Address = SPI1_Base then RCC_Periph.APB2ENR.SPI1EN := True; elsif This.Periph.all'Address = SPI2_Base then RCC_Periph.APB1ENR.SPI2EN := True; elsif This.Periph.all'Address = SPI3_Base then RCC_Periph.APB1ENR.SPI3EN := True; elsif This.Periph.all'Address = SPI4_Base then RCC_Periph.APB2ENR.SPI4ENR := True; elsif This.Periph.all'Address = SPI5_Base then RCC_Periph.APB2ENR.SPI5ENR := True; elsif This.Periph.all'Address = SPI6_Base then RCC_Periph.APB2ENR.SPI6ENR := True; else raise Unknown_Device; end if; end Enable_Clock; ----------- -- Reset -- ----------- procedure Reset (This : SPI_Port'Class) is begin if This.Periph.all'Address = SPI1_Base then RCC_Periph.APB2RSTR.SPI1RST := True; RCC_Periph.APB2RSTR.SPI1RST := False; elsif This.Periph.all'Address = SPI2_Base then RCC_Periph.APB1RSTR.SPI2RST := True; RCC_Periph.APB1RSTR.SPI2RST := False; elsif This.Periph.all'Address = SPI3_Base then RCC_Periph.APB1RSTR.SPI3RST := True; RCC_Periph.APB1RSTR.SPI3RST := False; elsif This.Periph.all'Address = SPI4_Base then RCC_Periph.APB2RSTR.SPI4RST := True; RCC_Periph.APB2RSTR.SPI4RST := False; elsif This.Periph.all'Address = SPI5_Base then RCC_Periph.APB2RSTR.SPI5RST := True; RCC_Periph.APB2RSTR.SPI5RST := False; elsif This.Periph.all'Address = SPI6_Base then RCC_Periph.APB2RSTR.SPI6RST := True; RCC_Periph.APB2RSTR.SPI6RST := False; else raise Unknown_Device; end if; end Reset; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : I2S_Port) is begin if This.Periph.all'Address = SPI1_Base then RCC_Periph.APB2ENR.SPI1EN := True; elsif This.Periph.all'Address = SPI2_Base or else This.Periph.all'Address = I2S2ext_Base then RCC_Periph.APB1ENR.SPI2EN := True; elsif This.Periph.all'Address = SPI3_Base or else This.Periph.all'Address = I2S3ext_Base then RCC_Periph.APB1ENR.SPI3EN := True; elsif This.Periph.all'Address = SPI4_Base then RCC_Periph.APB2ENR.SPI5ENR := True; elsif This.Periph.all'Address = SPI5_Base then RCC_Periph.APB2ENR.SPI5ENR := True; elsif This.Periph.all'Address = SPI6_Base then RCC_Periph.APB2ENR.SPI6ENR := True; else raise Unknown_Device; end if; end Enable_Clock; ----------- -- Reset -- ----------- procedure Reset (This : in out I2S_Port) is begin if This.Periph.all'Address = SPI1_Base then RCC_Periph.APB2RSTR.SPI1RST := True; RCC_Periph.APB2RSTR.SPI1RST := False; elsif This.Periph.all'Address = SPI2_Base or else This.Periph.all'Address = I2S2ext_Base then RCC_Periph.APB1RSTR.SPI2RST := True; RCC_Periph.APB1RSTR.SPI2RST := False; elsif This.Periph.all'Address = SPI3_Base or else This.Periph.all'Address = I2S3ext_Base then RCC_Periph.APB1RSTR.SPI3RST := True; RCC_Periph.APB1RSTR.SPI3RST := False; elsif This.Periph.all'Address = SPI4_Base then RCC_Periph.APB2RSTR.SPI4RST := True; RCC_Periph.APB2RSTR.SPI4RST := False; elsif This.Periph.all'Address = SPI5_Base then RCC_Periph.APB2RSTR.SPI5RST := True; RCC_Periph.APB2RSTR.SPI5RST := False; elsif This.Periph.all'Address = SPI6_Base then RCC_Periph.APB2RSTR.SPI6RST := True; RCC_Periph.APB2RSTR.SPI6RST := False; else raise Unknown_Device; end if; end Reset; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : in out Timer) is begin if This'Address = TIM1_Base then RCC_Periph.APB2ENR.TIM1EN := True; elsif This'Address = TIM2_Base then RCC_Periph.APB1ENR.TIM2EN := True; elsif This'Address = TIM3_Base then RCC_Periph.APB1ENR.TIM3EN := True; elsif This'Address = TIM4_Base then RCC_Periph.APB1ENR.TIM4EN := True; elsif This'Address = TIM5_Base then RCC_Periph.APB1ENR.TIM5EN := True; elsif This'Address = TIM6_Base then RCC_Periph.APB1ENR.TIM6EN := True; elsif This'Address = TIM7_Base then RCC_Periph.APB1ENR.TIM7EN := True; elsif This'Address = TIM8_Base then RCC_Periph.APB2ENR.TIM8EN := True; elsif This'Address = TIM9_Base then RCC_Periph.APB2ENR.TIM9EN := True; elsif This'Address = TIM10_Base then RCC_Periph.APB2ENR.TIM10EN := True; elsif This'Address = TIM11_Base then RCC_Periph.APB2ENR.TIM11EN := True; elsif This'Address = TIM12_Base then RCC_Periph.APB1ENR.TIM12EN := True; elsif This'Address = TIM13_Base then RCC_Periph.APB1ENR.TIM13EN := True; elsif This'Address = TIM14_Base then RCC_Periph.APB1ENR.TIM14EN := True; else raise Unknown_Device; end if; end Enable_Clock; ----------- -- Reset -- ----------- procedure Reset (This : in out Timer) is begin if This'Address = TIM1_Base then RCC_Periph.APB2RSTR.TIM1RST := True; RCC_Periph.APB2RSTR.TIM1RST := False; elsif This'Address = TIM2_Base then RCC_Periph.APB1RSTR.TIM2RST := True; RCC_Periph.APB1RSTR.TIM2RST := False; elsif This'Address = TIM3_Base then RCC_Periph.APB1RSTR.TIM3RST := True; RCC_Periph.APB1RSTR.TIM3RST := False; elsif This'Address = TIM4_Base then RCC_Periph.APB1RSTR.TIM4RST := True; RCC_Periph.APB1RSTR.TIM4RST := False; elsif This'Address = TIM5_Base then RCC_Periph.APB1RSTR.TIM5RST := True; RCC_Periph.APB1RSTR.TIM5RST := False; elsif This'Address = TIM6_Base then RCC_Periph.APB1RSTR.TIM6RST := True; RCC_Periph.APB1RSTR.TIM6RST := False; elsif This'Address = TIM7_Base then RCC_Periph.APB1RSTR.TIM7RST := True; RCC_Periph.APB1RSTR.TIM7RST := False; elsif This'Address = TIM8_Base then RCC_Periph.APB2RSTR.TIM8RST := True; RCC_Periph.APB2RSTR.TIM8RST := False; elsif This'Address = TIM9_Base then RCC_Periph.APB2RSTR.TIM9RST := True; RCC_Periph.APB2RSTR.TIM9RST := False; elsif This'Address = TIM10_Base then RCC_Periph.APB2RSTR.TIM10RST := True; RCC_Periph.APB2RSTR.TIM10RST := False; elsif This'Address = TIM11_Base then RCC_Periph.APB2RSTR.TIM11RST := True; RCC_Periph.APB2RSTR.TIM11RST := False; elsif This'Address = TIM12_Base then RCC_Periph.APB1RSTR.TIM12RST := True; RCC_Periph.APB1RSTR.TIM12RST := False; elsif This'Address = TIM13_Base then RCC_Periph.APB1RSTR.TIM13RST := True; RCC_Periph.APB1RSTR.TIM13RST := False; elsif This'Address = TIM14_Base then RCC_Periph.APB1RSTR.TIM14RST := True; RCC_Periph.APB1RSTR.TIM14RST := False; else raise Unknown_Device; end if; end Reset; ------------------------------ -- System_Clock_Frequencies -- ------------------------------ function System_Clock_Frequencies return RCC_System_Clocks is Source : constant UInt2 := RCC_Periph.CFGR.SWS; Result : RCC_System_Clocks; begin Result.I2SCLK := 0; case Source is when 0 => -- HSI as source Result.SYSCLK := HSI_VALUE; when 1 => -- HSE as source Result.SYSCLK := HSE_VALUE; when 2 => -- PLL as source declare HSE_Source : constant Boolean := RCC_Periph.PLLCFGR.PLLSRC; Pllm : constant UInt32 := UInt32 (RCC_Periph.PLLCFGR.PLLM); Plln : constant UInt32 := UInt32 (RCC_Periph.PLLCFGR.PLLN); Pllp : constant UInt32 := (UInt32 (RCC_Periph.PLLCFGR.PLLP) + 1) * 2; Pllvco : UInt32; begin if not HSE_Source then Pllvco := HSI_VALUE; else Pllvco := HSE_VALUE; end if; Pllvco := Pllvco / Pllm; Result.I2SCLK := Pllvco; Pllvco := Pllvco * Plln; Result.SYSCLK := Pllvco / Pllp; end; when others => Result.SYSCLK := HSI_VALUE; end case; declare HPRE : constant UInt4 := RCC_Periph.CFGR.HPRE; PPRE1 : constant UInt3 := RCC_Periph.CFGR.PPRE.Arr (1); PPRE2 : constant UInt3 := RCC_Periph.CFGR.PPRE.Arr (2); begin Result.HCLK := Result.SYSCLK / HPRE_Presc_Table (HPRE); Result.PCLK1 := Result.HCLK / PPRE_Presc_Table (PPRE1); Result.PCLK2 := Result.HCLK / PPRE_Presc_Table (PPRE2); -- Timer clocks -- See Dedicated clock cfg register documentation. if not RCC_Periph.DCKCFGR.TIMPRE then -- Mode 0: -- If the APB prescaler (PPRE1, PPRE2 in the RCC_CFGR register) -- is configured to a division factor of 1, TIMxCLK = PCLKx. -- Otherwise, the timer clock frequencies are set to twice to the -- frequency of the APB domain to which the timers are connected : -- TIMxCLK = 2xPCLKx. if PPRE_Presc_Table (PPRE1) = 1 then Result.TIMCLK1 := Result.PCLK1; else Result.TIMCLK1 := Result.PCLK1 * 2; end if; if PPRE_Presc_Table (PPRE2) = 1 then Result.TIMCLK2 := Result.PCLK2; else Result.TIMCLK2 := Result.PCLK2 * 2; end if; else -- Mpde 1: -- If the APB prescaler (PPRE1, PPRE2 in the RCC_CFGR register) is -- configured to a division factor of 1, 2 or 4, TIMxCLK = HCLK. -- Otherwise, the timer clock frequencies are set to four times -- to the frequency of the APB domain to which the timers are -- connected : TIMxCLK = 4xPCLKx. if PPRE_Presc_Table (PPRE1) in 1 .. 4 then Result.TIMCLK1 := Result.HCLK; else Result.TIMCLK1 := Result.PCLK1 * 4; end if; if PPRE_Presc_Table (PPRE2) in 1 .. 4 then Result.TIMCLK2 := Result.HCLK; else Result.TIMCLK2 := Result.PCLK1 * 4; end if; end if; end; -- I2S Clock -- if RCC_Periph.CFGR.I2SSRC then -- External clock source Result.I2SCLK := 0; raise Program_Error with "External I2S clock value is unknown"; else -- Pll clock source declare Plli2sn : constant UInt32 := UInt32 (RCC_Periph.PLLI2SCFGR.PLLI2SN); Plli2sr : constant UInt32 := UInt32 (RCC_Periph.PLLI2SCFGR.PLLI2SR); begin Result.I2SCLK := (Result.I2SCLK * Plli2sn) / Plli2sr; end; end if; return Result; end System_Clock_Frequencies; -------------------- -- PLLI2S_Enabled -- -------------------- function PLLI2S_Enabled return Boolean is (RCC_Periph.CR.PLLI2SRDY); ------------------------ -- Set_PLLI2S_Factors -- ------------------------ procedure Set_PLLI2S_Factors (Pll_N : UInt9; Pll_R : UInt3) is begin RCC_Periph.PLLI2SCFGR.PLLI2SN := Pll_N; RCC_Periph.PLLI2SCFGR.PLLI2SR := Pll_R; end Set_PLLI2S_Factors; ------------------- -- Enable_PLLI2S -- ------------------- procedure Enable_PLLI2S is begin RCC_Periph.CR.PLLI2SON := True; loop exit when PLLI2S_Enabled; end loop; end Enable_PLLI2S; -------------------- -- Disable_PLLI2S -- -------------------- procedure Disable_PLLI2S is begin RCC_Periph.CR.PLLI2SON := False; loop exit when not PLLI2S_Enabled; end loop; end Disable_PLLI2S; ------------------ -- PLLSAI_Ready -- ------------------ function PLLSAI_Ready return Boolean is begin -- SHould be PLLSAIRDY, but not binded by the SVD file -- PLLSAIRDY: bit 29 return (RCC_Periph.CR.Reserved_28_31 and 2) /= 0; end PLLSAI_Ready; ------------------- -- Enable_PLLSAI -- ------------------- procedure Enable_PLLSAI is begin -- Should be PLLSAION, but not binded by the SVD file -- PLLSAION: bit 28 RCC_Periph.CR.Reserved_28_31 := RCC_Periph.CR.Reserved_28_31 or 1; -- Wait for PLLSAI activation loop exit when PLLSAI_Ready; end loop; end Enable_PLLSAI; ------------------- -- Enable_PLLSAI -- ------------------- procedure Disable_PLLSAI is begin -- Should be PLLSAION, but not binded by the SVD file -- PLLSAION: bit 28 RCC_Periph.CR.Reserved_28_31 := RCC_Periph.CR.Reserved_28_31 and not 1; end Disable_PLLSAI; ------------------------ -- Set_PLLSAI_Factors -- ------------------------ procedure Set_PLLSAI_Factors (LCD : UInt3; VCO : UInt9; DivR : PLLSAI_DivR) is PLLSAICFGR : PLLSAICFGR_Register; begin PLLSAICFGR.PLLSAIR := LCD; PLLSAICFGR.PLLSAIN := VCO; RCC_Periph.PLLSAICFGR := PLLSAICFGR; -- The exact bit name is device-specific RCC_Periph.DCKCFGR.PLLSAIDIVR := UInt2 (DivR); end Set_PLLSAI_Factors; ----------------------- -- Enable_DCMI_Clock -- ----------------------- procedure Enable_DCMI_Clock is begin RCC_Periph.AHB2ENR.DCMIEN := True; end Enable_DCMI_Clock; ---------------- -- Reset_DCMI -- ---------------- procedure Reset_DCMI is begin RCC_Periph.AHB2RSTR.DCMIRST := True; RCC_Periph.AHB2RSTR.DCMIRST := False; end Reset_DCMI; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : in out SDMMC_Controller) is begin if This.Periph.all'Address /= SDIO_Base then raise Unknown_Device; end if; RCC_Periph.APB2ENR.SDIOEN := True; end Enable_Clock; ----------- -- Reset -- ----------- procedure Reset (This : in out SDMMC_Controller) is begin if This.Periph.all'Address /= SDIO_Base then raise Unknown_Device; end if; RCC_Periph.APB2RSTR.SDIORST := True; RCC_Periph.APB2RSTR.SDIORST := False; end Reset; ------------------ -- Enable_Clock -- ------------------ procedure Enable_Clock (This : in out CRC_32) is pragma Unreferenced (This); begin RCC_Periph.AHB1ENR.CRCEN := True; end Enable_Clock; ------------------- -- Disable_Clock -- ------------------- procedure Disable_Clock (This : in out CRC_32) is pragma Unreferenced (This); begin RCC_Periph.AHB1ENR.CRCEN := False; end Disable_Clock; ----------- -- Reset -- ----------- procedure Reset (This : in out CRC_32) is pragma Unreferenced (This); begin RCC_Periph.AHB1RSTR.CRCRST := True; RCC_Periph.AHB1RSTR.CRCRST := False; end Reset; end STM32.Device;
31.875796
79
0.573617
4123badf73c628ea4474c8ce06059a7b56d83e50
4,557
adb
Ada
source/league/league-character_sets-internals.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/league/league-character_sets-internals.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/league/league-character_sets-internals.adb
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
4
2017-07-18T07:11:05.000Z
2020-06-21T03:02:25.000Z
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011, Vadim Godunko <[email protected]> -- -- 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: 2342 $ $Date: 2011-12-06 17:15:51 +0200 (Втр, 06 Дек 2011) $ ------------------------------------------------------------------------------ package body League.Character_Sets.Internals is use Matreshka.Internals.Code_Point_Sets; ------------ -- To_Set -- ------------ function To_Set (Flags : Matreshka.Internals.Regexps.General_Category_Flags) return Universal_Character_Set is Descriptor : constant Code_Point_Set_Descriptor := (General_Category, Flags); begin return Wrap (new Shared_Code_Point_Set'(To_Set (Descriptor))); end To_Set; ------------ -- To_Set -- ------------ function To_Set (Property : Matreshka.Internals.Unicode.Ucd.Boolean_Properties) return Universal_Character_Set is Descriptor : constant Code_Point_Set_Descriptor := (Binary, Property); begin return Wrap (new Shared_Code_Point_Set'(To_Set (Descriptor))); end To_Set; ---------- -- Wrap -- ---------- function Wrap (Data : not null Code_Point_Sets.Shared_Code_Point_Set_Access) return Universal_Character_Set is begin return Universal_Character_Set'(Ada.Finalization.Controlled with Data => Data); end Wrap; end League.Character_Sets.Internals;
50.633333
78
0.462146
2fc825ddc8dad51ffab16c5f52d0c3c8bbfcc836
2,668
adb
Ada
gcc-gcc-7_3_0-release/gcc/ada/g-casuti.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/g-casuti.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/ada/g-casuti.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- G N A T . C A S E _ U T I L -- -- -- -- B o d y -- -- -- -- Copyright (C) 1995-2010, AdaCore -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ -- This is a dummy body, required because if we remove the body we have -- bootstrap path problems (this unit used to have a body, and if we do not -- supply a dummy body, the old incorrect body is picked up during the -- bootstrap process. package body GNAT.Case_Util is end GNAT.Case_Util;
68.410256
78
0.4003
41e7cbaa3645a2413f683b89a747d2d8564a4e71
3,830
ads
Ada
tools-src/gnu/gcc/gcc/ada/a-stream.ads
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
80
2015-01-02T10:14:04.000Z
2021-06-07T06:29:49.000Z
tools-src/gnu/gcc/gcc/ada/a-stream.ads
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
9
2015-05-14T11:03:12.000Z
2018-01-04T07:12:58.000Z
tools-src/gnu/gcc/gcc/ada/a-stream.ads
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
69
2015-01-02T10:45:56.000Z
2021-09-06T07:52:13.000Z
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . S T R E A M S -- -- -- -- S p e c -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992-1997 Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- -- apply solely to the contents of the part following the private keyword. -- -- -- -- 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 2, 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. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ package Ada.Streams is pragma Pure (Streams); type Root_Stream_Type is abstract tagged limited private; type Stream_Element is mod 2 ** Standard'Storage_Unit; type Stream_Element_Offset is range -(2 ** (Standard'Address_Size - 1)) .. +(2 ** (Standard'Address_Size - 1)) - 1; subtype Stream_Element_Count is Stream_Element_Offset range 0 .. Stream_Element_Offset'Last; type Stream_Element_Array is array (Stream_Element_Offset range <>) of Stream_Element; procedure Read (Stream : in out Root_Stream_Type; Item : out Stream_Element_Array; Last : out Stream_Element_Offset) is abstract; procedure Write (Stream : in out Root_Stream_Type; Item : in Stream_Element_Array) is abstract; private type Root_Stream_Type is abstract tagged limited null record; end Ada.Streams;
51.756757
78
0.477023
2fc080cc379de4f7599b2fb403fbefd11f4d5caa
111,419
adb
Ada
src/JEWL/jewl-windows.adb
leomlr/sudoku_ada-jewl
db5f87d41657e17d4e3cffe138a0c0527652c9ec
[ "MIT" ]
null
null
null
src/JEWL/jewl-windows.adb
leomlr/sudoku_ada-jewl
db5f87d41657e17d4e3cffe138a0c0527652c9ec
[ "MIT" ]
null
null
null
src/JEWL/jewl-windows.adb
leomlr/sudoku_ada-jewl
db5f87d41657e17d4e3cffe138a0c0527652c9ec
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- J E W L . W I N D O W S -- -- -- -- The body of the GUI package for use with Microsoft Windows. -- -- -- -- All window types contain a Controlled_Type object, which contains a -- -- pointer to a Reference_Counted_Type. The type Window_Internals is -- -- derived from Reference_Counted_Type to provide the internal data -- -- structures needed for all windows, and further derivations are made -- -- for specific types of window. Since Reference_Counted_Type is a -- -- controlled type, all derivations must occur at library level, so -- -- this is done in a separate non-generic private package which also -- -- contains other implementation details used by this package body. -- -- Even so, this is a large package! -- -- -- -- Copyright (C) John English 2000. Contact address: [email protected] -- -- This software is released under the terms of the GNU General Public -- -- License and is intended primarily for educational use. Please contact -- -- the author to report bugs, suggestions and modifications. -- -- -- ------------------------------------------------------------------------------ -- $Id: jewl-windows.adb 1.7 2007/01/08 17:00:00 JE Exp $ ------------------------------------------------------------------------------ -- -- $Log: jewl-windows.adb $ -- Revision 1.7 2007/01/08 17:00:00 JE -- * Fixed linker options in JEWL.Win32_Interface to accommodate changes to GNAT -- GPL 2006 compiler (thanks to John McCormick for this) -- * Added delay in message loop to avoid the appearance of hogging 100% of CPU -- time -- -- Revision 1.6 2001/11/02 16:00:00 JE -- * Fixed canvas bug when saving an empty canvas -- * Restore with no prior save now acts as erase -- * Removed redundant variable declaration in Image function -- -- Revision 1.5 2001/08/22 15:00:00 JE -- * Minor bugfix to Get_Text for combo boxes -- * Minor changes to documentation (including new example involving dialogs) -- -- Revision 1.4 2001/01/25 09:00:00 je -- Changes visible to the user: -- -- * Added support for drawing bitmaps on canvases (Draw_Image operations -- and new type Image_Type) -- * Added Play_Sound -- * Added several new operations on all windows: Get_Origin, Get_Width, -- Get_Height, Set_Origin, Set_Size and Focus -- * Added several functions giving screen and window dimensions: Screen_Width, -- Screen_Height, Frame_Width, Frame_Height, Dialog_Width, Dialog_Height and -- Menu_Height -- * Canvases can now handle keyboard events: new constructor and Key_Code added -- * Added procedure Play_Sound -- * Operations "+" and "-" added for Point_Type -- * Pens can now be zero pixels wide -- * The absolute origin of a frame can now have be specified when the frame -- is created -- * Added new File_Dialog operations Add_Filter and Set_Directory -- * Added Get_Line renames to JEWL.IO for compatibility with Ada.Text_IO -- * Added all the Get(File,Item) operations mentioned in documentation but -- unaccountably missing :-( -- * Documentation updated to reflect the above changes -- * HTML versions of public package specifications added with links from -- main documentation pages -- -- Other internal changes: -- -- * Canvas fonts, pens etc. now use JEWL.Reference_Counted_Type rather than -- reinventing this particular wheel, as do images -- * Various minor code formatting changes: some code reordered for clarity, -- some comments added or amended, -- * Changes introduced in 1.2 to support GNAT 3.10 have been reversed, since -- GNAT 3.10 still couldn't compile this code correctly... ;-( -- -- Outstanding issues: -- -- * Optimisation breaks the code (workaround: don't optimise) -- -- Revision 1.3 2000/07/07 12:00:00 je -- * JEWL.Simple_Windows added; JEWL.IO modified to use JEWL.Simple_Windows. -- * JEWL.IO bug fix: Put_Line to file wrote newline to standard output -- instead of to the file (thanks to Jeff Carter for pointing this out). -- * Panels fixed so that mouse clicks are passed on correctly to subwindows. -- * Memos fixed so that tabs are handled properly. -- * Password feature added to editboxes. -- * Minor typos fixed in comments within the package sources. -- * Documentation corrected and updated following comments from Moti Ben-Ari -- and Don Overheu. -- -- Revision 1.2 2000/04/18 20:00:00 je -- * Minor code changes to enable compilation by GNAT 3.10 -- * Minor documentation errors corrected -- * Some redundant "with" clauses removed -- -- Revision 1.1 2000/04/09 21:00:00 je -- Initial revision -- ------------------------------------------------------------------------------ with JEWL.Window_Implementation; use JEWL.Window_Implementation; with JEWL.Message_Handling; use JEWL.Message_Handling; with JEWL.Canvas_Implementation; use JEWL.Canvas_Implementation; with JEWL.Win32_Interface; use JEWL.Win32_Interface; with Ada.Exceptions; use Ada.Exceptions; with Ada.Tags; use Ada.Tags; with Ada.Streams.Stream_IO; use Ada.Streams.Stream_IO; with System; package body JEWL.Windows is use type System.Address; use type Ada.Streams.Stream_Element_Offset; use type Win32_BOOL, Win32_LONG, Win32_WORD, Win32_UINT, Win32_SIZE, Win32_DWORD; ---------------------------------------------------------------------------- -- Win32 window class names ---------------------------------------------------------------------------- Frame_Class : constant Win32_String := To_Array("JEWL.Windows.Frame"); Dialog_Class : constant Win32_String := To_Array("JEWL.Windows.Dialog"); Canvas_Class : constant Win32_String := To_Array("JEWL.Windows.Canvas"); ---------------------------------------------------------------------------- -- End-of-line string ---------------------------------------------------------------------------- EOL : constant String := ASCII.CR & ASCII.LF; ---------------------------------------------------------------------------- -- -- M I S C E L L A N E O U S R O U T I N E S -- ---------------------------------------------------------------------------- -- -- Show_Error: display a message box with an OK button and stop sign. -- procedure Show_Error (Text : in String; Title : in String := "Error") is I : Integer; begin I := Message_Box (Text, Title, MB_OK+MB_ICONSTOP); end Show_Error; ---------------------------------------------------------------------------- -- -- Show_Query: display a message box with Yes/No buttons and a question -- mark. -- function Show_Query (Text : in String; Title : in String := "Query") return Boolean is begin return Message_Box (Text, Title, MB_YESNO+MB_ICONQUESTION) = IDYES; end Show_Query; ---------------------------------------------------------------------------- -- -- Show_Message: display a message box with an OK button and an -- information sign. -- procedure Show_Message (Text : in String; Title : in String := "Message") is I : Integer; begin I := Message_Box (Text, Title, MB_OK+MB_ICONINFORMATION); end Show_Message; ---------------------------------------------------------------------------- -- -- Play_Sound: play a sound held in a wave file. -- procedure Play_Sound (Sound : in String) is begin Bool_Dummy := PlaySound (To_LPCSTR(To_Array(Sound)), System.Null_Address, SND_FILENAME + SND_NODEFAULT + SND_ASYNC); end Play_Sound; ---------------------------------------------------------------------------- -- -- Screen_Width: get width of display screen in pixels. -- function Screen_Width return Natural is begin return Natural(GetSystemMetrics(SM_CXSCREEN)); end Screen_Width; ---------------------------------------------------------------------------- -- -- Screen_Height: get height of display screen in pixels. -- function Screen_Height return Natural is begin return Natural(GetSystemMetrics(SM_CYSCREEN)); end Screen_Height; ---------------------------------------------------------------------------- -- -- I N T E R N A L O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Get_Internals: check that a window has been initialised and return a -- pointer to its Window_Internals structure, or raise an -- Invalid_Window exception. Additional parameters are -- used to generate a meaningful message to accompany -- the exception. -- function Get_Internals (Window : in Window_Type'Class; Operation : in String) return Window_Ptr is begin if Window.Internals.Pointer = null then Raise_Exception (Invalid_Window'Identity, External_Tag(Window'Tag) & ": window not initialised in call to " & Operation); end if; return Window_Ptr(Window.Internals.Pointer); end Get_Internals; ---------------------------------------------------------------------------- -- -- Get_Internals: check that a common dialog has been initialised and -- return a pointer to its Common_Dialog_Internals, or -- raise an Invalid_Window exception. Additional parameters -- are used to generate a meaningful message to accompany -- the exception. -- function Get_Internals (Dialog : in Common_Dialog_Type'Class; Operation : in String) return Common_Dialog_Ptr is begin if Dialog.Internals.Pointer = null then Raise_Exception (Invalid_Window'Identity, External_Tag(Dialog'Tag) & ": dialog not initialised in call to " & Operation); end if; return Common_Dialog_Ptr(Dialog.Internals.Pointer); end Get_Internals; ---------------------------------------------------------------------------- -- -- Add: add an object to the end of a canvas drawing list and invalidate -- the canvas window so it will be repainted. The second parameter -- enables the actual operation name to be passed to Get_Internals. -- procedure Add (Canvas : in Canvas_Type; Operation : in String; Object : in Canvas_Object_Ptr) is C : Canvas_Ptr := Canvas_Ptr(Get_Internals(Canvas, Operation)); begin C.Monitor.Add (Object); Bool_Dummy := InvalidateRect (C.Handle, null, 1); end; ---------------------------------------------------------------------------- -- -- Create_Child: create a child window with specified characteristics. -- The last parameter enables the actual operation name -- to be passed to Get_Internals. -- procedure Create_Child (Window : in out Window_Type'Class; Parent : in Container_Type'Class; Class : in String; Title : in String; XStyle : in Win32_DWORD; Style : in Win32_DWORD; Origin : in Point_Type; Width : in Integer; Height : in Integer; Font : in Font_Type; ID : in Integer; Operation : in String) is P : Container_Ptr := Container_Ptr (Get_Internals (Parent, Operation)); X : Window_Ptr := Get_Internals (Window, Operation); T : Integer := Origin.Y; L : Integer := Origin.X; H : Integer := Height; W : Integer := Width; B : Boolean; C : Win32_String := To_Array(Class); N : Win32_String := To_Array(Title); begin -- Fill in links to parent and siblings X.Parent := P; if P.Last = null then P.First := Window.Internals; else P.Last.Next := Window.Internals; end if; P.Last := X; -- Fill in the command code associated with this window X.Action := ID; -- Fill in the window dimensions X.Top := Origin.Y; X.Left := Origin.X; X.Height := Height; X.Width := Width; -- Calculate the actual window dimensions (the dimensions given may be -- relative to the parent window) Get_Actual_Bounds (P.Handle, T, L, W, H, B); -- Ask the message loop task to create the child window Message_Loop.Create_Child (X, P, C, N, XStyle, Style, T, L, W, H); -- Create the font, or use the parent font if no font name is given if Font.Length > 0 then Set_Font (Window, Font); else X.Font := System.Null_Address; end if; end Create_Child; ---------------------------------------------------------------------------- -- -- I M A G E O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Image: load a bitmap image from a specified file. -- function Image (Name : String) return Image_Type is subtype Offset is Ada.Streams.Stream_Element_Offset; subtype Elements is Ada.Streams.Stream_Element_Array; Image : Image_Type; File : Ada.Streams.Stream_IO.File_Type; Stream : Ada.Streams.Stream_IO.Stream_Access; Header : Win32_BITMAPFILEHEADER; Info : aliased Win32_BITMAPINFOHEADER; Colours : Offset; Bytes : Offset; Bitmap : Win32_HBITMAP; Pointer : Image_Ptr; begin Image.Internals.Pointer := null; -- Create a stream to read the bitmap file Ada.Streams.Stream_IO.Open (File, Name => Name, Mode => In_File); Stream := Ada.Streams.Stream_IO.Stream (File); -- Read and check the file header Win32_BITMAPFILEHEADER'Read (Stream, Header); if Header.bfType /= BITMAP_MAGIC then raise Data_Error; end if; -- Read and check the bitmap info header Win32_BITMAPINFOHEADER'Read (Stream, Info); if Info.biSize /= Info'Size/Win32_BYTE'Size or Info.biPlanes /= 1 then raise Data_Error; end if; -- Calculate no. of colour table entries following the info header if Info.biClrUsed /= 0 then Colours := Offset(Info.biClrUsed); elsif Info.biBitCount <= 8 then Colours := Offset(2 ** Integer(Info.biBitCount)); elsif Info.biCompression = BI_BITFIELDS then Colours := 3; else Colours := 0; end if; -- Calculate size of bitmap data Bytes := Offset(Info.biSizeImage); if Bytes = 0 then Bytes := (Offset(Info.biWidth) * Offset(Info.biBitCount) + 31) / 32 * Offset(Info.biHeight); end if; -- Process the rest of the file declare C : Elements (1 .. Colours * 4 + Offset(Info.biSize)); D : Elements (1 .. Offset(Bytes)); E : Offset; P : Win32_BITMAPINFOHEADER; for P'Address use C(1)'Address; H : Win32_HDC; begin -- Copy the bitmap info header into the header block P := Info; -- Read the colour table into the header block Ada.Streams.Read (Stream.all, C (Offset(Info.biSize)+1 .. C'Last), E); if E /= C'Length then raise Data_Error; end if; -- Read the rest of the file into the data block Ada.Streams.Read (Stream.all, D, E); if E /= D'Length then raise Data_Error; end if; -- Get a device context for the display H := CreateDC (To_LPCSTR(To_Array("DISPLAY")), null, null, System.Null_Address); if H = System.Null_Address then raise Data_Error; end if; -- Create the bitmap using the display context Bitmap := CreateDIBitmap (H, Info'Unchecked_Access, CBM_INIT, D(1)'Address, C(1)'Address, DIB_RGB_COLORS); if Bitmap = System.Null_Address then raise Data_Error; end if; end; -- Fill in image structure Pointer := new Image_Internals; Pointer.Image := Bitmap; Pointer.Width := Natural(Info.biWidth); Pointer.Height := Natural(Info.biHeight); Image.Internals.Pointer := Reference_Counted_Ptr(Pointer); Close (File); return Image; exception when others => Close (File); return Image; end Image; ---------------------------------------------------------------------------- -- -- Valid: get the width of the specified image. -- function Valid (Image : Image_Type) return Boolean is begin return Image.Internals.Pointer /= null; end Valid; ---------------------------------------------------------------------------- -- -- Width: get the width of the specified image. -- function Width (Image : Image_Type) return Natural is begin if Valid(Image) then return Image_Internals(Image.Internals.Pointer.all).Width; else return 0; end if; end Width; ---------------------------------------------------------------------------- -- -- Height: get the height of the specified image. -- function Height (Image : Image_Type) return Natural is begin if Valid(Image) then return Image_Internals(Image.Internals.Pointer.all).Height; else return 0; end if; end Height; ---------------------------------------------------------------------------- -- -- W I N D O W O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Show: make a window visible or invisible, bringing visible windows to -- the foreground. -- procedure Show (Window : in Window_Type; Visible : in Boolean := True) is P : Window_Ptr := Get_Internals (Window, "Show"); begin if Visible then Bool_Dummy := ShowWindow(P.Handle,SW_SHOW); Bool_Dummy := SetForegroundWindow (P.Handle); else Bool_Dummy := ShowWindow(P.Handle,SW_HIDE); end if; end Show; ---------------------------------------------------------------------------- -- -- Hide: use Show (above) to hide a window. -- procedure Hide (Window : in Window_Type) is P : Window_Ptr := Get_Internals (Window, "Hide"); begin Show (Window, False); end Hide; ---------------------------------------------------------------------------- -- -- Focus: give the input focus to the specified window. -- procedure Focus (Window : in Window_Type) is P : Window_Ptr := Get_Internals (Window, "Focus"); begin Message_Loop.Set_Focus (P.Handle); end Focus; ---------------------------------------------------------------------------- -- -- Visible: test if a window is visible. -- function Visible (Window : Window_Type) return Boolean is P : Window_Ptr := Get_Internals (Window, "Visible"); begin return IsWindowVisible(P.Handle) /= 0; end Visible; ---------------------------------------------------------------------------- -- -- Get_Origin: get the coordinates of a window's top left corner. -- function Get_Origin (Window : Window_Type) return Point_Type is P : Window_Ptr := Get_Internals (Window, "Visible"); R : aliased Win32_RECT; begin Bool_Dummy := GetWindowRect (P.Handle, R'Unchecked_Access); return (Integer(R.Left),Integer(R.Top)); end Get_Origin; ---------------------------------------------------------------------------- -- -- Get_Width: get the width of a window. -- function Get_Width (Window : Window_Type) return Natural is P : Window_Ptr := Get_Internals (Window, "Get_Width"); R : aliased Win32_RECT; begin Bool_Dummy := GetWindowRect (P.Handle, R'Unchecked_Access); return Natural (R.Right - R.Left); end Get_Width; ---------------------------------------------------------------------------- -- -- Get_Height: get the height of a window. -- function Get_Height (Window : Window_Type) return Natural is P : Window_Ptr := Get_Internals (Window, "Get_Height"); R : aliased Win32_RECT; begin Bool_Dummy := GetWindowRect (P.Handle, R'Unchecked_Access); return Natural (R.Bottom - R.Top); end Get_Height; ---------------------------------------------------------------------------- -- -- Set_Origin: set the coordinates of a window's top left corner. -- procedure Set_Origin (Window : in Window_Type; Origin : in Point_Type) is P : Window_Ptr := Get_Internals (Window, "Set_Origin"); begin Bool_Dummy := SetWindowPos (P.Handle, System.Null_Address, Win32_INT(Origin.X), Win32_INT(Origin.Y), 0, 0, SWP_NOZORDER + SWP_NOSIZE); end Set_Origin; ---------------------------------------------------------------------------- -- -- Set_Size: set the width and height of a window. -- procedure Set_Size (Window : in Window_Type; Width : in Natural := 0; Height : in Natural := 0) is P : Window_Ptr := Get_Internals (Window, "Set_Size"); W : Natural := Width; H : Natural := Height; begin if Width = 0 then W := Get_Width (Window); end if; if Height = 0 then H := Get_Height (Window); end if; Bool_Dummy := SetWindowPos (P.Handle, System.Null_Address, 0, 0, Win32_INT(W), Win32_INT(H), SWP_NOZORDER + SWP_NOMOVE); end Set_Size; ---------------------------------------------------------------------------- -- -- Set_Font: change the font associated with a window and invalidate it -- so that it will be repainted. -- procedure Set_Font (Window : in Window_Type; Font : in Font_Type) is P : Window_Ptr := Get_Internals (Window, "Set_Font"); begin if Font.Length > 0 then if P.Font /= System.Null_Address then Bool_Dummy := DeleteObject (P.Font); end if; P.Font := Create_Font (Font); Long_Dummy := SendMessage (P.Handle, WM_SETFONT, To_WPARAM(P.Font), 0); Bool_Dummy := InvalidateRect (P.Handle, null, 1); end if; end Set_Font; ---------------------------------------------------------------------------- -- -- Get_Font: build a Font_Type structure for a window's current font. -- function Get_Font (Window : Window_Type) return Font_Type is P : Window_Ptr := Get_Internals (Window, "Get_Font"); I : Win32_INT; F : Win32_LOGFONT; begin while P.Font = System.Null_Address loop P := Window_Ptr(P.Parent); exit when P = null; end loop; if P = null or else P.Font = System.Null_Address then return Default_Font; else I := GetObject (P.Font, Win32_LOGFONT'Size/Win32_BYTE'Size, F'Address); return Get_Font (F); end if; end Get_Font; ---------------------------------------------------------------------------- -- -- F R A M E O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Frame: construct a frame with the specified characteristics. -- function Frame (Origin : Point_Type; Width : Positive; Height : Positive; Title : String; Command : Command_Type; Font : Font_Type := Default_Font) return Frame_Type is W : Frame_Type; M : Main_Window_Ptr := new Main_Window_Internals; P : Window_Ptr := Window_Ptr(M); T : Win32_String := To_Array(Title); begin -- Set up the Window_Internals structure for a window with default -- placement W.Internals.Pointer := Reference_Counted_Ptr(P); P.Action := Command_Type'Pos(Command); P.Top := Origin.Y; P.Left := Origin.X; P.Width := Width; P.Height := Height; -- Ask the message loop to create a top-level window Message_Loop.Create_Window (M, Frame_Class, T, WS_EX_CLIENTEDGE or WS_EX_APPWINDOW, WS_OVERLAPPEDWINDOW, True); -- Set the font now that the frame exists if Font.Length > 0 then Set_Font (W, Font); else Set_Font (W, Default_Font); end if; -- Bring the window to the front and return the window object Bool_Dummy := SetForegroundWindow(P.Handle); return W; end Frame; ---------------------------------------------------------------------------- -- -- Frame: construct a frame with the specified characteristics and -- default placement. -- function Frame (Width : Positive; Height : Positive; Title : String; Command : Command_Type; Font : Font_Type := Default_Font) return Frame_Type is begin return Frame ((Integer(CW_USEDEFAULT),Integer(CW_USEDEFAULT)), Width, Height, Title, Command, Font); end Frame; ---------------------------------------------------------------------------- -- -- Close: close and destroy a frame. -- procedure Close (Frame : in Frame_Type) is P : Window_Ptr := Get_Internals (Frame, "Close"); begin if IsWindow(P.Handle) /= 0 then Message_Loop.Destroy_Window (P.Handle); end if; end Close; ---------------------------------------------------------------------------- -- -- Valid: test if a frame is valid (i.e. if the window exists). -- function Valid (Frame : Frame_Type) return Boolean is P : Window_Ptr := Window_Ptr(Frame.Internals.Pointer); begin return P /= null and then IsWindow(P.Handle) /= 0; end Valid; ---------------------------------------------------------------------------- -- -- Frame_Width: return the width of a frame's border. -- function Frame_Width return Natural is begin return Natural ((GetSystemMetrics(SM_CXFRAME) + GetSystemMetrics(SM_CXEDGE)) * 2); end Frame_Width; ---------------------------------------------------------------------------- -- -- Frame_Height: return the height of a frame's border. -- function Frame_Height return Natural is begin return Natural ((GetSystemMetrics(SM_CYFRAME) + GetSystemMetrics(SM_CYEDGE)) * 2 + GetSystemMetrics(SM_CYCAPTION)); end Frame_Height; ---------------------------------------------------------------------------- -- -- Next_Command: ask the info monitor for the next command. -- function Next_Command return Command_Type is Cmd : Natural; begin Window_Info.Get_Command (Cmd); return Command_Type'Val(Cmd); end Next_Command; ---------------------------------------------------------------------------- -- -- Command_Ready: ask the info monitor if there is a command pending. -- function Command_Ready return Boolean is begin return Window_Info.Test_Command; end Command_Ready; ---------------------------------------------------------------------------- -- -- D I A L O G O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Dialog: create a top-level dialog window. -- function Dialog (Width : Positive; Height : Positive; Title : String; Command : Command_Type; Font : Font_Type := Default_Font) return Dialog_Type is W : Dialog_Type; X : Integer := Integer(GetSystemMetrics(SM_CXSCREEN)) / 2; Y : Integer := Integer(GetSystemMetrics(SM_CYSCREEN)) / 2; M : Main_Window_Ptr := new Main_Window_Internals; P : Window_Ptr := Window_Ptr(M); T : Win32_String := To_Array(Title); begin -- Set up the Window_Internals structure for a centred window W.Internals.Pointer := Reference_Counted_Ptr(P); P.Action := Command_Type'Pos(Command); P.Top := Y - Height/2; P.Left := X - Width/2; P.Width := Width; P.Height := Height; -- Ask the message loop to create a hidden top-level window Message_Loop.Create_Window (M, Dialog_Class, T, 0, WS_DLGFRAME or WS_SYSMENU, False); -- Set the font now that the dialog exists if Font.Length > 0 then Set_Font (W, Font); else Set_Font (W, Default_Font); end if; -- Return the window object return W; end Dialog; ---------------------------------------------------------------------------- -- -- Execute: run a dialog until it issues a command. Note that dialogs -- are hidden rather than destroyed so that closing a dialog -- them won't make any attached controls disappear. -- function Execute (Dialog : in Dialog_Type) return Command_Type is D : Win32_HWND; C : Natural; P : Window_Ptr := Get_Internals (Dialog, "Execute"); begin -- Record this window as the currently active dialog D := P.Handle; Window_Info.Get_Dialog (D); -- Make the window visible and bring it to the foreground Bool_Dummy := ShowWindow (P.Handle, SW_SHOW); Bool_Dummy := SetForegroundWindow (P.Handle); -- Wait for a command (which must be from this dialog, as dialog -- windows disable all other windows belonging to the application) Window_Info.Get_Command (C); -- Restore the original active dialog setting Window_Info.Get_Dialog (D); -- Hide the dialog window and return the command code Bool_Dummy := ShowWindow (P.Handle, SW_HIDE); return Command_Type'Val(C); end Execute; ---------------------------------------------------------------------------- -- -- Dialog_Width: return the width of a dialog's border. -- function Dialog_Width return Natural is begin return Natural (GetSystemMetrics(SM_CXDLGFRAME) * 2); end Dialog_Width; ---------------------------------------------------------------------------- -- -- Dialog_Height: return the height of a dialog's border. -- function Dialog_Height return Natural is begin return Natural (GetSystemMetrics(SM_CYDLGFRAME) * 2 + GetSystemMetrics(SM_CYCAPTION)); end Dialog_Height; ---------------------------------------------------------------------------- -- -- P A N E L O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Panel: create a panel (which is actually a Windows groupbox if it has -- a title, or a static control with an etched border if not). -- function Panel (Parent : Container_Type'Class; Origin : Point_Type; Width : Integer; Height : Integer; Title : String := ""; Font : Font_Type := Parent_Font) return Panel_Type is W : Panel_Type; C : String(1..6); S : Win32_DWORD := WS_GROUP; P : Container_Ptr := new Container_Internals; begin -- Choose the actual window class and style if Title = "" then C := "static"; S := S or SS_ETCHEDFRAME; else C := "button"; S := S or BS_GROUPBOX; end if; -- Create the window and return it W.Internals.Pointer := Reference_Counted_Ptr(P); Create_Child (W, Parent, C, Title, WS_EX_CONTROLPARENT, S, Origin, Width, Height, Font, -1, "Panel"); P.WndProc := GetWindowLong (P.Handle, GWL_WNDPROC); Long_Dummy := SetWindowLong (P.Handle, GWL_WNDPROC, To_LONG(Panel_Proc'Access)); return W; end Panel; ---------------------------------------------------------------------------- -- -- M E N U O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Menu: create a menu attached to a frame. -- function Menu (Parent : Frame_Type'Class; Text : String) return Menu_Type is M : Menu_Type; H : Win32_HMENU; P : Window_Ptr := Get_Internals (Parent, "Menu"); W : Window_Ptr := new Window_Internals; T : Win32_String := To_Array(Text); begin -- Get the frame's menu bar (and create it if it doesn't exist) H := GetMenu (P.Handle); if H = System.Null_Address then H := CreateMenu; Bool_Dummy := SetMenu (P.Handle, H); end if; -- Create a new menu and attach it to the menu bar W.Handle := CreateMenu; Bool_Dummy := AppendMenu(H, MF_POPUP, To_WPARAM(W.Handle), To_LPCSTR(T)); -- Redraw the menu bar and return the menu object Bool_Dummy := DrawMenuBar (P.Handle); M.Internals.Pointer := Reference_Counted_Ptr(W); return M; end Menu; ---------------------------------------------------------------------------- -- -- Menu: create a menu attached to another menu. -- function Menu (Parent : Menu_Type'Class; Text : String) return Menu_Type is M : Menu_Type; P : Window_Ptr := Get_Internals (Parent, "Menu"); W : Window_Ptr := new Window_Internals; H : Win32_HWND := P.Handle; T : Win32_String := To_Array(Text); begin -- Create a new submenu and attach it to the parent menu W.Handle := CreateMenu; Bool_Dummy := AppendMenu(H, MF_POPUP, To_WPARAM(W.Handle), To_LPCSTR(T)); -- Find the enclosing top-level window and redraw its menu bar while GetParent(H) /= System.Null_Address loop H := GetParent(H); end loop; Bool_Dummy := DrawMenuBar(H); -- Return the menu object M.Internals.Pointer := Reference_Counted_Ptr(W); return M; end Menu; ---------------------------------------------------------------------------- -- -- Menu_Height: return the height of a menubar. -- function Menu_Height return Natural is begin return Natural (GetSystemMetrics(SM_CYMENU)); end Menu_Height; ---------------------------------------------------------------------------- -- -- C O N T R O L O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Enable: enable or disable a control. -- procedure Enable (Control : in Control_Type; Enabled : in Boolean := True) is P : Window_Ptr := Get_Internals (Control, "Enable"); begin Bool_Dummy := EnableWindow (P.Handle, Win32_BOOL(Boolean'Pos(Enabled))); end Enable; ---------------------------------------------------------------------------- -- -- Disable: use Enable (above) to disable a control. -- procedure Disable (Control : in Control_Type) is P : Window_Ptr := Get_Internals (Control, "Disable"); begin Enable (Control_Type'Class(Control), False); end Disable; ---------------------------------------------------------------------------- -- -- Enabled: test if a control is enabled. -- function Enabled (Control : Control_Type) return Boolean is P : Window_Ptr := Get_Internals (Control, "Enabled"); begin return IsWindowEnabled(P.Handle) /= 0; end Enabled; ---------------------------------------------------------------------------- -- -- T E X T C O N T R O L O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Get_Length: get the length of the text in a text control. -- function Get_Length (Control : Text_Control_Type) return Natural is P : Window_Ptr := Get_Internals (Control, "Get_Length"); begin return Natural(SendMessage(P.Handle, WM_GETTEXTLENGTH, 0, 0)); end Get_Length; ---------------------------------------------------------------------------- -- -- Get_Text: get the text from a text control. -- function Get_Text (Control : Text_Control_Type) return String is P : Window_Ptr := Get_Internals (Control, "Get_Text"); L : Natural; begin declare A : Win32_String(1..Win32_SIZE(Get_Length(Control)+1)) := (others => ' '); begin L := Natural(SendMessage(P.Handle, WM_GETTEXT, Win32_WPARAM(A'Length), To_LPARAM(A))); return To_String(A); end; end Get_Text; ---------------------------------------------------------------------------- -- -- Get_Text: get the text from a text control into a fixed-length -- string variable. -- procedure Get_Text (Control : in Text_Control_Type; Text : out String; Length : out Natural) is S : constant String := Get_Text (Control); begin if S'Length > Text'Length then Text := S(S'First..S'First+Text'Length-1); Length := Text'Length; else Text(Text'First..Text'First+S'Length-1) := S; Length := S'Length; end if; end Get_Text; ---------------------------------------------------------------------------- -- -- Set_Text: store the specified text in a text control. -- procedure Set_Text (Control : in Text_Control_Type; Text : in String) is P : Window_Ptr := Get_Internals (Control, "Set_Text"); T : Win32_String := To_Array(Text); begin Long_Dummy := SendMessage (P.Handle, WM_SETTEXT, 0, To_LPARAM(T)); end Set_Text; ---------------------------------------------------------------------------- -- -- B U T T O N O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Button: create a button as specified. -- function Button (Parent : Container_Type'Class; Origin : Point_Type; Width : Integer; Height : Integer; Text : String; Command : Command_Type; Default : Boolean := False; Font : Font_Type := Parent_Font) return Button_Type is W : Button_Type; P : Window_Ptr := new Window_Internals; S : Win32_DWORD := WS_TABSTOP or WS_GROUP; begin if Default then S := S or BS_DEFPUSHBUTTON; else S := S or BS_PUSHBUTTON; end if; W.Internals.Pointer := Reference_Counted_Ptr(P); Create_Child (W, Parent, "button", Text, 0, S, Origin, Width, Height, Font, Command_Type'Pos(Command)+WM_USER, "Button"); return W; end Button; ---------------------------------------------------------------------------- -- -- L A B E L O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Label: create a label as specified. -- function Label (Parent : Container_Type'Class; Origin : Point_Type; Width : Integer; Height : Integer; Text : String; Align : Alignment_Type := Left; Font : Font_Type := Parent_Font) return Label_Type is W : Label_Type; P : Window_Ptr := new Window_Internals; S : Win32_DWORD := WS_GROUP or SS_NOPREFIX; begin if Align = Right then S := S or SS_RIGHT; elsif Align = Centre then S := S or SS_CENTER; end if; W.Internals.Pointer := Reference_Counted_Ptr(P); Create_Child (W, Parent, "static", Text, 0, S, Origin, Width, Height, Font, -1, "Label"); return W; end Label; ---------------------------------------------------------------------------- -- -- E D I T B O X O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Editbox: create an editbox as specified. -- function Editbox (Parent : Container_Type'Class; Origin : Point_Type; Width : Integer; Height : Integer; Text : String := ""; Password : Boolean := False; Font : Font_Type := Parent_Font) return Editbox_Type is W : Editbox_Type; P : Window_Ptr := new Window_Internals; E : Win32_DWORD := ES_AUTOHSCROLL or WS_BORDER or WS_TABSTOP or WS_GROUP; begin if Password then E := E or ES_PASSWORD; end if; W.Internals.Pointer := Reference_Counted_Ptr(P); Create_Child (W, Parent, "edit", Text, 0, E, Origin, Width, Height, Font, -1, "Editbox"); return W; end Editbox; ---------------------------------------------------------------------------- -- -- Modified: test if the user has modified the editbox since the last -- time this function was called. -- function Modified (Editbox : Editbox_Type) return Boolean is P : Window_Ptr := Get_Internals(Editbox, "Modified"); B : Boolean; begin B := SendMessage(P.Handle,EM_GETMODIFY,0,0) /= 0; Long_Dummy := SendMessage(P.Handle, EM_SETMODIFY, 0, 0); return B; end Modified; ---------------------------------------------------------------------------- -- -- B O O L E A N C O N T R O L O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Get_State: test if a Boolean control is checked. -- function Get_State (Control : Boolean_Control_Type) return Boolean is P : Window_Ptr := Get_Internals (Control, "Get_State"); begin return SendMessage (P.Handle, BM_GETCHECK, 0, 0) = 1; end Get_State; ---------------------------------------------------------------------------- -- -- Set_State: set the state of a Boolean control as specified. -- procedure Set_State (Control : in Boolean_Control_Type; State : in Boolean) is P : Window_Ptr := Get_Internals (Control, "Set_State"); begin Long_Dummy := SendMessage (P.Handle, BM_SETCHECK, Boolean'Pos(State), 0); end Set_State; ---------------------------------------------------------------------------- -- -- M E N U I T E M O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Menuitem: create a menuitem. -- function Menuitem (Parent : Menu_Type'Class; Text : String; Command : Command_Type) return Menuitem_Type is M : Menuitem_Type; P : Window_Ptr := Get_Internals (Parent, "Menuitem"); W : Window_Ptr := new Window_Internals; H : Win32_HWND := P.Handle; T : Win32_String := To_Array(Text); begin -- Set the command code and set the internal handle to be the parent -- handle (since Win32 menuitems are not real windows and do not have -- handles of their own) M.Internals.Pointer := Reference_Counted_Ptr(W); W.Handle := P.Handle; W.Action := Command_Type'Pos(Command); -- Add the menuitem to the parent menu Bool_Dummy := AppendMenu(P.Handle, MF_STRING, Win32_UINT(W.Action+WM_USER), To_LPCSTR(T)); -- Find the enclosing top-level window and redraw its menu bar while GetParent(H) /= System.Null_Address loop H := GetParent(H); end loop; Bool_Dummy := DrawMenuBar(H); -- Return the menuitem object return M; end Menuitem; ---------------------------------------------------------------------------- -- -- Separator: create a separator for a menu. -- function Separator (Parent : Menu_Type'Class) return Menuitem_Type is M : Menuitem_Type; P : Window_Ptr := Get_Internals (Parent, "Separator"); W : Window_Ptr := new Window_Internals; H : Win32_HWND := P.Handle; begin -- Set the command code and set the internal handle to be the parent -- handle (since Win32 menuitems are not real windows and do not have -- handles of their own) M.Internals.Pointer := Reference_Counted_Ptr(W); W.Handle := P.Handle; W.Action := -1; -- Add the menuitem to the parent menu Bool_Dummy := AppendMenu(P.Handle, MF_STRING or MF_SEPARATOR, 0, null); -- Find the enclosing top-level window and redraw its menu bar while GetParent(H) /= System.Null_Address loop H := GetParent(H); end loop; Bool_Dummy := DrawMenuBar(H); -- Return the menuitem object return M; end Separator; ---------------------------------------------------------------------------- -- -- Enable: enable or disable a menu item using its command code. -- procedure Enable (Control : in Menuitem_Type; Enabled : in Boolean := True) is P : Window_Ptr := Get_Internals (Control, "Enable"); E : Win32_UINT; begin if P.Action >= 0 then if Enabled then E := MF_BYCOMMAND or MF_ENABLED; else E := MF_BYCOMMAND or MF_GRAYED; end if; Bool_Dummy := EnableMenuItem (P.Handle, Win32_UINT(P.Action+WM_USER), E); end if; end Enable; ---------------------------------------------------------------------------- -- -- Enabled: test if a menu item is enabled using its command code. -- function Enabled (Control : Menuitem_Type) return Boolean is P : Window_Ptr := Get_Internals (Control, "Enabled"); S : Win32_UINT; begin if P.Action < 0 then return False; else S := GetMenuState (P.Handle, Win32_UINT(P.Action+WM_USER), MF_BYCOMMAND); return (S and MF_DISABLED) = 0; end if; end Enabled; ---------------------------------------------------------------------------- -- -- Get_Length: get the length of the text in a menuitem. -- function Get_Length (Control : Menuitem_Type) return Natural is P : Window_Ptr := Get_Internals (Control, "Get_Length"); begin if P.Action < 0 then return 0; else return Natural(GetMenuString(P.Handle, Win32_UINT(P.Action+WM_USER), null, 0, MF_BYCOMMAND)); end if; end Get_Length; ---------------------------------------------------------------------------- -- -- Get_Text: get the text from a menuitem. -- function Get_Text (Control : Menuitem_Type) return String is P : Window_Ptr := Get_Internals (Control, "Get_Text"); L : Natural; begin if P.Action < 0 then return ""; else declare A : Win32_String(1..Win32_SIZE(Get_Length(Control)+1)) := (others => ' '); begin L := Natural(GetMenuString(P.Handle, Win32_UINT(P.Action+WM_USER), To_LPSTR(A), A'Length, MF_BYCOMMAND)); return To_String(A); end; end if; end Get_Text; ---------------------------------------------------------------------------- -- -- Set_Text: store the specified text in a text control. -- procedure Set_Text (Control : in Menuitem_Type; Text : in String) is P : Window_Ptr := Get_Internals (Control, "Set_Text"); T : Win32_String := To_Array(Text); H : Win32_HWND; begin if P.Action >= 0 then -- ignore menu separators Bool_Dummy := ModifyMenu (P.Handle, Win32_UINT(P.Action+WM_USER), MF_BYCOMMAND or MF_STRING, Win32_UINT(P.Action), To_LPCSTR(T)); H := P.Handle; while GetParent(H) /= System.Null_Address loop H := GetParent(H); end loop; Bool_Dummy := DrawMenuBar(H); end if; end Set_Text; ---------------------------------------------------------------------------- -- -- Get_State: test if a menuitem is checked. -- function Get_State (Control : Menuitem_Type) return Boolean is P : Window_Ptr := Get_Internals (Control, "Get_State"); begin return (GetMenuState(P.Handle,Win32_UINT(P.Action+WM_USER), MF_BYCOMMAND) and MF_CHECKED) /= 0; end Get_State; ---------------------------------------------------------------------------- -- -- Set_State: set the state of a menuitem as specified. -- procedure Set_State (Control : in Menuitem_Type; State : in Boolean) is P : Window_Ptr := Get_Internals (Control, "Set_State"); D : Win32_DWORD; begin if State then D := CheckMenuItem (P.Handle, Win32_UINT(P.Action+WM_USER), MF_BYCOMMAND or MF_CHECKED); else D := CheckMenuItem (P.Handle, Win32_UINT(P.Action+WM_USER), MF_BYCOMMAND or MF_UNCHECKED); end if; end Set_State; ---------------------------------------------------------------------------- -- -- C H E C K B O X O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Checkbox: create a checkbox with the specified initial state. -- function Checkbox (Parent : Container_Type'Class; Origin : Point_Type; Width : Integer; Height : Integer; Text : String; Checked : Boolean := False; Font : Font_Type := Parent_Font) return Checkbox_Type is W : Checkbox_Type; P : Window_Ptr := new Window_Internals; begin W.Internals.Pointer := Reference_Counted_Ptr(P); Create_Child (W, Parent, "button", Text, 0, BS_AUTOCHECKBOX or WS_TABSTOP or WS_GROUP, Origin, Width, Height, Font, -1, "Checkbox"); Set_State (W, Checked); return W; end Checkbox; ---------------------------------------------------------------------------- -- -- R A D I O B U T T O N O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Radiobutton: create a radiobutton with the specified initial state. -- function Radiobutton (Parent : Container_Type'Class; Origin : Point_Type; Width : Integer; Height : Integer; Text : String; Checked : Boolean := False; Font : Font_Type := Parent_Font) return Radiobutton_Type is W : Radiobutton_Type; P : Window_Ptr := new Window_Internals; begin W.Internals.Pointer := Reference_Counted_Ptr(P); Create_Child (W, Parent, "button", Text, 0, BS_AUTORADIOBUTTON or WS_TABSTOP, Origin, Width, Height, Font, -1, "Radiobutton"); Set_State (W, Checked); return W; end Radiobutton; ---------------------------------------------------------------------------- -- -- M U L T I L I N E O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Get_Text: get the text of a specified line into a fixed-length -- string variable by dispatching to the appropriate -- Get_Text function. -- procedure Get_Text (Control : in Multiline_Type; Line : in Natural := 0; Text : out String; Length : out Natural) is S : constant String := Get_Text (Multiline_Type'Class(Control), Line); begin if S'Length > Text'Length then Text := S(S'First..S'First+Text'Length-1); Length := Text'Length; else Text(Text'First..Text'First+S'Length-1) := S; Length := S'Length; end if; end Get_Text; ---------------------------------------------------------------------------- -- -- Get_Actual_Line: convert a line number in a multiline control -- (which may be zero or out-of-range) to an -- absolute line number (internal use only). -- function Get_Actual_Line (Control : in Multiline_Type'Class; Line : in Natural; Name : in String) return Natural is L : Natural := Line; begin if L > Get_Count(Control) then Raise_Exception (Constraint_Error'Identity, External_Tag(Control'Tag) & ": Line number out of range in " & Name); end if; if L = 0 then L := Get_Line(Control); end if; return L; end Get_Actual_Line; ---------------------------------------------------------------------------- -- -- L I S T B O X O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Listbox: create a listbox. -- function Listbox (Parent : Container_Type'Class; Origin : Point_Type; Width : Integer; Height : Integer; Font : Font_Type := Parent_Font) return Listbox_Type is W : Listbox_Type; P : Window_Ptr := new Window_Internals; begin W.Internals.Pointer := Reference_Counted_Ptr(P); Create_Child (W, Parent, "listbox", "", 0, WS_HSCROLL or WS_VSCROLL or WS_BORDER or WS_TABSTOP or WS_GROUP, Origin, Width, Height, Font, -1, "Listbox"); return W; end Listbox; ---------------------------------------------------------------------------- -- -- Get_Count: get the number of lines in the listbox. -- function Get_Count (Control : Listbox_Type) return Natural is P : Window_Ptr := Get_Internals (Control, "Get_Count"); begin return Natural(SendMessage(P.Handle,LB_GETCOUNT,0,0)); end Get_Count; ---------------------------------------------------------------------------- -- -- Get_Line: get the number of the current line (0 if no line is -- selected). -- function Get_Line (Control : Listbox_Type) return Natural is P : Window_Ptr := Get_Internals (Control, "Get_Line"); begin return Natural(SendMessage(P.Handle,LB_GETCURSEL,0,0) + 1); end Get_Line; ---------------------------------------------------------------------------- -- -- Get_Length: get the length of the specified line (0 if no line -- is selected). -- function Get_Length (Control : Listbox_Type; Line : Natural := 0) return Natural is P : Window_Ptr := Get_Internals (Control, "Get_Length"); L : Natural := Get_Actual_Line (Control, Line, "Get_Length"); begin if L = 0 then return 0; else return Natural(SendMessage(P.Handle, LB_GETTEXTLEN, Win32_WPARAM(L)-1, 0)); end if; end Get_Length; ---------------------------------------------------------------------------- -- -- Get_Text: get the text of the specified line (the empty string if -- the current line is specified and no line is selected). -- function Get_Text (Control : Listbox_Type; Line : Natural := 0) return String is P : Window_Ptr := Get_Internals (Control, "Get_Text"); L : Natural := Get_Actual_Line (Control, Line, "Get_Text"); begin if L = 0 then return ""; else declare A : Win32_String(1..Win32_SIZE(Get_Length(Control,L)+1)) := (others => ' '); begin L := Natural(SendMessage(P.Handle, LB_GETTEXT, Win32_WPARAM(L)-1, To_LPARAM(A))); return To_String(A); end; end if; end Get_Text; ---------------------------------------------------------------------------- -- -- Set_Text: set the text of the specified line (delete the current -- line and insert its replacement). -- procedure Set_Text (Control : in Listbox_Type; Text : in String; Line : in Natural := 0) is L : Natural := Get_Actual_Line (Control, Line, "Set_Text"); begin Delete_Line (Control, L); Insert_Line (Control, Text, L); end Set_Text; ---------------------------------------------------------------------------- -- -- Select_Line: set the line number for the current selection (deselect -- all lines if the line number is 0). -- procedure Select_Line (Control : in Listbox_Type; Line : in Natural := 0) is P : Window_Ptr := Get_Internals (Control, "Select_Line"); begin if Line > Get_Count(Control) then Raise_Exception (Constraint_Error'Identity, External_Tag(Multiline_Type'Class(Control)'Tag) & ": Line number out of range in Select_Line"); end if; Long_Dummy := SendMessage(P.Handle, LB_SETCURSEL, Win32_WPARAM(Line)-1, 0); end Select_Line; ---------------------------------------------------------------------------- -- -- Append_Line: add a line containing the specified line to the end -- of the listbox. -- procedure Append_Line (Control : in Listbox_Type; Text : in String) is P : Window_Ptr := Get_Internals (Control, "Append_Line"); T : Win32_String := To_Array(Text); begin Long_Dummy := SendMessage(P.Handle, LB_ADDSTRING, 0, To_LPARAM(T)); end Append_Line; ---------------------------------------------------------------------------- -- -- Insert_Line: insert a new line above the specified line. If the real -- line number is zero (no current line), append the line -- as above. -- procedure Insert_Line (Control : in Listbox_Type; Text : in String; Line : in Natural := 0) is P : Window_Ptr := Get_Internals (Control, "Insert_Line"); L : Natural := Get_Actual_Line (Control, Line, "Insert_Line"); T : Win32_String := To_Array(Text); begin if L = 0 then Append_Line (Control, Text); else Long_Dummy := SendMessage(P.Handle, LB_INSERTSTRING, Win32_WPARAM(L)-1, To_LPARAM(T)); end if; end Insert_Line; ---------------------------------------------------------------------------- -- -- Delete_Line: delete the specified line. -- procedure Delete_Line (Control : in Listbox_Type; Line : in Natural := 0) is P : Window_Ptr := Get_Internals (Control, "Delete_Line"); L : Natural := Get_Actual_Line (Control, Line, "Delete_Line"); begin Long_Dummy := SendMessage(P.Handle, LB_DELETESTRING, Win32_WPARAM(L)-1, 0); end Delete_Line; ---------------------------------------------------------------------------- -- -- Delete_All: delete all lines in the listbox. -- procedure Delete_All (Control : in Listbox_Type) is P : Window_Ptr := Get_Internals (Control, "Delete_All"); begin Long_Dummy := SendMessage(P.Handle, LB_RESETCONTENT, 0, 0); end Delete_All; ---------------------------------------------------------------------------- -- -- C O M B O B O X O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Combobox: create a combobox. -- function Combobox (Parent : Container_Type'Class; Origin : Point_Type; Width : Integer; Editable : Boolean := True; Font : Font_Type := Parent_Font) return Combobox_Type is W : Combobox_Type; P : Window_Ptr := new Window_Internals; S : Win32_DWORD := CBS_AUTOHSCROLL or WS_GROUP; begin if Editable then S := S or CBS_DROPDOWN; else S := S or CBS_DROPDOWNLIST; end if; W.Internals.Pointer := Reference_Counted_Ptr(P); Create_Child (W, Parent, "combobox", "", 0, S or WS_HSCROLL or WS_VSCROLL or WS_BORDER or WS_TABSTOP, Origin, Width, 120, Font, -1, "Combobox"); return W; end Combobox; ---------------------------------------------------------------------------- -- -- Get_Count: get the number of lines in the combobox. -- function Get_Count (Control : Combobox_Type) return Natural is P : Window_Ptr := Get_Internals (Control, "Get_Count"); begin return Natural(SendMessage(P.Handle,CB_GETCOUNT,0,0)); end Get_Count; ---------------------------------------------------------------------------- -- -- Get_Line: get the number of the current line (0 if no line is -- selected, or if the text in the editbox part of the -- control is not a string selected from the listbox -- part). -- function Get_Line (Control : Combobox_Type) return Natural is P : Window_Ptr := Get_Internals (Control, "Get_Line"); begin return Natural(SendMessage(P.Handle,CB_GETCURSEL,0,0) + 1); end Get_Line; ---------------------------------------------------------------------------- -- -- Get_Length: get the length of the specified line (0 if no line -- is selected). -- function Get_Length (Control : Combobox_Type; Line : Natural := 0) return Natural is P : Window_Ptr := Get_Internals (Control, "Get_Length"); L : Natural := Get_Actual_Line (Control, Line, "Get_Length"); begin if L = 0 then return Natural(SendMessage(P.Handle, WM_GETTEXTLENGTH, 0, 0)); else return Natural(SendMessage(P.Handle, CB_GETLBTEXTLEN, Win32_WPARAM(L)-1, 0)); end if; end Get_Length; ---------------------------------------------------------------------------- -- -- Get_Text: get the text of the specified line (the text of the editbox -- part of the control if the line number is 0). -- function Get_Text (Control : Combobox_Type; Line : Natural := 0) return String is P : Window_Ptr := Get_Internals (Control, "Get_Text"); L : Natural := Get_Actual_Line (Control, Line, "Get_Text"); begin declare A : Win32_String(1..Win32_SIZE(Get_Length(Control,L)+1)) := (others => ' '); begin if L = 0 then Long_Dummy := SendMessage(P.Handle, WM_GETTEXT, Win32_WPARAM(A'Length), To_LPARAM(A)); else Long_Dummy := SendMessage(P.Handle, CB_GETLBTEXT, Win32_WPARAM(L-1), To_LPARAM(A)); end if; return To_String(A); end; end Get_Text; ---------------------------------------------------------------------------- -- -- Set_Text: set the text of the specified line (delete the current -- line and insert its replacement). -- procedure Set_Text (Control : in Combobox_Type; Text : in String; Line : in Natural := 0) is L : Natural := Get_Actual_Line (Control, Line, "Set_Text"); begin Delete_Line (Control, L); if L > Get_Count(Control) then L := 0; end if; Insert_Line (Control, Text, L); end Set_Text; ---------------------------------------------------------------------------- -- -- Select_Line: set the line number for the current selection (deselect -- all lines if the line number is 0). -- procedure Select_Line (Control : in Combobox_Type; Line : in Natural := 0) is P : Window_Ptr := Get_Internals (Control, "Select_Line"); L : Natural := Get_Actual_Line (Control, Line, "Select_Line"); begin Long_Dummy := SendMessage(P.Handle, CB_SETCURSEL, Win32_WPARAM(Line)-1, 0); end Select_Line; ---------------------------------------------------------------------------- -- -- Append_Line: add a line containing the specified line to the end -- of the listbox part of the combobox. -- procedure Append_Line (Control : in Combobox_Type; Text : in String) is P : Window_Ptr := Get_Internals (Control, "Append_Line"); T : Win32_String := To_Array(Text); begin Long_Dummy := SendMessage(P.Handle, CB_ADDSTRING, 0, To_LPARAM(T)); end Append_Line; ---------------------------------------------------------------------------- -- -- Insert_Line: insert a new line above the specified line. If the real -- procedure Insert_Line (Control : in Combobox_Type; Text : in String; Line : in Natural := 0) is P : Window_Ptr := Get_Internals (Control, "Insert_Line"); L : Natural := Get_Actual_Line (Control, Line, "Insert_Line"); T : Win32_String := To_Array(Text); begin if L = 0 then Append_Line (Control, Text); else Long_Dummy := SendMessage(P.Handle, CB_INSERTSTRING, Win32_WPARAM(L)-1, To_LPARAM(T)); end if; end Insert_Line; ---------------------------------------------------------------------------- -- -- Delete_Line: delete the specified line. -- procedure Delete_Line (Control : in Combobox_Type; Line : in Natural := 0) is P : Window_Ptr := Get_Internals (Control, "Delete_Line"); L : Natural := Get_Actual_Line (Control, Line, "Delete_Line"); begin if L = 0 then Select_Line (Control); else Long_Dummy := SendMessage(P.Handle, CB_DELETESTRING, Win32_WPARAM(L)-1, 0); end if; end Delete_Line; ---------------------------------------------------------------------------- -- -- Delete_All: delete all lines in the combobox. -- procedure Delete_All (Control : in Combobox_Type) is P : Window_Ptr := Get_Internals (Control, "Delete_All"); begin Long_Dummy := SendMessage(P.Handle, CB_RESETCONTENT, 0, 0); end Delete_All; ---------------------------------------------------------------------------- -- -- M E M O O P E R A T I O N S -- -- Memos are slightly peculiar because Windows always reports them as -- having at least one line, even when they're completely empty. I've -- decided that a blank last line won't count as a line -- a CR/LF at -- the end of a line is part of the line it ends, and only lines with -- characters in them should count. So there. -- ---------------------------------------------------------------------------- -- -- Last_Line: returns character index of start of last line (for internal -- use only). -- function Last_Line (Memo : in Win32_HWND) return Win32_LONG is L : Win32_LONG; begin L := SendMessage (Memo, EM_GETLINECOUNT, 0, 0); return SendMessage (Memo, EM_LINEINDEX, Win32_WPARAM(L-1), 0); end Last_Line; ---------------------------------------------------------------------------- -- -- Length: returns length of memo text (for internal use only). -- function Length (Memo : in Win32_HWND) return Win32_LONG is begin return SendMessage (Memo, WM_GETTEXTLENGTH, 0, 0); end Length; ---------------------------------------------------------------------------- -- -- Memo: create a memo control as specified. -- function Memo (Parent : Container_Type'Class; Origin : Point_Type; Width : Integer; Height : Integer; Font : Font_Type := Parent_Font) return Memo_Type is W : Memo_Type; P : Window_Ptr := new Window_Internals; begin W.Internals.Pointer := Reference_Counted_Ptr(P); Create_Child (W, Parent, "edit", "", WS_EX_CLIENTEDGE, ES_MULTILINE or ES_WANTRETURN or ES_NOHIDESEL or ES_AUTOHSCROLL or ES_AUTOVSCROLL or WS_HSCROLL or WS_VSCROLL or WS_TABSTOP or WS_GROUP, Origin, Width, Height, Font, -1, "Memo"); P.WndProc := GetWindowLong (P.Handle, GWL_WNDPROC); Long_Dummy := SetWindowLong (P.Handle, GWL_WNDPROC, To_LONG(Memo_Proc'Access)); return W; end Memo; ---------------------------------------------------------------------------- -- -- Get_Column: find the column number where the caret is positioned. -- function Get_Column (Memo : Memo_Type) return Natural is P : Window_Ptr := Get_Internals (Memo, "Get_Column"); S : Integer; L : Win32_LONG; begin Long_Dummy := SendMessage (P.Handle, EM_GETSEL, To_WPARAM(S'Address), 0); L := SendMessage (P.Handle, EM_LINEFROMCHAR, Win32_WPARAM(S), 0); L := SendMessage(P.Handle, EM_LINEINDEX, Win32_WPARAM(L), 0); return S - Integer(L) + 1; end Get_Column; ---------------------------------------------------------------------------- -- -- Modified: test if the user has modified the memo since the last -- time this function was called. -- function Modified (Memo : Memo_Type) return Boolean is P : Window_Ptr := Get_Internals(Memo, "Modified"); B : Boolean; begin B := SendMessage(P.Handle,EM_GETMODIFY,0,0) /= 0; Long_Dummy := SendMessage(P.Handle, EM_SETMODIFY, 0, 0); return B; end Modified; ---------------------------------------------------------------------------- -- -- Cut_Selection: cut the current selection to the clipboard. -- procedure Cut_Selection (Memo : in Memo_Type) is P : Window_Ptr := Get_Internals (Memo, "Cut_Selection"); begin Long_Dummy := SendMessage (P.Handle, WM_CUT, 0, 0); end Cut_Selection; ---------------------------------------------------------------------------- -- -- Copy_Selection: copy the current selection to the clipboard. -- procedure Copy_Selection (Memo : in Memo_Type) is P : Window_Ptr := Get_Internals (Memo, "Copy_Selection"); begin Long_Dummy := SendMessage (P.Handle, WM_COPY, 0, 0); end Copy_Selection; ---------------------------------------------------------------------------- -- -- Paste_Selection: paste the clipboard over the current selection. -- procedure Paste_Selection (Memo : in Memo_Type) is P : Window_Ptr := Get_Internals (Memo, "Paste_Selection"); begin Long_Dummy := SendMessage (P.Handle, WM_PASTE, 0, 0); end Paste_Selection; ---------------------------------------------------------------------------- -- -- Undo_Change: undo the user's last change to the text of the memo. -- procedure Undo_Change (Memo : in Memo_Type) is P : Window_Ptr := Get_Internals (Memo, "Undo_Change"); begin Long_Dummy := SendMessage (P.Handle, WM_UNDO, 0, 0); end Undo_Change; ---------------------------------------------------------------------------- -- -- Show_Selection: scroll the memo so that the caret is in view. -- procedure Show_Selection (Memo : in Memo_Type) is P : Window_Ptr := Get_Internals(Memo, "Show_Selection"); begin Long_Dummy := SendMessage (P.Handle, EM_SCROLLCARET, 0, 0); end Show_Selection; ---------------------------------------------------------------------------- -- -- Get_Count: get the number of lines in the memo. -- function Get_Count (Control : Memo_Type) return Natural is P : Window_Ptr := Get_Internals (Control, "Get_Count"); begin return Natural(SendMessage(P.Handle, EM_GETLINECOUNT, 0, 0)) - Boolean'Pos(Last_Line(P.Handle) = Length(P.Handle)); end Get_Count; ---------------------------------------------------------------------------- -- -- Get_Line: get the number of the line where the caret is positioned. -- Return zero if it's on a blank last line. -- function Get_Line (Control : Memo_Type) return Natural is P : Window_Ptr := Get_Internals (Control, "Get_Line"); begin if Last_Line(P.Handle) = Length(P.Handle) then return 0; else return Natural(SendMessage(P.Handle,EM_LINEFROMCHAR,-1,0)) + 1; end if; end Get_Line; ---------------------------------------------------------------------------- -- -- Get_Length: get the length of the specified line. -- function Get_Length (Control : Memo_Type; Line : Natural := 0) return Natural is P : Window_Ptr := Get_Internals (Control, "Get_Length"); L : Natural := Get_Actual_Line (Control, Line, "Get_Length"); R : Win32_LONG; begin if L = 0 then return 0; else R := SendMessage (P.Handle, EM_LINEINDEX, Win32_WPARAM(L)-1, 0); return Natural(SendMessage(P.Handle,EM_LINELENGTH,Win32_WPARAM(R),0)); end if; end Get_Length; ---------------------------------------------------------------------------- -- -- Get_Text: get the text of the specified line. Note that the EM_GETLINE -- message takes the line length in the first two bytes of the -- destination string, and no terminating null is copied (so -- the rest of the destination string must be initialised to -- nulls). -- function Get_Text (Control : Memo_Type; Line : Natural := 0) return String is P : Window_Ptr := Get_Internals(Control, "Get_Text"); L : Natural := Get_Actual_Line (Control, Line, "Get_Text"); W : Natural; begin W := Get_Length (Control, L); if W = 0 then return ""; else declare A : Win32_String(1..Win32_SIZE(W+1)) := (1 => Win32_CHAR'Val(W mod 16#100#), 2 => Win32_CHAR'Val(W / 16#100#), others => Win32_Char'Val(0)); begin Long_Dummy := SendMessage(P.Handle, EM_GETLINE, Win32_WPARAM(L)-1, To_LPARAM(A)); return To_String(A); end; end if; end Get_Text; ---------------------------------------------------------------------------- -- -- Set_Text: set the text of the specified line (select the line and -- replace the selection). -- procedure Set_Text (Control : in Memo_Type; Text : in String; Line : in Natural := 0) is P : Window_Ptr := Get_Internals (Control, "Set_Text"); L : Natural := Get_Actual_Line (Control, Line, "Set_Text"); S : Win32_LONG; -- start position (start of line) E : Win32_LONG; -- end position (start of next line) T : Win32_String := To_Array(Text); begin if L = 0 then Append_Line (Control, Text); else S := SendMessage(P.Handle, EM_LINEINDEX, Win32_WPARAM(L)-1, 0); E := S + Win32_LONG(Get_Length(Control,L)); Long_Dummy := SendMessage (P.Handle, EM_SETSEL, Win32_WPARAM(S), Win32_LPARAM(E)); Long_Dummy := SendMessage (P.Handle, EM_REPLACESEL, 0, To_LPARAM(T)); end if; end Set_Text; ---------------------------------------------------------------------------- -- -- Select_Line: set the line number for the caret position. -- procedure Select_Line (Control : in Memo_Type; Line : in Natural := 0) is P : Window_Ptr := Get_Internals (Control, "Select_Line"); L : Natural := Get_Actual_Line (Control, Line, "Select_Line"); R : Win32_LONG; begin if L = 0 then R := Length(P.Handle); else R := SendMessage(P.Handle, EM_LINEINDEX, Win32_WPARAM(L)-1, 0); end if; Long_Dummy := SendMessage (P.Handle, EM_SETSEL, Win32_WPARAM(R), Win32_LPARAM(R)); end Select_Line; ---------------------------------------------------------------------------- -- -- Append_Line: add a line containing the specified line to the end -- of the memo. If the last line is not blank, add a -- preceding EOL to start a new line -- procedure Append_Line (Control : in Memo_Type; Text : in String) is P : Window_Ptr := Get_Internals (Control, "Append_Line"); C : Integer; begin C := Integer(Length(P.Handle)); Long_Dummy := SendMessage (P.Handle, EM_SETSEL, Win32_WPARAM(C), Win32_LPARAM(C)); if Last_Line(P.Handle) = Length(P.Handle) then declare T : Win32_String := To_Array(Text); begin Long_Dummy := SendMessage (P.Handle, EM_REPLACESEL, 0, To_LPARAM(T)); end; else declare T : Win32_String := To_Array(EOL & Text); begin Long_Dummy := SendMessage (P.Handle, EM_REPLACESEL, 0, To_LPARAM(T)); end; end if; end Append_Line; ---------------------------------------------------------------------------- -- -- Insert_Line: insert a new line above the specified line. If the line -- number is zero, append the line as above. -- procedure Insert_Line (Control : in Memo_Type; Text : in String; Line : in Natural := 0) is P : Window_Ptr := Get_Internals (Control, "Insert_Line"); L : Natural := Get_Actual_Line (Control, Line, "Select_Line"); T : Win32_String := To_Array(Text & EOL); begin if L = 0 then Append_Line (Control, Text); else Select_Line (Control, Line); Long_Dummy := SendMessage (P.Handle, EM_REPLACESEL, 0, To_LPARAM(T)); end if; end Insert_Line; ---------------------------------------------------------------------------- -- -- Delete_Line: delete the specified line. -- procedure Delete_Line (Control : in Memo_Type; Line : in Natural := 0) is P : Window_Ptr := Get_Internals (Control, "Delete_Line"); L : Natural; S : Win32_LONG; E : Win32_LONG; N : Win32_String := To_Array(""); begin L := Get_Actual_Line (Control, Line, "Delete_Line"); if L > 0 then S := SendMessage(P.Handle, EM_LINEINDEX, Win32_WPARAM(L)-1, 0); E := SendMessage(P.Handle, EM_LINEINDEX, Win32_WPARAM(L), 0); if E < 0 then E := Length(P.Handle); end if; Long_Dummy := SendMessage (P.Handle, EM_SETSEL, Win32_WPARAM(S), Win32_LPARAM(E)); Long_Dummy := SendMessage (P.Handle, EM_REPLACESEL, 0, To_LPARAM(N)); end if; end Delete_Line; ---------------------------------------------------------------------------- -- -- Delete_All: delete all lines in the memo. -- procedure Delete_All (Control : in Memo_Type) is P : Window_Ptr := Get_Internals (Control, "Delete_All"); N : Win32_String := To_Array(""); begin Long_Dummy := SendMessage (P.Handle, WM_SETTEXT, 0, To_LPARAM(N)); end Delete_All; ---------------------------------------------------------------------------- -- -- C A N V A S O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Canvas: create a canvas window which does not generate a command. -- function Canvas (Parent : Container_Type'Class; Origin : Point_Type; Width : Integer; Height : Integer; Font : Font_Type := Parent_Font) return Canvas_Type is W : Canvas_Type; P : Canvas_Ptr := new Canvas_Internals; begin W.Internals.Pointer := Reference_Counted_Ptr(P); Create_Child (W, Parent, To_String(Canvas_Class), "", 0, WS_BORDER or WS_GROUP, Origin, Width, Height, Font, -1, "Canvas"); Set_Fill (W); return W; end Canvas; ---------------------------------------------------------------------------- -- -- Canvas: create a canvas window which generates a command when the -- mouse button is pressed within it. -- function Canvas (Parent : Container_Type'Class; Origin : Point_Type; Width : Integer; Height : Integer; Command : Command_Type; Font : Font_Type := Parent_Font) return Canvas_Type is W : Canvas_Type; P : Canvas_Ptr := new Canvas_Internals; begin W.Internals.Pointer := Reference_Counted_Ptr(P); Create_Child (W, Parent, To_String(Canvas_Class), "", 0, WS_BORDER or WS_GROUP, Origin, Width, Height, Font, Command_Type'Pos(Command), "Canvas"); Set_Fill (W); return W; end Canvas; ---------------------------------------------------------------------------- -- -- Canvas: create a canvas window which generates a command when the -- mouse button or a key is pressed within it. -- function Canvas (Parent : Container_Type'Class; Origin : Point_Type; Width : Integer; Height : Integer; Command : Command_Type; Keypress : Command_Type; Font : Font_Type := Parent_Font) return Canvas_Type is W : Canvas_Type; P : Canvas_Ptr := new Canvas_Internals; begin W.Internals.Pointer := Reference_Counted_Ptr(P); Create_Child (W, Parent, To_String(Canvas_Class), "", 0, WS_BORDER or WS_GROUP, Origin, Width, Height, Font, Command_Type'Pos(Command), "Canvas"); P.Keypress := Command_Type'Pos(Keypress); Focus (W); Set_Fill (W); return W; end Canvas; ---------------------------------------------------------------------------- -- -- Set_Colour: ask the monitor to set the background colour. -- procedure Set_Colour (Canvas : in Canvas_Type; Colour : in Colour_Type := White) is B : Win32_COLORREF := RGB(Colour); C : Canvas_Ptr := Canvas_Ptr(Get_Internals(Canvas, "Set_Colour")); begin C.Monitor.Set_Brush (CreateSolidBrush(B)); Bool_Dummy := InvalidateRect (C.Handle, null, 1); end Set_Colour; ---------------------------------------------------------------------------- -- -- Erase: ask the monitor to delete the drawing list and then redraw -- the window. -- procedure Erase (Canvas : in Canvas_Type) is C : Canvas_Ptr := Canvas_Ptr(Get_Internals(Canvas, "Erase")); begin C.Monitor.Clear; Bool_Dummy := InvalidateRect (C.Handle, null, 1); end Erase; ---------------------------------------------------------------------------- -- -- Save: ask the monitor to save the current position in the drawing list. -- procedure Save (Canvas : in Canvas_Type) is C : Canvas_Ptr := Canvas_Ptr(Get_Internals(Canvas, "Save")); begin C.Monitor.Save; end Save; ---------------------------------------------------------------------------- -- -- Restore: revert to a previously saved position in the drawing list -- (ignored if there is no saved position). This is safe because -- the list always grows unless it is erased, so the saved -- position will be valid until Erase is called, at which point -- the monitor will reset it to null. -- procedure Restore (Canvas : in Canvas_Type) is C : Canvas_Ptr := Canvas_Ptr(Get_Internals(Canvas, "Restore")); begin C.Monitor.Restore; Bool_Dummy := InvalidateRect (C.Handle, null, 1); end Restore; ---------------------------------------------------------------------------- -- -- Set_Font: add a font handle to the drawing list. -- procedure Set_Font (Canvas : in Canvas_Type; Font : in Font_Type) is P : Canvas_Object_Ptr := new Handle_Type; H : Win32_HFONT := Create_Font (Font); begin Handle_Type(P.all).Handle := Handle(H); Add (Canvas, "Set_Font", P); end Set_Font; ---------------------------------------------------------------------------- -- -- Set_Pen: add a pen handle to the drawing list. -- procedure Set_Pen (Canvas : in Canvas_Type; Colour : in Colour_Type := Black; Width : in Natural := 1) is P : Canvas_Object_Ptr := new Handle_Type; S : Win32_COLORREF := RGB(Colour); begin if Width > 0 then Handle_Type(P.all).Handle := Handle (CreatePen(0,Win32_INT(Width),S)); else Handle_Type(P.all).Handle := Handle (GetStockObject(NULL_PEN)); end if; Add (Canvas, "Set_Pen", P); end Set_Pen; ---------------------------------------------------------------------------- -- -- Set_Fill: add a solid brush handle to the drawing list. -- procedure Set_Fill (Canvas : in Canvas_Type; Colour : in Colour_Type) is P : Canvas_Object_Ptr := new Handle_Type; S : Win32_COLORREF := RGB(Colour); begin Handle_Type(P.all).Handle := Handle (CreateSolidBrush(S)); Add (Canvas, "Set_Fill", P); end Set_Fill; ---------------------------------------------------------------------------- -- -- Set_Fill: add a transparent brush handle to the drawing list. -- procedure Set_Fill (Canvas : in Canvas_Type) is P : Canvas_Object_Ptr := new Handle_Type; L : aliased Win32_LOGBRUSH; begin L.lbStyle := BS_HOLLOW; Handle_Type(P.all).Handle := Handle (CreateBrushIndirect(L'Unchecked_Access)); Add (Canvas, "Set_Fill", P); end Set_Fill; ---------------------------------------------------------------------------- -- -- Draw_Text: add a text string to the drawing with the top left -- corner at the specified point. -- procedure Draw_Text (Canvas : in Canvas_Type; From : in Point_Type; Text : in String) is P : Canvas_Object_Ptr := new Text_Type (Text'Length); begin Text_Type(P.all).Text := Text; Text_Type(P.all).From := From; Text_Type(P.all).To := From; Text_Type(P.all).Align := -1; Add (Canvas, "Draw_Text", P); end Draw_Text; ---------------------------------------------------------------------------- -- -- Draw_Text: add a text string to the drawing within a rectangle -- specified by diagonally opposite corners. -- procedure Draw_Text (Canvas : in Canvas_Type; From : in Point_Type; To : in Point_Type; Text : in String; Align : in Alignment_Type := Left) is P : Canvas_Object_Ptr := new Text_Type (Text'Length); begin Text_Type(P.all).Text := Text; Text_Type(P.all).From := From; Text_Type(P.all).To := To; Text_Type(P.all).Align := Alignment_Type'Pos(Align); Add (Canvas, "Draw_Text", P); end Draw_Text; ---------------------------------------------------------------------------- -- -- Draw_Text: calculate the text rectangle from a height and width. -- procedure Draw_Text (Canvas : in Canvas_Type; From : in Point_Type; Width : in Integer; Height : in Integer; Text : in String; Align : in Alignment_Type := Left) is begin Draw_Text (Canvas, From, (From.X+Width,From.Y+Height), Text, Align); end Draw_Text; ---------------------------------------------------------------------------- -- -- Draw_Line: add a line to the drawing between two points. -- procedure Draw_Line (Canvas : in Canvas_Type; From : in Point_Type; To : in Point_Type) is P : Canvas_Object_Ptr := new Line_Type; begin Line_Type(P.all).From := From; Line_Type(P.all).To := To; Add (Canvas, "Draw_Line", P); end Draw_Line; ---------------------------------------------------------------------------- -- -- Draw_Line: calculate the line endpoint from a length and angle. -- procedure Draw_Line (Canvas : in Canvas_Type; From : in Point_Type; Length : in Positive; Angle : in Angle_Type) is To : Point_Type; begin To := Endpoint(From,Length,Angle); Draw_Line (Canvas, From, To); end Draw_Line; ---------------------------------------------------------------------------- -- -- Draw_Line_List: add a polyline to the drawing. Ignore polylines with -- less than two points, and draw an ordinary line for a -- polyline with only two points. -- procedure Draw_Line_List (Canvas : in Canvas_Type; Points : in Point_List) is P : Window_Ptr := Get_Internals (Canvas, "Draw_Line_List"); begin if Points'Length = 2 then Draw_Line (Canvas, Points(Points'First), Points(Points'Last)); elsif Points'Length > 2 then declare P : Canvas_Object_Ptr := new Polyline_Type(Points'Length); begin P.Next := null; for I in 1..Points'Length loop Polyline_Type(P.all).Points(I) := (Win32_LONG(Points(Points'First+I-1).X), Win32_LONG(Points(Points'First+I-1).Y)); end loop; Add (Canvas, "Draw_Line_List", P); end; end if; end Draw_Line_List; ---------------------------------------------------------------------------- -- -- Draw_Rectangle: add either a normal rectangle or a rounded rectangle -- to the drawing, depending on whether the rounding is -- zero or not. -- procedure Draw_Rectangle (Canvas : in Canvas_Type; From : in Point_Type; To : in Point_Type; Rounding : in Point_Type := (0,0)) is P : Canvas_Object_Ptr; begin if Rounding = (0,0) then P := new Rectangle_Type; Rectangle_Type(P.all).From := From; Rectangle_Type(P.all).To := To; else P := new Rounded_Rectangle_Type; Rounded_Rectangle_Type(P.all).From := From; Rounded_Rectangle_Type(P.all).To := To; Rounded_Rectangle_Type(P.all).Corner := Rounding; end if; Add (Canvas, "Draw_Rectangle", P); end Draw_Rectangle; ---------------------------------------------------------------------------- -- -- Draw_Rectangle: calculate the rectangle size from a height and width. -- procedure Draw_Rectangle (Canvas : in Canvas_Type; From : in Point_Type; Width : in Positive; Height : in Positive; Rounding : in Point_Type := (0,0)) is begin Draw_Rectangle (Canvas, From, (From.X+Width, From.Y+Height), Rounding); end Draw_Rectangle; ---------------------------------------------------------------------------- -- -- Draw_Ellipse: draw an ellipse whose size is specified by a bounding -- rectangle. -- procedure Draw_Ellipse (Canvas : in Canvas_Type; From : in Point_Type; To : in Point_Type) is P : Canvas_Object_Ptr := new Ellipse_Type; begin Ellipse_Type(P.all).From := From; Ellipse_Type(P.all).To := To; Add (Canvas, "Draw_Ellipse", P); end Draw_Ellipse; ---------------------------------------------------------------------------- -- -- Draw_Ellipse: calculate the bounding rectangle from a height and width. -- procedure Draw_Ellipse (Canvas : in Canvas_Type; From : in Point_Type; Width : in Positive; Height : in Positive) is begin Draw_Ellipse (Canvas, From, (From.X + Width, From.Y + Height)); end Draw_Ellipse; ---------------------------------------------------------------------------- -- -- Draw_Circle: draw an ellipse in a bounding square calculated from -- the centre point and the radius. -- procedure Draw_Circle (Canvas : in Canvas_Type; Centre : in Point_Type; Radius : in Positive) is P : Window_Ptr := Get_Internals (Canvas, "Draw_Circle"); begin Draw_Ellipse (Canvas, (Centre.X - Radius,Centre.Y - Radius), (Centre.X + Radius,Centre.Y + Radius)); end Draw_Circle; ---------------------------------------------------------------------------- -- -- Draw_Polygon: create and fill a Windows-style array with the coordinates -- of the vertices, then add the polygon to the drawing list. -- Draw a line if there are only two vertices, and do nothing -- if there are less than two vertices. -- procedure Draw_Polygon (Canvas : in Canvas_Type; Points : in Point_List) is P : Window_Ptr := Get_Internals (Canvas, "Draw_Polygon"); begin if Points'Length = 2 then Draw_Line (Canvas, Points(Points'First), Points(Points'Last)); elsif Points'Length > 2 then declare P : Canvas_Object_Ptr := new Polygon_Type(Points'Length); begin P.Next := null; for I in 1..Points'Length loop Polygon_Type(P.all).Points(I) := (Win32_LONG(Points(Points'First+I-1).X), Win32_LONG(Points(Points'First+I-1).Y)); end loop; Add (Canvas, "Draw_Polygon", P); end; end if; end Draw_Polygon; ---------------------------------------------------------------------------- -- -- Draw_Image: draw the specified image on the canvas starting at the -- specified top-left corner point. -- procedure Draw_Image (Canvas : in Canvas_Type; From : in Point_Type; Image : in Image_Type) is I : Image_Ptr; begin if Valid(Image) then I := Image_Ptr(Image.Internals.Pointer); Draw_Image (Canvas, From, I.Width, I.Height, Image); end if; end Draw_Image; ---------------------------------------------------------------------------- -- -- Draw_Image: draw the specified image on the canvas starting at the -- specified top-left corner point, stretching it to the -- specified bottom-right corner point. -- procedure Draw_Image (Canvas : in Canvas_Type; From : in Point_Type; To : in Point_Type; Image : in Image_Type) is L : Integer := Integer'Min(From.X,To.X); T : Integer := Integer'Min(From.Y,To.Y); R : Integer := Integer'Max(From.X,To.X); B : Integer := Integer'Max(From.Y,To.Y); begin Draw_Image (Canvas, (L,T), R-L, B-T, Image); end Draw_Image; ---------------------------------------------------------------------------- -- -- Draw_Image: draw the specified image on the canvas starting at the -- specified top-left corner point, stretching it to the -- specified width and height. -- procedure Draw_Image (Canvas : in Canvas_Type; From : in Point_Type; Width : in Natural; Height : in Natural; Image : in Image_Type) is P : Window_Ptr := Get_Internals (Canvas, "Draw_Image"); B : Canvas_Object_Ptr := new Bitmap_Type; I : Image_Ptr; begin if Valid(Image) then I := Image_Ptr(Image.Internals.Pointer); Bitmap_Type(B.all).From := From; Bitmap_Type(B.all).Width := Width; Bitmap_Type(B.all).Height := Height; Bitmap_Type(B.all).Bitmap := Image.Internals; Add (Canvas, "Draw_Image", B); end if; end Draw_Image; ---------------------------------------------------------------------------- -- -- Mouse_Down: test whether the mouse was pressed within a specific -- canvas. -- function Mouse_Down (Canvas : Canvas_Type) return Boolean is C : Canvas_Ptr := Canvas_Ptr(Get_Internals(Canvas, "Mouse_Down")); begin return C.Monitor.Mouse_Down; end Mouse_Down; ---------------------------------------------------------------------------- -- -- Mouse_Moved: test if the mouse has moved within a canvas, which -- will only be true while the mouse is down after being -- pressed inside this canvas. -- function Mouse_Moved (Canvas : Canvas_Type) return Boolean is C : Canvas_Ptr := Canvas_Ptr(Get_Internals(Canvas, "Mouse_Moved")); begin return C.Monitor.Mouse_Moved; end Mouse_Moved; ---------------------------------------------------------------------------- -- -- Start_Point: get the position where the mouse was pressed within the -- specified canvas. -- function Start_Point (Canvas : Canvas_Type) return Point_Type is C : Canvas_Ptr := Canvas_Ptr(Get_Internals(Canvas, "Start_Point")); P : Point_Type; begin C.Monitor.Get_Start (P.X, P.Y); return P; end Start_Point; ---------------------------------------------------------------------------- -- -- End_Point: get the latest mouse position within the specified canvas. -- function End_Point (Canvas : Canvas_Type) return Point_Type is C : Canvas_Ptr := Canvas_Ptr(Get_Internals(Canvas, "End_Point")); P : Point_Type; begin C.Monitor.Get_End (P.X, P.Y); return P; end End_Point; ---------------------------------------------------------------------------- -- -- Key_Code: get the latest key position within the specified canvas. -- function Key_Code (Canvas : Canvas_Type) return Character is C : Canvas_Ptr := Canvas_Ptr(Get_Internals(Canvas, "Key_Code")); K : Character; begin C.Monitor.Get_Key (K); return K; end Key_Code; ---------------------------------------------------------------------------- -- -- C O M M O N D I A L O G O P E R A T I O N S -- ---------------------------------------------------------------------------- -- -- Execute: execute a common dialog by asking the message loop to call -- its Show_Dialog primitive and return the result. -- function Execute (Dialog : Common_Dialog_Type) return Boolean is P : Common_Dialog_Ptr := Get_Internals (Dialog, "Execute"); B : Boolean; begin Message_Loop.Show_Dialog (P,B); return B; end Execute; ---------------------------------------------------------------------------- -- -- Colour_Dialog: construct a colour dialog. -- function Colour_Dialog return Colour_Dialog_Type is D : Colour_Dialog_Type; P : Colour_Dialog_Ptr := new Colour_Dialog_Internals; begin D.Internals.Pointer := Reference_Counted_Ptr(P); P.Struct.lStructSize := P.Struct'Size / Win32_BYTE'Size; P.Struct.lpCustColors := P.Custom(P.Custom'First)'Access; return D; end Colour_Dialog; ---------------------------------------------------------------------------- -- -- Set_Colour: set the colour stored in a colour dialog. -- procedure Set_Colour (Dialog : in Colour_Dialog_Type; Colour : in Colour_Type) is P : Colour_Dialog_Ptr := Colour_Dialog_Ptr(Get_Internals(Dialog, "Set_Colour")); begin P.Colour := Colour; end Set_Colour; ---------------------------------------------------------------------------- -- -- Get_Colour: get the colour stored in a colour dialog. -- function Get_Colour (Dialog : in Colour_Dialog_Type) return Colour_Type is P : Colour_Dialog_Ptr := Colour_Dialog_Ptr(Get_Internals(Dialog, "Get_Colour")); begin return P.Colour; end Get_Colour; ---------------------------------------------------------------------------- -- -- Font_Dialog: construct a font dialog. -- function Font_Dialog return Font_Dialog_Type is D : Font_Dialog_Type; P : Font_Dialog_Ptr := new Font_Dialog_Internals; begin D.Internals.Pointer := Reference_Counted_Ptr(P); P.Struct.lStructSize := P.Struct'Size / Win32_BYTE'Size; P.Struct.lpLogFont := P.Font'Access; P.Font := Set_Font(Font("Arial",9)); return D; end Font_Dialog; ---------------------------------------------------------------------------- -- -- Set_Font: set the font stored in a font dialog. -- procedure Set_Font (Dialog : in Font_Dialog_Type; Font : in Font_Type) is P : Font_Dialog_Ptr := Font_Dialog_Ptr(Get_Internals(Dialog, "Set_Font")); begin P.Font := Set_Font(Font); end Set_Font; ---------------------------------------------------------------------------- -- -- Get_Font: get the font stored in a font dialog. -- function Get_Font (Dialog : in Font_Dialog_Type) return Font_Type is P : Font_Dialog_Ptr := Font_Dialog_Ptr(Get_Internals(Dialog, "Get_Font")); begin return Get_Font (P.Font); end Get_Font; ---------------------------------------------------------------------------- -- -- Set_Name: set the filename stored in a file dialog. -- procedure Set_Name (Dialog : in File_Dialog_Type; Name : in String) is P : File_Dialog_Ptr := File_Dialog_Ptr(Get_Internals(Dialog, "Set_Name")); begin if P.Buffer'Length > Name'Length then P.Buffer(P.Buffer'First..P.Buffer'First+Name'Length) := To_Array(Name); else P.Buffer := To_Array(Name(Name'First..Name'First+P.Buffer'Length-2)); end if; end Set_Name; ---------------------------------------------------------------------------- -- -- Get_Name: get the filename stored in a file dialog. -- function Get_Name (Dialog : in File_Dialog_Type) return String is P : File_Dialog_Ptr := File_Dialog_Ptr(Get_Internals(Dialog, "Get_Name")); begin return To_String(P.Buffer); end Get_Name; ---------------------------------------------------------------------------- -- -- Add_Filter: add a filename filter to a file dialog. -- procedure Add_Filter (Dialog : in File_Dialog_Type; Text : in String; Filter : in String) is P : File_Dialog_Ptr := File_Dialog_Ptr(Get_Internals(Dialog, "Add_Filter")); begin if P.Length + Text'Length + Filter'Length + 2 < P.Filter'Length then P.Filter (P.Filter'First+P.Length .. P.Filter'First+P.Length+Text'Length) := To_Array(Text); P.Length := P.Length + Text'Length + 1; P.Filter (P.Filter'First+P.Length .. P.Filter'First+P.Length+Filter'Length) := To_Array(Filter); P.Length := P.Length + Filter'Length + 1; P.Filter (P.Filter'First+P.Length) := Win32_CHAR'First; if P.Struct.lpstrFilter = null then P.Struct.lpstrFilter := To_LPCSTR(P.Filter); end if; end if; end Add_Filter; ---------------------------------------------------------------------------- -- -- Set_Directory: select the initial directory for a file dialog. -- procedure Set_Directory (Dialog : in File_Dialog_Type; Name : in String) is P : File_Dialog_Ptr := File_Dialog_Ptr(Get_Internals(Dialog, "Set_Directory")); L : Win32_SIZE := Win32_SIZE'Min(Name'Length,P.Directory'Length-1); begin P.Directory (P.Directory'First .. P.Directory'First+L) := To_Array(Name(Name'First..Name'First+Integer(L)-1)); if P.Struct.lpstrInitialDir = null then P.Struct.lpstrInitialDir := To_LPCSTR(P.Directory); end if; end Set_Directory; ---------------------------------------------------------------------------- -- -- Open_Dialog: construct a file open dialog. -- function Open_Dialog (Title : String) return Open_Dialog_Type is D : Open_Dialog_Type; P : File_Dialog_Ptr := new Open_Dialog_Internals (Title'Length+1); begin D.Internals.Pointer := Reference_Counted_Ptr(P); P.Struct.lStructSize := P.Struct'Size / Win32_BYTE'Size; P.Struct.lpstrTitle := To_LPCSTR(P.Title); P.Struct.lpstrFile := P.Buffer(P.Buffer'First)'Access; P.Struct.nMaxFile := P.Buffer'Length; P.Struct.Flags := OFN_HIDEREADONLY or OFN_FILEMUSTEXIST or OFN_PATHMUSTEXIST; P.Buffer(P.Buffer'First) := Win32_CHAR'Val(0); P.Title := To_Array(Title); return D; end Open_Dialog; ---------------------------------------------------------------------------- -- -- Save_Dialog: construct a file save dialog. -- function Save_Dialog (Title : String; Create : Boolean := True) return Save_Dialog_Type is D : Save_Dialog_Type; P : File_Dialog_Ptr := new Save_Dialog_Internals (Title'Length+1); begin D.Internals.Pointer := Reference_Counted_Ptr(P); P.Struct.lStructSize := P.Struct'Size / Win32_BYTE'Size; P.Struct.lpstrTitle := To_LPCSTR(P.Title); P.Struct.lpstrFile := P.Buffer(P.Buffer'First)'Access; P.Struct.nMaxFile := P.Buffer'Length; P.Struct.Flags := OFN_HIDEREADONLY or OFN_PATHMUSTEXIST; if Create then P.Struct.Flags := P.Struct.Flags or OFN_OVERWRITEPROMPT; else P.Struct.Flags := P.Struct.Flags or OFN_CREATEPROMPT; end if; P.Buffer(1) := Win32_CHAR'Val(0); P.Title := To_Array(Title); return D; end Save_Dialog; ------------------------------------------------------------------------------ -- -- P A C K A G E I N I T I A L I S A T I O N -- -- Register the window classes if there is no previous module instance. -- ------------------------------------------------------------------------------ begin if Get_hPrevInstance = System.Null_Address then declare Class : aliased Win32_WNDCLASS; Dummy : Win32_ATOM; begin -- Set up general window class information Class.Style := CS_HREDRAW or CS_VREDRAW; Class.cbClsExtra := 0; Class.cbWndExtra := 0; Class.hInstance := Get_hInstance; Class.hIcon := LoadIcon(System.Null_Address, To_LPCSTR(IDI_APPLICATION)); Class.hCursor := LoadCursor(System.Null_Address, To_LPCSTR(IDC_ARROW)); Class.hbrBackground := To_Handle(COLOR_BTNFACE+1); Class.lpszMenuName := null; -- Set frame-specific information and register the frame class Class.lpszClassName := To_LPCSTR(Frame_Class); Class.lpfnWndProc := Frame_Proc'Access; Dummy := RegisterClass(Class'Unchecked_Access); -- Set dialog-specific information and register the dialog class Class.lpszClassName := To_LPCSTR(Dialog_Class); Class.lpfnWndProc := Dialog_Proc'Access; Dummy := RegisterClass(Class'Unchecked_Access); -- Set canvas-specific information and register the canvas class Class.lpszClassName := To_LPCSTR(Canvas_Class); Class.hbrBackground := System.Null_Address; Class.lpfnWndProc := Canvas_Proc'Access; Dummy := RegisterClass(Class'Unchecked_Access); end; end if; end JEWL.Windows;
37.127291
81
0.500462
417147fe1e452d293c1da0b2c3ab3f8ccf7ade12
9,504
ads
Ada
source/xml/sax/matreshka-internals-xml-attribute_tables.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/xml/sax/matreshka-internals-xml-attribute_tables.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/xml/sax/matreshka-internals-xml-attribute_tables.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
4
2017-07-18T07:11:05.000Z
2020-06-21T03:02:25.000Z
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- XML Processor -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2010, Vadim Godunko <[email protected]> -- -- 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$ ------------------------------------------------------------------------------ with Matreshka.Internals.Strings; package Matreshka.Internals.XML.Attribute_Tables is pragma Preelaborate; type Attribute_Table is limited private; procedure New_CDATA_Attribute (Self : in out Attribute_Table; Name : Symbol_Identifier; Attribute : out Attribute_Identifier); -- Allocates new attribute of CDATA type. procedure New_Entity_Attribute (Self : in out Attribute_Table; Name : Symbol_Identifier; Attribute : out Attribute_Identifier); -- Allocates new attribute of ENTITY type. procedure New_Entities_Attribute (Self : in out Attribute_Table; Name : Symbol_Identifier; Attribute : out Attribute_Identifier); -- Allocates new attribute of ENTITIES type. procedure New_Id_Attribute (Self : in out Attribute_Table; Name : Symbol_Identifier; Attribute : out Attribute_Identifier); -- Allocates new attribute of ID type. procedure New_IdRef_Attribute (Self : in out Attribute_Table; Name : Symbol_Identifier; Attribute : out Attribute_Identifier); -- Allocates new attribute of IDREF type. procedure New_IdRefs_Attribute (Self : in out Attribute_Table; Name : Symbol_Identifier; Attribute : out Attribute_Identifier); -- Allocates new attribute of IDREFS type. procedure New_NmToken_Attribute (Self : in out Attribute_Table; Name : Symbol_Identifier; Attribute : out Attribute_Identifier); -- Allocates new attribute of NMTOKEN type. procedure New_NmTokens_Attribute (Self : in out Attribute_Table; Name : Symbol_Identifier; Attribute : out Attribute_Identifier); -- Allocates new attribute of NMTOKENS type. procedure New_Notation_Attribute (Self : in out Attribute_Table; Name : Symbol_Identifier; Attribute : out Attribute_Identifier); -- Allocates new attribute of NOTATION type. procedure New_Enumeration_Attribute (Self : in out Attribute_Table; Name : Symbol_Identifier; Attribute : out Attribute_Identifier); -- Allocates new attribute of enumeration type. function Is_ID (Self : Attribute_Table; Attribute : Attribute_Identifier) return Boolean; -- Returns True when attribute has ID type. function Is_CDATA (Self : Attribute_Table; Attribute : Attribute_Identifier) return Boolean; -- Returns True when attribute has CDATA type. procedure Append (Self : in out Attribute_Table; Attribute : Attribute_Identifier; Next : Attribute_Identifier); -- Append attribute specified by Next to the list of attributes started -- by Attribute. function Name (Self : Attribute_Table; Attribute : Attribute_Identifier) return Symbol_Identifier; -- Returns name of the attribute. function Next (Self : Attribute_Table; Attribute : Attribute_Identifier) return Attribute_Identifier; -- Returns next attribute in the list of attributes of the element. function Is_Required (Self : Attribute_Table; Attribute : Attribute_Identifier) return Boolean; procedure Set_Is_Required (Self : in out Attribute_Table; Attribute : Attribute_Identifier; Value : Boolean); function Is_Implied (Self : Attribute_Table; Attribute : Attribute_Identifier) return Boolean; procedure Set_Is_Implied (Self : in out Attribute_Table; Attribute : Attribute_Identifier; Value : Boolean); function Is_Fixed (Self : Attribute_Table; Attribute : Attribute_Identifier) return Boolean; procedure Set_Is_Fixed (Self : in out Attribute_Table; Attribute : Attribute_Identifier; Value : Boolean); function Default (Self : Attribute_Table; Attribute : Attribute_Identifier) return not null Matreshka.Internals.Strings.Shared_String_Access; procedure Set_Default (Self : in out Attribute_Table; Attribute : Attribute_Identifier; Value : not null Matreshka.Internals.Strings.Shared_String_Access); function Has_Default (Self : Attribute_Table; Attribute : Attribute_Identifier) return Boolean; -- Returns True when attribute has default value. This is synthetic value, -- attribute has default value when it is not declared as REQUIRED or -- IMPLIED. function Symbol_Of_Type_Name (Self : Attribute_Table; Attribute : Attribute_Identifier) return Symbol_Identifier; -- Returns symbol of type name of the attribute. procedure Reset (Self : in out Attribute_Table); -- Resets internal structures to initial state. procedure Finalize (Self : in out Attribute_Table); -- Releases all ocupied resources. private type Attribute_Types is (CDATA, ENTITY, ENTITIES, ID, IDREF, IDREFS, NMTOKEN, NMTOKENS, NOTATION, ENUMERATION); type Attribute_Record is record Name : Symbol_Identifier; The_Type : Attribute_Types; Is_Required : Boolean; Is_Implied : Boolean; Is_Fixed : Boolean; Default : Matreshka.Internals.Strings.Shared_String_Access; Next : Attribute_Identifier; -- Next attribute for the same element type. end record; type Attribute_Array is array (Attribute_Identifier range <>) of Attribute_Record; type Attribute_Array_Access is access all Attribute_Array; type Attribute_Table is limited record Table : Attribute_Array_Access := new Attribute_Array (1 .. 16); Last : Attribute_Identifier := No_Attribute; end record; pragma Inline (Name); pragma Inline (Next); pragma Inline (Default); pragma Inline (Is_CDATA); pragma Inline (Is_Fixed); pragma Inline (Is_ID); pragma Inline (Is_Implied); pragma Inline (Is_Required); pragma Inline (Set_Default); pragma Inline (Set_Is_Fixed); pragma Inline (Set_Is_Implied); pragma Inline (Set_Is_Required); end Matreshka.Internals.XML.Attribute_Tables;
39.111111
78
0.58407
57366d54bcaa607adac00bb3676b70259abf1429
6,293
adb
Ada
bb-runtimes/runtimes/ravenscar-full-stm32f3x4/gnat/a-zchuni.adb
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/runtimes/ravenscar-full-stm32f3x4/gnat/a-zchuni.adb
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/runtimes/ravenscar-full-stm32f3x4/gnat/a-zchuni.adb
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . W I D E _ W I D E _ C H A R A C T E R T S . U N I C O D E -- -- -- -- B o d y -- -- -- -- Copyright (C) 2005-2021, 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. -- -- -- ------------------------------------------------------------------------------ package body Ada.Wide_Wide_Characters.Unicode is package G renames System.UTF_32; ------------------ -- Get_Category -- ------------------ function Get_Category (U : Wide_Wide_Character) return Category is begin return Category (G.Get_Category (Wide_Wide_Character'Pos (U))); end Get_Category; -------------- -- Is_Digit -- -------------- function Is_Digit (U : Wide_Wide_Character) return Boolean is begin return G.Is_UTF_32_Digit (Wide_Wide_Character'Pos (U)); end Is_Digit; function Is_Digit (C : Category) return Boolean is begin return G.Is_UTF_32_Digit (G.Category (C)); end Is_Digit; --------------- -- Is_Letter -- --------------- function Is_Letter (U : Wide_Wide_Character) return Boolean is begin return G.Is_UTF_32_Letter (Wide_Wide_Character'Pos (U)); end Is_Letter; function Is_Letter (C : Category) return Boolean is begin return G.Is_UTF_32_Letter (G.Category (C)); end Is_Letter; ------------------------ -- Is_Line_Terminator -- ------------------------ function Is_Line_Terminator (U : Wide_Wide_Character) return Boolean is begin return G.Is_UTF_32_Line_Terminator (Wide_Wide_Character'Pos (U)); end Is_Line_Terminator; ------------- -- Is_Mark -- ------------- function Is_Mark (U : Wide_Wide_Character) return Boolean is begin return G.Is_UTF_32_Mark (Wide_Wide_Character'Pos (U)); end Is_Mark; function Is_Mark (C : Category) return Boolean is begin return G.Is_UTF_32_Mark (G.Category (C)); end Is_Mark; -------------------- -- Is_Non_Graphic -- -------------------- function Is_Non_Graphic (U : Wide_Wide_Character) return Boolean is begin return G.Is_UTF_32_Non_Graphic (Wide_Wide_Character'Pos (U)); end Is_Non_Graphic; function Is_Non_Graphic (C : Category) return Boolean is begin return G.Is_UTF_32_Non_Graphic (G.Category (C)); end Is_Non_Graphic; ------------- -- Is_NFKC -- ------------- function Is_NFKC (U : Wide_Wide_Character) return Boolean is begin return G.Is_UTF_32_NFKC (Wide_Wide_Character'Pos (U)); end Is_NFKC; -------------- -- Is_Other -- -------------- function Is_Other (U : Wide_Wide_Character) return Boolean is begin return G.Is_UTF_32_Other (Wide_Wide_Character'Pos (U)); end Is_Other; function Is_Other (C : Category) return Boolean is begin return G.Is_UTF_32_Other (G.Category (C)); end Is_Other; -------------------- -- Is_Punctuation -- -------------------- function Is_Punctuation (U : Wide_Wide_Character) return Boolean is begin return G.Is_UTF_32_Punctuation (Wide_Wide_Character'Pos (U)); end Is_Punctuation; function Is_Punctuation (C : Category) return Boolean is begin return G.Is_UTF_32_Punctuation (G.Category (C)); end Is_Punctuation; -------------- -- Is_Space -- -------------- function Is_Space (U : Wide_Wide_Character) return Boolean is begin return G.Is_UTF_32_Space (Wide_Wide_Character'Pos (U)); end Is_Space; function Is_Space (C : Category) return Boolean is begin return G.Is_UTF_32_Space (G.Category (C)); end Is_Space; ------------------- -- To_Lower_Case -- ------------------- function To_Lower_Case (U : Wide_Wide_Character) return Wide_Wide_Character is begin return Wide_Wide_Character'Val (G.UTF_32_To_Lower_Case (Wide_Wide_Character'Pos (U))); end To_Lower_Case; ------------------- -- To_Upper_Case -- ------------------- function To_Upper_Case (U : Wide_Wide_Character) return Wide_Wide_Character is begin return Wide_Wide_Character'Val (G.UTF_32_To_Upper_Case (Wide_Wide_Character'Pos (U))); end To_Upper_Case; end Ada.Wide_Wide_Characters.Unicode;
33.473404
78
0.495948
06c8832dfe3480af656639b97c81e4f1a39fdb4e
3,141
ads
Ada
llvm-gcc-4.2-2.9/gcc/ada/s-pack31.ads
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
1
2016-04-09T02:58:13.000Z
2016-04-09T02:58:13.000Z
llvm-gcc-4.2-2.9/gcc/ada/s-pack31.ads
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
llvm-gcc-4.2-2.9/gcc/ada/s-pack31.ads
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . P A C K _ 3 1 -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2005, 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 2, 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. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Handling of packed arrays with Component_Size = 31 package System.Pack_31 is pragma Preelaborate; Bits : constant := 31; type Bits_31 is mod 2 ** Bits; for Bits_31'Size use Bits; function Get_31 (Arr : System.Address; N : Natural) return Bits_31; -- Arr is the address of the packed array, N is the zero-based -- subscript. This element is extracted and returned. procedure Set_31 (Arr : System.Address; N : Natural; E : Bits_31); -- Arr is the address of the packed array, N is the zero-based -- subscript. This element is set to the given value. end System.Pack_31;
59.264151
78
0.463865
062999b90365af431d2d4dc1f9c94d82baefaed5
12,447
adb
Ada
src/tp3_niget.adb
zdimension/tdinfo302
0bfa11f56215a7afc0e9ff58d3fb296c184f23b4
[ "MIT" ]
null
null
null
src/tp3_niget.adb
zdimension/tdinfo302
0bfa11f56215a7afc0e9ff58d3fb296c184f23b4
[ "MIT" ]
null
null
null
src/tp3_niget.adb
zdimension/tdinfo302
0bfa11f56215a7afc0e9ff58d3fb296c184f23b4
[ "MIT" ]
null
null
null
with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Strings.Maps.Constants; -- NIGET TOM PEIP2-B2 -- IMPORTANT ! -- Si vous utilisez GNAT ou une vieille version d'Ada pas aux normes, -- décommentez la ligne ci-dessous et commentez celle juste après --with Ada.Strings.Unbounded_Text_IO; use Ada.Strings.Unbounded_Text_IO; with Ada.Text_IO.Unbounded_IO; use Ada.Text_IO.Unbounded_IO; procedure tp3_niget is type T_Couleur_Vin is (Rouge, Blanc, Rose); -- pour l'affichage Couleur_Vin_Aff : array (T_Couleur_Vin) of Unbounded_String := ( To_Unbounded_String("rouge"), To_Unbounded_String("blanc"), To_Unbounded_String("rosé") ); type T_Région is ( Alsace, Beaujolais, Bordeaux, Bourgogne, Chablis, Champagne, Corse, Jura, Languedoc_Roussillon, Loire, Provence, Rhone, Savoie, Sud_Ouest ); -- pour l'affichage Région_Aff : array (T_Région) of Unbounded_String := ( To_Unbounded_String("Alsace"), To_Unbounded_String("Beaujolais"), To_Unbounded_String("Bordeaux"), To_Unbounded_String("Bourgogne"), To_Unbounded_String("Chablis"), To_Unbounded_String("Champagne"), To_Unbounded_String("Corse"), To_Unbounded_String("Jura"), To_Unbounded_String("Languedoc-Roussillon"), To_Unbounded_String("Loire"), To_Unbounded_String("Provence"), To_Unbounded_String("Rhône"), To_Unbounded_String("Savoie"), To_Unbounded_String("Sud-Ouest") ); type T_Vin is record Nom : Unbounded_String; Région : T_Région; Couleur : T_Couleur_Vin; Millésime : Integer; Quantité : Natural; end record; TAILLE_CAVE : constant Positive := 40; Cave : array (1..TAILLE_CAVE) of T_Vin; subtype Pos_Vin is Integer range Cave'Range; -- nombre de cases occupées de Cave Cave_NB : Natural range 0..TAILLE_CAVE := 0; -- pose une question fermée function Choix(Msg : Unbounded_String) return Boolean is Rep : Character; begin Put(Msg & " [O/N] "); Get(Rep); return Rep = 'O' or Rep = 'o'; end Choix; -- a < b : -1 -- a = b : 0 -- a > b : 1 subtype Comparaison is Integer range -1..1; -- compare deux chaînes sans se préoccuper de la casse function Compare_Chaines(A, B : Unbounded_String) return Comparaison is X : Unbounded_String := A; Y : Unbounded_String := B; begin -- passage en minuscule pour mettre X et Y sur un pied d'égalité -- pour éviter les 'z' > 'A' et autres loufoqueries des comparateurs d'Ada Ada.Strings.Unbounded.Translate(X, Ada.Strings.Maps.Constants.Lower_Case_Map); Ada.Strings.Unbounded.Translate(Y, Ada.Strings.Maps.Constants.Lower_Case_Map); if X > Y then return 1; elsif X < Y then return -1; else return 0; end if; end Compare_Chaines; -- détermine l'emplacement où insérer un nouveau vin -- par recherche dichotomique function Indice_Correct(Q : Unbounded_String) return Pos_Vin is -- bornes A : Pos_Vin := 1; B : Pos_Vin; -- milieu de l'intervalle Mid : Pos_Vin; -- valeur à comparer Val : Unbounded_String; -- résultat de comparaison Comp : Comparaison; begin -- si la cave est vide, on insère au début if Cave_NB = 0 then return 1; else B := Cave_NB; end if; while A < B loop Mid := (A + B) / 2; Val := Cave(Mid).Nom; Comp := Compare_Chaines(Q, Val); if Comp = 0 then return Mid + 1; -- +1 pour ajouter à la fin d'une suite d'éléments équivalents et non au début elsif Comp = -1 then B := Mid; elsif Comp = 1 then if A = Mid then return B + 1; end if; A := Mid; end if; end loop; return B; end Indice_Correct; -- vérifie si la cave est vide, affiche une erreur le cas échéant function Verif_Vide return Boolean is begin if Cave_NB = 0 then Put_Line("*** La cave est vide ! ***"); return True; end if; return False; end Verif_Vide; -- affiche les caractéristiques d'un vin procedure Aff_Vin(Vin : T_Vin) is begin Put_Line(Vin.Nom & " - vin " & Couleur_Vin_Aff(Vin.Couleur) & " d'origine " & Région_Aff(Vin.Région) & ", millésime" & Integer'Image(Vin.Millésime) & ", stock :" & Integer'Image(Vin.Quantité)); end Aff_Vin; -- liste les vins procedure A_Liste_Vins is begin if Verif_Vide then return; end if; Put_Line("Il y a" & Integer'Image(Cave_NB) & " vins :"); for i in 1..Cave_NB loop Put(Integer'Image(i) & "- "); Aff_Vin(Cave(i)); end loop; end A_Liste_Vins; -- demande à l'utilisateur de choisir un vin function Choisir_Vin return Pos_Vin is N_Vin : Integer; begin A_Liste_Vins; loop Put_Line("Veuillez saisir le numéro du vin."); Put("> "); Get(N_Vin); exit when N_Vin in 1..Cave_NB; Put_Line("*** Numéro de vin incorrect ! ***"); end loop; return N_Vin; end Choisir_Vin; -- insère un vin à la position spécifiée -- pour cela, décale vers la droite celles qui sont dans le chemin procedure Insérer_Vin(Vin : T_Vin; Pos : Pos_Vin) is begin for i in reverse Pos..Cave_NB loop Cave(i + 1) := Cave(i); end loop; Cave(Pos) := Vin; Cave_NB := Cave_NB + 1; end Insérer_Vin; -- supprime le vin à la position spécifiée procedure A_Suppr_Vin(N : Integer := -1) is N_Vin : Pos_Vin; begin if N not in Pos_Vin'Range then N_Vin := Choisir_Vin; else N_Vin := N; end if; if not Choix(To_Unbounded_String("*** Cette action est irréversible ! Êtes-vous sûr(e) ? ***")) then return; end if; Put_Line("*** Suppression de " & Cave(N_Vin).Nom & " ***"); for i in N_Vin..Cave_NB loop Cave(i) := Cave(i + 1); end loop; Cave_NB := Cave_NB - 1; end A_Suppr_Vin; procedure A_Ajout_Bouteille(N : Integer := -1) is N_Vin : Pos_Vin; Quant : Positive; begin if Verif_Vide then return; end if; if N not in Pos_Vin'Range then N_Vin := Choisir_Vin; else N_Vin := N; end if; Put("Nombre de bouteilles à ajouter au stock : "); Get(Quant); Cave(N_Vin).Quantité := Cave(N_Vin).Quantité + Quant; end A_Ajout_Bouteille; -- lit et ajoute un ou plusieurs vins procedure A_Ajout_Vin is Vin : T_Vin; Ent : Integer; Existe : Boolean := False; begin loop if Cave_NB = TAILLE_CAVE then Put_Line("*** La cave est pleine ! ***"); exit; end if; -- efface le buffer d'entrée pour éviter de -- relire le retour chariot précédemment entré -- lors du choix de l'opération Skip_Line; Put_Line("Veuillez saisir les informations du vin."); Put("Nom : "); Vin.Nom := Get_Line; Existe := False; for i in Cave'Range loop if Compare_Chaines(Cave(i).Nom, Vin.Nom) = 0 then Put_Line("*** Le vin est déjà présent dans la base, entrée en mode ajout de bouteille ***"); A_Ajout_Bouteille(i); Existe := True; end if; end loop; if not Existe then for r in T_Région'Range loop Put_Line(Integer'Image(T_Région'Pos(r) + 1) & "- " & Région_Aff(r)); end loop; loop Put("Région : "); Get(Ent); exit when Ent in 1..(T_Région'Pos(T_Région'Last) + 1); Put_Line("*** Numéro de région incorrect ! ***"); end loop; Vin.Région := T_Région'Val(Ent - 1); for r in T_Couleur_Vin'Range loop Put_Line(Integer'Image(T_Couleur_Vin'Pos(r) + 1) & "- " & Couleur_Vin_Aff(r)); end loop; loop Put("Couleur : "); Get(Ent); exit when Ent in 1..(T_Couleur_Vin'Pos(T_Couleur_Vin'Last) + 1); Put_Line("*** Numéro de couleur incorrect ! ***"); end loop; Vin.Couleur := T_Couleur_Vin'Val(Ent - 1); Put("Millésime : "); Get(Vin.Millésime); Put("Quantité : "); Get(Vin.Quantité); Insérer_Vin(Vin, Indice_Correct(Vin.Nom)); end if; exit when not Choix(To_Unbounded_String("Voulez-vous ajouter un autre vin ?")); end loop; end A_Ajout_Vin; -- lit et sort une ou plusieures bouteilles procedure A_Sortir_Bouteille is N_Vin : Integer; N_Quant : Integer; begin loop if Verif_Vide then return; end if; N_Vin := Choisir_Vin; loop Put_Line("Combien de bouteilles voulez-vous sortir ?"); Put("> "); Get(N_Quant); exit when N_Quant in 1..Cave(N_Vin).Quantité; Put_Line("*** La quantité doit être entre 1 et " & Integer'Image(Cave(N_Vin).Quantité) & " ! ***"); end loop; Cave(N_Vin).Quantité := Cave(N_Vin).Quantité - N_Quant; if Cave(N_Vin).Quantité = 0 then Put_Line("*** Le vin est en rupture de stock ***"); if Choix(To_Unbounded_String("*** Voulez-vous le supprimer de la base ? ***")) then A_Suppr_Vin(N_Vin); end if; end if; A_Liste_Vins; exit when not Choix(To_Unbounded_String("Voulez-vous sortir une autre bouteille ?")); end loop; end A_Sortir_Bouteille; Action : Character; begin -- mettre à True pour charger des données d'exemple -- pour ne pas avoir à tout saisir à la main if True then Cave := ( (To_Unbounded_String("Beaujolais AOC"),Beaujolais,Rouge,2000,7), (To_Unbounded_String("Chablis AOC"),Bourgogne,Blanc,2017,11), (To_Unbounded_String("Côtes de Provence"),Provence,Rose,1999,11), (To_Unbounded_String("Saint-Emilion"),Bordeaux,Rouge,2003,3), others => <> ); Cave_NB := 4; end if; loop -- affichage du menu Put_Line("Choisissez une opération à effectuer :"); Put_Line(" 1- Ajouter un vin"); Put_Line(" 2- Supprimer un vin"); Put_Line(" 3- Ajouter une bouteille"); Put_Line(" 4- Sortir une bouteille"); Put_Line(" 5- Afficher la liste des vins"); Put_Line(" 6- Quitter"); Put("> "); Get(Action); New_Line; case Action is when '1' => A_Ajout_Vin; when '2' => A_Suppr_Vin; when '3' => A_Ajout_Bouteille; when '4' => A_Sortir_Bouteille; when '5' => A_Liste_Vins; when '6' => exit; when others => Put_Line("*** Numéro d'opération incorrect ! ***"); end case; New_Line; end loop; end tp3_niget;
32.414063
115
0.524544
12bea11a3110c2bd3c101020544b9564f52e76bd
508
adb
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/pack5.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/pack5.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/pack5.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
-- { dg-do compile } procedure Pack5 is type Kind is (v1, v2, v3); type Error (k : Kind := Kind'First) is record case k is when v1 => null; when v2 => null; when Others => B : Boolean; end case; end record; pragma Pack (Error); for Error'Size use 16; No_Error: constant Error := (k => v2); type R (B : Boolean) is record E : Error; end record; pragma Pack(R); type Ptr is access R; C : Ptr := new R (True); begin C.E := No_Error; end;
15.393939
47
0.559055
418c637d728c6af4d8054e001973080df6ffceb9
3,690
adb
Ada
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-conca7.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-conca7.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-conca7.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . C O N C A T _ 7 -- -- -- -- B o d y -- -- -- -- Copyright (C) 2008-2019, 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. -- -- -- ------------------------------------------------------------------------------ pragma Compiler_Unit_Warning; with System.Concat_6; package body System.Concat_7 is pragma Suppress (All_Checks); ------------------ -- Str_Concat_7 -- ------------------ procedure Str_Concat_7 (R : out String; S1, S2, S3, S4, S5, S6, S7 : String) is F, L : Natural; begin F := R'First; L := F + S1'Length - 1; R (F .. L) := S1; F := L + 1; L := F + S2'Length - 1; R (F .. L) := S2; F := L + 1; L := F + S3'Length - 1; R (F .. L) := S3; F := L + 1; L := F + S4'Length - 1; R (F .. L) := S4; F := L + 1; L := F + S5'Length - 1; R (F .. L) := S5; F := L + 1; L := F + S6'Length - 1; R (F .. L) := S6; F := L + 1; L := R'Last; R (F .. L) := S7; end Str_Concat_7; ------------------------- -- Str_Concat_Bounds_7 -- ------------------------- procedure Str_Concat_Bounds_7 (Lo, Hi : out Natural; S1, S2, S3, S4, S5, S6, S7 : String) is begin System.Concat_6.Str_Concat_Bounds_6 (Lo, Hi, S2, S3, S4, S5, S6, S7); if S1 /= "" then Hi := S1'Last + Hi - Lo + 1; Lo := S1'First; end if; end Str_Concat_Bounds_7; end System.Concat_7;
37.653061
78
0.382114
a1bc17cb020fff59cbc2fdd89cb450285948957e
12,707
ads
Ada
gcc-gcc-7_3_0-release/gcc/ada/a-cdlili.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/ada/a-cdlili.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/ada/a-cdlili.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- A D A . C O N T A I N E R S . D O U B L Y _ L I N K E D _ L I S T S -- -- -- -- S p e c -- -- -- -- Copyright (C) 2004-2015, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- -- apply solely to the contents of the part following the private keyword. -- -- -- -- 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/>. -- -- -- -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ with Ada.Iterator_Interfaces; with Ada.Containers.Helpers; private with Ada.Finalization; private with Ada.Streams; generic type Element_Type is private; with function "=" (Left, Right : Element_Type) return Boolean is <>; package Ada.Containers.Doubly_Linked_Lists is pragma Annotate (CodePeer, Skip_Analysis); pragma Preelaborate; pragma Remote_Types; type List is tagged private with Constant_Indexing => Constant_Reference, Variable_Indexing => Reference, Default_Iterator => Iterate, Iterator_Element => Element_Type; pragma Preelaborable_Initialization (List); type Cursor is private; pragma Preelaborable_Initialization (Cursor); Empty_List : constant List; No_Element : constant Cursor; function Has_Element (Position : Cursor) return Boolean; package List_Iterator_Interfaces is new Ada.Iterator_Interfaces (Cursor, Has_Element); function "=" (Left, Right : List) return Boolean; function Length (Container : List) return Count_Type; function Is_Empty (Container : List) return Boolean; procedure Clear (Container : in out List); function Element (Position : Cursor) return Element_Type; procedure Replace_Element (Container : in out List; Position : Cursor; New_Item : Element_Type); procedure Query_Element (Position : Cursor; Process : not null access procedure (Element : Element_Type)); procedure Update_Element (Container : in out List; Position : Cursor; Process : not null access procedure (Element : in out Element_Type)); type Constant_Reference_Type (Element : not null access constant Element_Type) is private with Implicit_Dereference => Element; type Reference_Type (Element : not null access Element_Type) is private with Implicit_Dereference => Element; function Constant_Reference (Container : aliased List; Position : Cursor) return Constant_Reference_Type; pragma Inline (Constant_Reference); function Reference (Container : aliased in out List; Position : Cursor) return Reference_Type; pragma Inline (Reference); procedure Assign (Target : in out List; Source : List); function Copy (Source : List) return List; procedure Move (Target : in out List; Source : in out List); procedure Insert (Container : in out List; Before : Cursor; New_Item : Element_Type; Count : Count_Type := 1); procedure Insert (Container : in out List; Before : Cursor; New_Item : Element_Type; Position : out Cursor; Count : Count_Type := 1); procedure Insert (Container : in out List; Before : Cursor; Position : out Cursor; Count : Count_Type := 1); procedure Prepend (Container : in out List; New_Item : Element_Type; Count : Count_Type := 1); procedure Append (Container : in out List; New_Item : Element_Type; Count : Count_Type := 1); procedure Delete (Container : in out List; Position : in out Cursor; Count : Count_Type := 1); procedure Delete_First (Container : in out List; Count : Count_Type := 1); procedure Delete_Last (Container : in out List; Count : Count_Type := 1); procedure Reverse_Elements (Container : in out List); function Iterate (Container : List) return List_Iterator_Interfaces.Reversible_Iterator'Class; function Iterate (Container : List; Start : Cursor) return List_Iterator_Interfaces.Reversible_Iterator'Class; procedure Swap (Container : in out List; I, J : Cursor); procedure Swap_Links (Container : in out List; I, J : Cursor); procedure Splice (Target : in out List; Before : Cursor; Source : in out List); procedure Splice (Target : in out List; Before : Cursor; Source : in out List; Position : in out Cursor); procedure Splice (Container : in out List; Before : Cursor; Position : Cursor); function First (Container : List) return Cursor; function First_Element (Container : List) return Element_Type; function Last (Container : List) return Cursor; function Last_Element (Container : List) return Element_Type; function Next (Position : Cursor) return Cursor; procedure Next (Position : in out Cursor); function Previous (Position : Cursor) return Cursor; procedure Previous (Position : in out Cursor); function Find (Container : List; Item : Element_Type; Position : Cursor := No_Element) return Cursor; function Reverse_Find (Container : List; Item : Element_Type; Position : Cursor := No_Element) return Cursor; function Contains (Container : List; Item : Element_Type) return Boolean; procedure Iterate (Container : List; Process : not null access procedure (Position : Cursor)); procedure Reverse_Iterate (Container : List; Process : not null access procedure (Position : Cursor)); generic with function "<" (Left, Right : Element_Type) return Boolean is <>; package Generic_Sorting is function Is_Sorted (Container : List) return Boolean; procedure Sort (Container : in out List); procedure Merge (Target, Source : in out List); end Generic_Sorting; private pragma Inline (Next); pragma Inline (Previous); use Ada.Containers.Helpers; package Implementation is new Generic_Implementation; use Implementation; type Node_Type; type Node_Access is access Node_Type; type Node_Type is limited record Element : aliased Element_Type; Next : Node_Access; Prev : Node_Access; end record; use Ada.Finalization; use Ada.Streams; type List is new Controlled with record First : Node_Access := null; Last : Node_Access := null; Length : Count_Type := 0; TC : aliased Tamper_Counts; end record; overriding procedure Adjust (Container : in out List); overriding procedure Finalize (Container : in out List) renames Clear; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out List); for List'Read use Read; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : List); for List'Write use Write; type List_Access is access all List; for List_Access'Storage_Size use 0; type Cursor is record Container : List_Access; Node : Node_Access; end record; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Cursor); for Cursor'Read use Read; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Cursor); for Cursor'Write use Write; subtype Reference_Control_Type is Implementation.Reference_Control_Type; -- It is necessary to rename this here, so that the compiler can find it type Constant_Reference_Type (Element : not null access constant Element_Type) is record Control : Reference_Control_Type := raise Program_Error with "uninitialized reference"; -- The RM says, "The default initialization of an object of -- type Constant_Reference_Type or Reference_Type propagates -- Program_Error." end record; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Constant_Reference_Type); for Constant_Reference_Type'Write use Write; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Constant_Reference_Type); for Constant_Reference_Type'Read use Read; type Reference_Type (Element : not null access Element_Type) is record Control : Reference_Control_Type := raise Program_Error with "uninitialized reference"; -- The RM says, "The default initialization of an object of -- type Constant_Reference_Type or Reference_Type propagates -- Program_Error." end record; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Reference_Type); for Reference_Type'Write use Write; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Reference_Type); for Reference_Type'Read use Read; -- Three operations are used to optimize in the expansion of "for ... of" -- loops: the Next(Cursor) procedure in the visible part, and the following -- Pseudo_Reference and Get_Element_Access functions. See Sem_Ch5 for -- details. function Pseudo_Reference (Container : aliased List'Class) return Reference_Control_Type; pragma Inline (Pseudo_Reference); -- Creates an object of type Reference_Control_Type pointing to the -- container, and increments the Lock. Finalization of this object will -- decrement the Lock. type Element_Access is access all Element_Type with Storage_Size => 0; function Get_Element_Access (Position : Cursor) return not null Element_Access; -- Returns a pointer to the element designated by Position. Empty_List : constant List := (Controlled with others => <>); No_Element : constant Cursor := Cursor'(null, null); type Iterator is new Limited_Controlled and List_Iterator_Interfaces.Reversible_Iterator with record Container : List_Access; Node : Node_Access; end record with Disable_Controlled => not T_Check; overriding procedure Finalize (Object : in out Iterator); overriding function First (Object : Iterator) return Cursor; overriding function Last (Object : Iterator) return Cursor; overriding function Next (Object : Iterator; Position : Cursor) return Cursor; overriding function Previous (Object : Iterator; Position : Cursor) return Cursor; end Ada.Containers.Doubly_Linked_Lists;
31.22113
79
0.617691
06e7ad4df9fe822ef80af524ffeab81d3d01abf6
895
ads
Ada
src/fltk-widgets-valuators-sliders-hor_fill.ads
micahwelf/FLTK-Ada
83e0c58ea98e5ede2cbbb158b42eae44196c3ba7
[ "Unlicense" ]
1
2020-12-18T15:20:13.000Z
2020-12-18T15:20:13.000Z
src/fltk-widgets-valuators-sliders-hor_fill.ads
micahwelf/FLTK-Ada
83e0c58ea98e5ede2cbbb158b42eae44196c3ba7
[ "Unlicense" ]
null
null
null
src/fltk-widgets-valuators-sliders-hor_fill.ads
micahwelf/FLTK-Ada
83e0c58ea98e5ede2cbbb158b42eae44196c3ba7
[ "Unlicense" ]
null
null
null
package FLTK.Widgets.Valuators.Sliders.Hor_Fill is type Hor_Fill_Slider is new Slider with private; type Hor_Fill_Slider_Reference (Data : not null access Hor_Fill_Slider'Class) is limited null record with Implicit_Dereference => Data; package Forge is function Create (X, Y, W, H : in Integer; Text : in String) return Hor_Fill_Slider; end Forge; procedure Draw (This : in out Hor_Fill_Slider); function Handle (This : in out Hor_Fill_Slider; Event : in Event_Kind) return Event_Outcome; private type Hor_Fill_Slider is new Slider with null record; overriding procedure Finalize (This : in out Hor_Fill_Slider); pragma Inline (Draw); pragma Inline (Handle); end FLTK.Widgets.Valuators.Sliders.Hor_Fill;
17.211538
84
0.631285
57aa817fc5583f7213a994b1881a804bd7689adf
1,446
adb
Ada
Read Only/gdb-7.12.1/gdb/testsuite/gdb.ada/cond_lang/mixed.adb
samyvic/OS-Project
1622bc1641876584964effd91d65ef02e92728e1
[ "Apache-2.0" ]
null
null
null
Read Only/gdb-7.12.1/gdb/testsuite/gdb.ada/cond_lang/mixed.adb
samyvic/OS-Project
1622bc1641876584964effd91d65ef02e92728e1
[ "Apache-2.0" ]
null
null
null
Read Only/gdb-7.12.1/gdb/testsuite/gdb.ada/cond_lang/mixed.adb
samyvic/OS-Project
1622bc1641876584964effd91d65ef02e92728e1
[ "Apache-2.0" ]
null
null
null
-- Copyright 2010-2017 Free Software Foundation, Inc. -- -- 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 Pck; use Pck; package body Mixed is -- We are importing symbols from foo.o, so make sure this object file -- gets linked in. Pragma Linker_Options ("foo.o"); type Color is (Red, Green, Blue); procedure C_Function; pragma Import (C, C_Function, "c_function"); procedure Callme; pragma Export (C, Callme, "callme"); procedure Break_Me (Light : Color) is begin Put_Line ("Light: " & Color'Image (Light)); -- STOP end Break_Me; procedure Callme is begin Break_Me (Red); Break_Me (Green); Break_Me (Blue); end Callme; procedure Start_Test is begin -- Call C_Function, which will call Callme. C_Function; end Start_Test; end Mixed;
28.92
73
0.689488
a15df7cbc37929e35a4cd2edd2886f48cf3477f6
109
ads
Ada
source/encodings-unicode-utf_32.ads
Vovanium/Encodings
6b22e4321a78441d9036f697361cc32e3b7fe006
[ "MIT" ]
null
null
null
source/encodings-unicode-utf_32.ads
Vovanium/Encodings
6b22e4321a78441d9036f697361cc32e3b7fe006
[ "MIT" ]
null
null
null
source/encodings-unicode-utf_32.ads
Vovanium/Encodings
6b22e4321a78441d9036f697361cc32e3b7fe006
[ "MIT" ]
null
null
null
package Encodings.Unicode.UTF_32 is subtype UTF_32_String is Wide_Wide_String; end Encodings.Unicode.UTF_32;
36.333333
43
0.862385
41932dc11dae4663ab1b3a749e61fbed99c1675b
39
ads
Ada
test/examples/User-List/user_lists.ads
fintatarta/protypo
c0c2bca17bc766ab95acc99b7422485388a10cb4
[ "MIT" ]
null
null
null
test/examples/User-List/user_lists.ads
fintatarta/protypo
c0c2bca17bc766ab95acc99b7422485388a10cb4
[ "MIT" ]
4
2019-10-09T11:16:38.000Z
2019-10-09T11:20:38.000Z
test/examples/User-List/user_lists.ads
fintatarta/protypo
c0c2bca17bc766ab95acc99b7422485388a10cb4
[ "MIT" ]
null
null
null
package User_Lists is end User_Lists;
9.75
21
0.820513
1d5c0a5df0b013b08d6ce1320d5b58873bd489a1
954
ads
Ada
src/command_package.ads
MorganPeterson/avi-editor
c8c967edb4615048b41f3527eb807e6229cf5205
[ "0BSD" ]
null
null
null
src/command_package.ads
MorganPeterson/avi-editor
c8c967edb4615048b41f3527eb807e6229cf5205
[ "0BSD" ]
null
null
null
src/command_package.ads
MorganPeterson/avi-editor
c8c967edb4615048b41f3527eb807e6229cf5205
[ "0BSD" ]
null
null
null
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Editor_Package; use Editor_Package; with Utilities_Package; use Utilities_Package; package Command_Package is type Cmd_Flag_Type is ( NOFLAGS, MARK, CLEARSBLOCK, NEEDSLINE, NEEDSBLOCK, SETSHILITE, NOLOCATOR); type Arg_Type is (ARG_STRING); type Arg is record T : Arg_Type; S1 : Unbounded_String; end record; type Cmd_Func_Type is access procedure (E : in out Editor; V : in out View; A : Arg); procedure Run_File (E : Editor; V : in out View; A : Arg); function Command (E : in out Editor; V : in out View; F : Cmd_Flag_Type; Func : Cmd_Func_Type; A : Arg) return Boolean; procedure Cmd_Insert_File (E : in out Editor; V : in out View; A : Arg); procedure Fix_Block (V : in out View); private function Test_None (V : View) return Boolean; end Command_Package;
23.268293
75
0.649895
292c0ddc9b88c7d9044dcddb9aee2e897b7caddb
9,636
ads
Ada
src/generated/console_rexpaint_h.ads
csb6/libtcod-ada
89c2a75eb357a8468ccb0a6476391a6b388f00b4
[ "BSD-3-Clause" ]
null
null
null
src/generated/console_rexpaint_h.ads
csb6/libtcod-ada
89c2a75eb357a8468ccb0a6476391a6b388f00b4
[ "BSD-3-Clause" ]
null
null
null
src/generated/console_rexpaint_h.ads
csb6/libtcod-ada
89c2a75eb357a8468ccb0a6476391a6b388f00b4
[ "BSD-3-Clause" ]
null
null
null
pragma Ada_2012; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; with Interfaces.C.Strings; with console_h; with Interfaces.C.Extensions; with list_h; with System; with error_h; package console_rexpaint_h is -- BSD 3-Clause License -- * -- * Copyright © 2008-2021, Jice and the libtcod contributors. -- * All rights reserved. -- * -- * Redistribution and use in source and binary forms, with or without -- * modification, are permitted provided that the following conditions are met: -- * -- * 1. Redistributions of source code must retain the above copyright notice, -- * this list of conditions and the following disclaimer. -- * -- * 2. Redistributions in binary form must reproduce the above copyright notice, -- * this list of conditions and the following disclaimer in the documentation -- * and/or other materials provided with the distribution. -- * -- * 3. 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. -- --* -- \brief Return a new console loaded from a REXPaint ``.xp`` file. -- \param [in] filename A path to the REXPaint file. -- \return A new TCOD_console_t object. New consoles will need -- to be deleted with a call to :any:`TCOD_console_delete`. -- Returns NULL on an error. -- function TCOD_console_from_xp (filename : Interfaces.C.Strings.chars_ptr) return console_h.TCOD_console_t -- console_rexpaint.h:56 with Import => True, Convention => C, External_Name => "TCOD_console_from_xp"; --* -- \brief Update a console from a REXPaint ``.xp`` file. -- \param [out] con A console instance to update from the REXPaint file. -- \param [in] filename A path to the REXPaint file. -- In C++, you can pass the filepath directly to the :any:`TCODConsole` -- constructor to load a REXPaint file. -- function TCOD_console_load_xp (con : access console_h.TCOD_Console; filename : Interfaces.C.Strings.chars_ptr) return Extensions.bool -- console_rexpaint.h:66 with Import => True, Convention => C, External_Name => "TCOD_console_load_xp"; --* -- \brief Save a console as a REXPaint ``.xp`` file. -- \param [in] con The console instance to save. -- \param [in] filename The filepath to save to. -- \param [in] compress_level A zlib compression level, from 0 to 9. -- 1=fast, 6=balanced, 9=slowest, 0=uncompressed. -- \return ``true`` when the file is saved successfully, or ``false`` when an -- issue is detected. -- The REXPaint format can support a 1:1 copy of a libtcod console. -- function TCOD_console_save_xp (con : access constant console_h.TCOD_Console; filename : Interfaces.C.Strings.chars_ptr; compress_level : int) return Extensions.bool -- console_rexpaint.h:79 with Import => True, Convention => C, External_Name => "TCOD_console_save_xp"; --* -- \brief Return a list of consoles from a REXPaint file. -- \param [in] filename A path to the REXPaint file. -- \return Returns a TCOD_list_t of TCOD_console_t objects. Or NULL on an -- error. You will need to delete this list and each console individually. -- This function can load a REXPaint file with variable layer shapes, -- which would cause issues for a function like TCOD_console_list_from_xp. -- function TCOD_console_list_from_xp (filename : Interfaces.C.Strings.chars_ptr) return list_h.TCOD_list_t -- console_rexpaint.h:90 with Import => True, Convention => C, External_Name => "TCOD_console_list_from_xp"; --* -- \brief Save a list of consoles to a REXPaint file. -- \param [in] console_list A TCOD_list_t of TCOD_console_t objects. -- \param [in] filename Path to save to. -- \param [in] compress_level zlib compression level. -- \return true on success, false on a failure such as not being able to write -- to the path provided. -- This function can save any number of layers with multiple -- different sizes. -- The REXPaint tool only supports files with up to 9 layers where -- all layers are the same size. -- function TCOD_console_list_save_xp (console_list : list_h.TCOD_list_t; filename : Interfaces.C.Strings.chars_ptr; compress_level : int) return Extensions.bool -- console_rexpaint.h:106 with Import => True, Convention => C, External_Name => "TCOD_console_list_save_xp"; --* -- @brief Load an array of consoles from a REXPaint file in memory. -- You can call this function with `n_out=0` and `out=NULL` to get the number of consoles in the file. -- @param n_data The length of the input `data` buffer. -- @param data The buffer where the REXPaint file is held. -- @param n_out The length of the output console `out` array. Can be zero. -- @param out The array to fill with loaded consoles. -- @return Returns the number of consoles held by the file. Returns a negative error code on error. -- \rst -- .. versionadded:: 1.18 -- \endrst -- function TCOD_load_xp_from_memory (n_data : int; data : access unsigned_char; n_out : int; c_out : System.Address) return int -- console_rexpaint.h:122 with Import => True, Convention => C, External_Name => "TCOD_load_xp_from_memory"; --* -- @brief Save an array of consoles to a REXPaint file in memory. -- Partially initialized consoles are released on failures. -- @param n_consoles The length of the input `consoles` array. -- @param consoles An array of tcod consoles, can not be NULL. -- @param n_out The size of the `out` buffer, if this is zero then upper bound to be returned. -- @param out A pointer to an output buffer, can be NULL. -- @param compression_level A compression level for the zlib library. -- @return If `out=NULL` then returns the upper bound of the buffer size needed. -- Otherwise this returns the number of bytes actually filled. -- On an error a negative error code is returned. -- \rst -- .. versionadded:: 1.18 -- \endrst -- function TCOD_save_xp_to_memory (n_consoles : int; consoles : System.Address; n_out : int; c_out : access unsigned_char; compression_level : int) return int -- console_rexpaint.h:141 with Import => True, Convention => C, External_Name => "TCOD_save_xp_to_memory"; --* -- @brief Load an array of consoles from a REXPaint file. -- @param path The path to the REXPaint file, can not be NULL. -- @param n The size of the `out` array. Can be zero. -- @param out The array to fill with loaded consoles. -- @return Returns the number of consoles held by the file. Returns a negative error code on error. -- \rst -- .. versionadded:: 1.18 -- \endrst -- function TCOD_load_xp (path : Interfaces.C.Strings.chars_ptr; n : int; c_out : System.Address) return int -- console_rexpaint.h:155 with Import => True, Convention => C, External_Name => "TCOD_load_xp"; --* -- @brief Save an array of consoles to a REXPaint file. -- Partially initialized consoles are released on failures. -- @param n The number of consoles in the `consoles` array. -- @param consoles An array of consoles. -- @param path The path write the REXPaint file, can not be NULL. -- @param compress_level A compression level for the zlib library. -- @return Returns an error code on failure. -- \rst -- .. versionadded:: 1.18 -- \endrst -- function TCOD_save_xp (n : int; consoles : System.Address; path : Interfaces.C.Strings.chars_ptr; compress_level : int) return error_h.TCOD_Error -- console_rexpaint.h:171 with Import => True, Convention => C, External_Name => "TCOD_save_xp"; -- extern "C" --* -- @brief Load an array of consoles from a REXPaint file. -- @param path The path to the REXPaint file to load. -- @return Returns a vector of consoles. -- \rst -- .. versionadded:: 1.18 -- \endrst -- --* -- @brief Save an array of consoles to a REXPaint file. -- @param consoles A vector of consoles to save. -- @param path The path to write the REXPaint file to. -- @param compress_level A compression level for the zlib library. -- \rst -- .. versionadded:: 1.18 -- \endrst -- -- namespace tcod end console_rexpaint_h;
40.658228
162
0.66511
3d608003a6f8f161d7f6e4e04d7028384492ae90
4,908
ads
Ada
source/amf/mof/cmof/amf-internals-cmof_enumerations.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/amf/mof/cmof/amf-internals-cmof_enumerations.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/amf/mof/cmof/amf-internals-cmof_enumerations.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 © 2011-2012, Vadim Godunko <[email protected]> -- -- 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$ ------------------------------------------------------------------------------ with AMF.CMOF.Enumeration_Literals.Collections; with AMF.CMOF.Enumerations; with AMF.Internals.CMOF_Data_Types; with AMF.Visitors; package AMF.Internals.CMOF_Enumerations is type CMOF_Enumeration_Proxy is limited new AMF.Internals.CMOF_Data_Types.CMOF_Data_Type_Proxy and AMF.CMOF.Enumerations.CMOF_Enumeration with null record; -- XXX These subprograms are stubs overriding function Get_Owned_Literal (Self : not null access constant CMOF_Enumeration_Proxy) return AMF.CMOF.Enumeration_Literals.Collections.Ordered_Set_Of_CMOF_Enumeration_Literal; overriding procedure Enter_Element (Self : not null access constant CMOF_Enumeration_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); -- Dispatch call to corresponding subprogram of visitor interface. overriding procedure Leave_Element (Self : not null access constant CMOF_Enumeration_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); -- Dispatch call to corresponding subprogram of visitor interface. overriding procedure Visit_Element (Self : not null access constant CMOF_Enumeration_Proxy; Iterator : in out AMF.Visitors.Abstract_Iterator'Class; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control); -- Dispatch call to corresponding subprogram of iterator interface. end AMF.Internals.CMOF_Enumerations;
59.13253
91
0.510799
31c0e091d0ee0754aae1806f9b75b936d9473b16
3,417
ads
Ada
gcc-gcc-7_3_0-release/gcc/ada/s-caun16.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/ada/s-caun16.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/ada/s-caun16.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY COMPONENTS -- -- -- -- S Y S T E M . C O M P A R E _ A R R A Y _ U N S I G N E D _ 1 6 -- -- -- -- S p e c -- -- -- -- Copyright (C) 2002-2014, 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. -- -- -- ------------------------------------------------------------------------------ -- This package contains functions for runtime comparisons on arrays whose -- elements are 16-bit discrete type values to be treated as unsigned. package System.Compare_Array_Unsigned_16 is -- Note: although the functions in this package are in a sense Pure, the -- package cannot be declared as Pure, since the arguments are addresses, -- not the data, and the result is not pure wrt the address values. function Compare_Array_U16 (Left : System.Address; Right : System.Address; Left_Len : Natural; Right_Len : Natural) return Integer; -- Compare the array starting at address Left of length Left_Len -- with the array starting at address Right of length Right_Len. -- The comparison is in the normal Ada semantic sense of array -- comparison. The result is -1,0,+1 for Left<Right, Left=Right, -- Left>Right respectively. This function works with 4 byte words -- if the operands are aligned on 4-byte boundaries and long enough. end System.Compare_Array_Unsigned_16;
63.277778
78
0.482587
2928efbd52e6e4150fdbcf80b8a23e06bf54c898
1,786
ads
Ada
tst/scanner1.ads
eryjus/ada
17d019d13f227fc5a446a45a5c14442de7302e35
[ "BSD-3-Clause" ]
null
null
null
tst/scanner1.ads
eryjus/ada
17d019d13f227fc5a446a45a5c14442de7302e35
[ "BSD-3-Clause" ]
null
null
null
tst/scanner1.ads
eryjus/ada
17d019d13f227fc5a446a45a5c14442de7302e35
[ "BSD-3-Clause" ]
null
null
null
--=================================================================================================================== -- scanner.ads -- -- This file contains the a sample of the lexical components we need to be able to recognize and convert -- into tokens. --=================================================================================================================== -- -- -- These examples are from the Ada Specification -- --------------------------------------------- & ' ( ) * + , - . / : ; < = > | => .. ** := /= >= <= << >> <> Count X Get_Symbol Ethelyn Marion Snobol_4 X1 Page_Count Store_Next_Item Πλάτων -- Plato Чайковский -- Tchaikovsky θ φ -- Angles 12 0 1E6 123_456 -- integer literals 12.0 0.0 0.456 3.14159_26 -- real literals 2#1111_1111# 16#FF# 016#0ff# -- integer literals of value 255 16#E#E1 2#1110_0000# -- integer literals of value 224 16#F.FF#E+2 2#1.1111_1111_1110#E11 -- real literals of value 4095.0 'A' '*' ''' ' ' 'L' 'Л' 'Λ' -- Various els. '∞' 'א' -- Big numbers - infinity and aleph. "Message of the day:" "" -- a null string literal " " "A" """" -- three string literals of length 1 "Characters such as $, %, and } are allowed in string literals" "Archimedes said ""Εύρηκα""" "Volume of cylinder (πr2h) = " abort else new return abs elsif not reverse abstract end null select accept entry of separate access exception or some aliased exit others subtype all for out synchronized and function overriding array tagged at generic package task goto pragma terminate begin private then body if procedure type in case protected interface until constant is raise use declare range limited when delay record loop while delta rem with digits mod renames do requeue xor
15.008403
117
0.56383
3de3bf6d96e61d6414c9249068bb2d87e7a874d0
401
ads
Ada
specs/ada/common/tkmrpc-request-cfg-tkm_version-convert.ads
DrenfongWong/tkm-rpc
075d22871cf81d497aac656c7f03a513278b641c
[ "BSD-3-Clause" ]
null
null
null
specs/ada/common/tkmrpc-request-cfg-tkm_version-convert.ads
DrenfongWong/tkm-rpc
075d22871cf81d497aac656c7f03a513278b641c
[ "BSD-3-Clause" ]
null
null
null
specs/ada/common/tkmrpc-request-cfg-tkm_version-convert.ads
DrenfongWong/tkm-rpc
075d22871cf81d497aac656c7f03a513278b641c
[ "BSD-3-Clause" ]
null
null
null
with Ada.Unchecked_Conversion; package Tkmrpc.Request.Cfg.Tkm_Version.Convert is function To_Request is new Ada.Unchecked_Conversion ( Source => Tkm_Version.Request_Type, Target => Request.Data_Type); function From_Request is new Ada.Unchecked_Conversion ( Source => Request.Data_Type, Target => Tkm_Version.Request_Type); end Tkmrpc.Request.Cfg.Tkm_Version.Convert;
28.642857
58
0.755611
06313fd47a04bd657de661ec0d1f8550ed93a8d4
2,472
ads
Ada
include/sf-graphics-types.ads
danva994/ASFML-1.6
bd74ae700843338a15aef295f99297b866aa0c93
[ "Zlib" ]
1
2017-10-07T06:20:38.000Z
2017-10-07T06:20:38.000Z
include/sf-graphics-types.ads
danva994/ASFML-1.6
bd74ae700843338a15aef295f99297b866aa0c93
[ "Zlib" ]
3
2020-09-15T21:19:34.000Z
2022-03-02T23:13:46.000Z
include/sf-graphics-types.ads
danva994/ASFML-1.6
bd74ae700843338a15aef295f99297b866aa0c93
[ "Zlib" ]
2
2020-09-26T21:16:43.000Z
2022-01-16T19:36:48.000Z
-- //////////////////////////////////////////////////////////// -- // -- // SFML - Simple and Fast Multimedia Library -- // Copyright (C) 2007-2009 Laurent Gomila ([email protected]) -- // -- // 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. -- // -- //////////////////////////////////////////////////////////// package Sf.Graphics.Types is type sfFont is null record; type sfFont_Ptr is access all sfFont; type sfImage is null record; type sfImage_Ptr is access all sfImage; type sfPostFX is null record; type sfPostFX_Ptr is access all sfPostFX; type sfRenderWindow is null record; type sfRenderWindow_Ptr is access all sfRenderWindow; type sfShape is null record; type sfShape_Ptr is access all sfShape; type sfSprite is null record; type sfSprite_Ptr is access all sfSprite; type sfString is null record; type sfString_Ptr is access all sfString; type sfView is null record; type sfView_Ptr is access all sfView; private pragma Convention (C, sfFont); pragma Convention (C, sfFont_Ptr); pragma Convention (C, sfImage); pragma Convention (C, sfImage_Ptr); pragma Convention (C, sfPostFX); pragma Convention (C, sfPostFX_Ptr); pragma Convention (C, sfRenderWindow); pragma Convention (C, sfRenderWindow_Ptr); pragma Convention (C, sfShape); pragma Convention (C, sfShape_Ptr); pragma Convention (C, sfSprite); pragma Convention (C, sfSprite_Ptr); pragma Convention (C, sfString); pragma Convention (C, sfString_Ptr); pragma Convention (C, sfView); pragma Convention (C, sfView_Ptr); end Sf.Graphics.Types;
38.625
104
0.682848
597fe230f1c44581fc23f2674908f2dff55be7e7
3,322
ads
Ada
tools-src/gnu/gcc/gcc/ada/a-siocst.ads
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
80
2015-01-02T10:14:04.000Z
2021-06-07T06:29:49.000Z
tools-src/gnu/gcc/gcc/ada/a-siocst.ads
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
9
2015-05-14T11:03:12.000Z
2018-01-04T07:12:58.000Z
tools-src/gnu/gcc/gcc/ada/a-siocst.ads
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
69
2015-01-02T10:45:56.000Z
2021-09-06T07:52:13.000Z
------------------------------------------------------------------------------ -- -- -- GNAT RUNTIME COMPONENTS -- -- -- -- A D A . S E Q U E N T I A L _ I O . C _ S T R E A M S -- -- -- -- S p e c -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992,1993,1994,1995 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 2, 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. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package provides an interface between Ada.Sequential_IO and the -- C streams. This allows sharing of a stream between Ada and C or C++, -- as well as allowing the Ada program to operate directly on the stream. with Interfaces.C_Streams; generic package Ada.Sequential_IO.C_Streams is package ICS renames Interfaces.C_Streams; function C_Stream (F : File_Type) return ICS.FILEs; -- Obtain stream from existing open file procedure Open (File : in out File_Type; Mode : in File_Mode; C_Stream : in ICS.FILEs; Form : in String := ""); -- Create new file from existing stream end Ada.Sequential_IO.C_Streams;
57.275862
78
0.459964
59be79d445430a37c04be4e8974d1aecab3bf459
2,890
ads
Ada
src/babel-files-queues.ads
stcarrez/babel
727461babd0305344427bf8a56cdae2b68d08caf
[ "Apache-2.0" ]
1
2015-08-05T14:26:52.000Z
2015-08-05T14:26:52.000Z
src/babel-files-queues.ads
stcarrez/babel
727461babd0305344427bf8a56cdae2b68d08caf
[ "Apache-2.0" ]
null
null
null
src/babel-files-queues.ads
stcarrez/babel
727461babd0305344427bf8a56cdae2b68d08caf
[ "Apache-2.0" ]
null
null
null
----------------------------------------------------------------------- -- bkp-files -- File and directories -- Copyright (C) 2014 Stephane.Carrez -- Written by Stephane.Carrez ([email protected]) -- -- 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 Ada.Strings.Unbounded; with Ada.Calendar; with Ada.Directories; with Ada.Containers.Vectors; with Util.Encoders.SHA1; with Util.Concurrent.Fifos; with Util.Strings.Vectors; with ADO; with Babel.Base.Models; package Babel.Files.Queues is -- package Babel.Strategies.Flow/Optimize/Small/Larges/Default/Immediate/Simple/Pipeline/Serial -- File name -- Directory info -- File ID or null -- File size => sha1, file status, backup package File_Fifo is new Util.Concurrent.Fifos (Element_Type => File_Type, Default_Size => 100, Clear_On_Dequeue => False); -- -- procedure Execute (Backup : in out Small_Files_Strategy; -- Queue : in out File_Queue) is -- begin -- loop -- Queue.Dequeue (File, 1.0); -- -- load file -- -- compute sha1 -- -- if modified then backup file -- end loop; -- -- exception -- when File_Fifo.Timeout => -- null; -- end Execute; type File_Queue is tagged limited record Queue : File_Fifo.Fifo; end record; type File_Queue_Access is access all File_Queue'Class; procedure Add_File (Into : in out File_Queue; File : in File_Type); type Directory_Queue is limited private; -- Returns true if there is a directory in the queue. function Has_Directory (Queue : in Directory_Queue) return Boolean; -- Get the next directory from the queue. procedure Peek_Directory (Queue : in out Directory_Queue; Directory : out Directory_Type); -- Add the directory in the queue. procedure Add_Directory (Queue : in out Directory_Queue; Directory : in Directory_Type); private type Directory_Queue is limited record Directories : Directory_Vector; end record; end Babel.Files.Queues;
35.679012
99
0.597924
3d79a625e20a8748cd4ad38ecf1cc44c4b9b458e
4,184
adb
Ada
utils/matrix3x3.adb
Lucretia/old_nehe_ada95
d0378c3bfce202eb01bf00b57c128735dbe8582d
[ "BSD-3-Clause" ]
null
null
null
utils/matrix3x3.adb
Lucretia/old_nehe_ada95
d0378c3bfce202eb01bf00b57c128735dbe8582d
[ "BSD-3-Clause" ]
null
null
null
utils/matrix3x3.adb
Lucretia/old_nehe_ada95
d0378c3bfce202eb01bf00b57c128735dbe8582d
[ "BSD-3-Clause" ]
null
null
null
--------------------------------------------------------------------------------- -- Copyright 2004-2005 © Luke A. Guest -- -- This code is to be used for tutorial purposes only. -- You may not redistribute this code in any form without my express permission. --------------------------------------------------------------------------------- with Ada.Numerics.Generic_Elementary_Functions; with Vector3; package body Matrix3x3 is package Trig is new Ada.Numerics.Generic_Elementary_Functions(Float); -- Create a new matrix which is initialised to the identity. function Identity return Object is begin return Object'(XAxis_X | YAxis_Y | ZAxis_Z => 1.0, others => 0.0); end Identity; -- Set an existing matrix to the identity. procedure Identity(Self : in out Object) is begin Self := Object'(XAxis_X | YAxis_Y | ZAxis_Z => 1.0, others => 0.0); end Identity; -- Create a rotation matrix from an angle and a unit axis. -- -- Let v = (x, y, z)^T, and u = v / |v| = (x', y', z')^T -- | 0 -z' y'| -- S = | z' 0 -x'| -- |-y' x' 0 | -- M = uu^T + (cos a)(I - uu^T) + (sin a)S -- or, from David Eberly's book: -- M = I + (sin a)S + (1 - cos a)S^2 procedure FromAngleAxis(Result : out Object; Angle : in Float; UnitAxis : in Vector3.Object) is -- Taken from Foley & Van Dam. Cos : Float := Trig.Cos(Angle); Sin : Float := Trig.Sin(Angle); OneMinusCos : Float := 1.0 - Cos; XX : Float := UnitAxis.X * UnitAxis.X; YY : Float := UnitAxis.Y * UnitAxis.Y; ZZ : Float := UnitAxis.Z * UnitAxis.Z; XY : Float := UnitAxis.X * UnitAxis.Y; YZ : Float := UnitAxis.Y * UnitAxis.Z; ZX : Float := UnitAxis.X * UnitAxis.Z; begin Result(XAxis_X) := XX + (Cos * (1.0 - XX)); Result(XAxis_Y) := (XY * OneMinusCos) + (UnitAxis.Z * Sin); Result(XAxis_Z) := (ZX * OneMinusCos) - (UnitAxis.Y * Sin); Result(YAxis_X) := (XY * OneMinusCos) - (UnitAxis.Z * Sin); Result(YAxis_Y) := YY + (Cos * (1.0 - YY)); Result(YAxis_Z) := (YZ * OneMinusCos) + (UnitAxis.X * Sin); Result(ZAxis_X) := (ZX * OneMinusCos) + (UnitAxis.Y * Sin); Result(ZAxis_Y) := (YZ * OneMinusCos) - (UnitAxis.X * Sin); Result(ZAxis_Z) := ZZ + (Cos * (1.0 - ZZ)); end FromAngleAxis; procedure Transpose(Self : in out Object) is procedure Swap(A, B : in out Float) is Temp : Float; begin Temp := A; A := B; B := Temp; end Swap; begin Swap(Self(XAxis_Y), Self(YAxis_X)); Swap(Self(XAxis_Z), Self(ZAxis_X)); Swap(Self(YAxis_Z), Self(ZAxis_Y)); end Transpose; procedure Scale(Result : out Object; X, Y, Z : in Float := 1.0) is begin Result := (XAxis_X => X, YAxis_Y => Y, ZAxis_Z => Z, others => 0.0); end Scale; function "-"(Self : in Object) return Object is Result : Object := Identity; begin for Index in Matrix_Elements'Range loop Result(Index) := -Self(Index); end loop; return Result; end "-"; function "*"(Left, Right : in Object) return Object is LoopEnd : Constant Integer := (ORDER - 1); Result : Object := Identity; begin for I in 0 .. LoopEnd loop for J in 0 .. LoopEnd loop Result(Matrix_Elements'Val((I * ORDER) + J)) := 0.0; for K in 0 .. LoopEnd loop Result(Matrix_Elements'Val((I * ORDER) + J)) := Result(Matrix_Elements'Val((I * ORDER) + J)) + (Left(Matrix_Elements'Val((I * ORDER) + K)) * Right(Matrix_Elements'Val((K * ORDER) + J))); end loop; end loop; end loop; return Result; end "*"; function "*"(Left : in Object; Right : in Vector3.Object) return Vector3.Object is begin return Vector3.Object'( (Left(XAxis_X) * Right.X) + (Left(YAxis_X) * Right.Y) + (Left(ZAxis_X) * Right.Z), (Left(XAxis_Y) * Right.X) + (Left(YAxis_Y) * Right.Y) + (Left(ZAxis_Y) * Right.Z), (Left(XAxis_Z) * Right.X) + (Left(YAxis_Z) * Right.Y) + (Left(ZAxis_Z) * Right.Z)); end "*"; end Matrix3x3;
25.82716
196
0.544933
23a9f316e868b8dfdb9b27a971a4ddd29b891d21
2,933
ads
Ada
courses/fundamentals_of_ada/labs/solar_system/adv_170_multiple_inheritance/src/solar_system.ads
AdaCore/training_material
6651eb2c53f8c39649b8e0b3c757bc8ff963025a
[ "CC-BY-4.0" ]
15
2020-10-07T08:56:45.000Z
2022-02-08T23:13:22.000Z
courses/fundamentals_of_ada/labs/solar_system/adv_170_multiple_inheritance/src/solar_system.ads
AdaCore/training_material
6651eb2c53f8c39649b8e0b3c757bc8ff963025a
[ "CC-BY-4.0" ]
20
2020-11-05T14:35:20.000Z
2022-01-13T15:59:33.000Z
courses/fundamentals_of_ada/labs/solar_system/adv_170_multiple_inheritance/src/solar_system.ads
AdaCore/training_material
6651eb2c53f8c39649b8e0b3c757bc8ff963025a
[ "CC-BY-4.0" ]
6
2020-10-08T15:57:06.000Z
2021-08-31T12:03:08.000Z
----------------------------------------------------------------------- -- Ada Labs -- -- -- -- Copyright (C) 2008-2009, AdaCore -- -- -- -- Labs 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 2 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, write to the Free Software Foundation, Inc., 59 Temple -- -- Place - Suite 330, Boston, MA 02111-1307, USA. -- ----------------------------------------------------------------------- with Display; use Display; with Display.Basic; use Display.Basic; package Solar_System is -- define type Bodies_Enum as an enumeration of Sun, Earth, Moon, Satellite type Bodies_Enum_T is (Sun, Earth, Moon, Satellite, Comet, Black_Hole, Asteroid_1, Asteroid_2); type Body_T is private; type Body_Access_T is access all Body_T; type Bodies_Array_T is private; function Get_Body (B : Bodies_Enum_T; Bodies : access Bodies_Array_T) return Body_Access_T; procedure Init_Body (B : Body_Access_T; Radius : Float; Color : RGBA_T; Distance : Float; Angle : Float; Speed : Float; Turns_Around : Body_Access_T; Visible : Boolean := True); procedure Move_All (Bodies : access Bodies_Array_T); private -- define a type Body_Type to store every information about a body -- X, Y, Distance, Speed, Angle, Radius, Color type Body_T is record X : Float := 0.0; Y : Float := 0.0; Distance : Float; Speed : Float; Angle : Float; Radius : Float; Color : RGBA_T; Visible : Boolean := True; Turns_Around : Body_Access_T; end record; -- define type Bodies_Array as an array of Body_Type indexed by bodies enumeration type Bodies_Array_T is array (Bodies_Enum_T) of aliased Body_T; procedure Move (Body_To_Move : Body_Access_T); end Solar_System;
39.635135
98
0.512786
574728185f1723d9b409733d6deb328847cf1ad3
52,953
adb
Ada
hls_video_block/solution1/.autopilot/db/mat2strm.bind.adb
parker-xilinx/HLS_2d_filter
25c85715167623c07bd5f06a8747961cdafee616
[ "Unlicense" ]
1
2019-12-22T12:22:36.000Z
2019-12-22T12:22:36.000Z
hls_video_block/solution1/.autopilot/db/mat2strm.bind.adb
parker-xilinx/HLS_2d_filter
25c85715167623c07bd5f06a8747961cdafee616
[ "Unlicense" ]
null
null
null
hls_video_block/solution1/.autopilot/db/mat2strm.bind.adb
parker-xilinx/HLS_2d_filter
25c85715167623c07bd5f06a8747961cdafee616
[ "Unlicense" ]
2
2019-12-22T12:22:38.000Z
2021-04-30T00:59:20.000Z
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="15"> <syndb class_id="0" tracking_level="0" version="0"> <userIPLatency>-1</userIPLatency> <userIPName></userIPName> <cdfg class_id="1" tracking_level="1" version="0" object_id="_0"> <name>mat2strm</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>9</count> <item_version>0</item_version> <item class_id="3" tracking_level="1" version="0" object_id="_1"> <Value class_id="4" tracking_level="0" version="0"> <Obj class_id="5" tracking_level="0" version="0"> <type>1</type> <id>1</id> <name>IN_size_read</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>IN.size</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>21</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs class_id="7" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_2"> <Value> <Obj> <type>1</type> <id>2</id> <name>IN_data_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>IN.data.V</originalName> <rtlName></rtlName> <coreName>FIFO_SRL</coreName> </Obj> <bitwidth>17</bitwidth> </Value> <direction>0</direction> <if_type>3</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_3"> <Value> <Obj> <type>1</type> <id>3</id> <name>OUT_V_data_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>OUT.V.data.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>24</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_4"> <Value> <Obj> <type>1</type> <id>4</id> <name>OUT_V_keep_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>OUT.V.keep.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_5"> <Value> <Obj> <type>1</type> <id>5</id> <name>OUT_V_strb_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>OUT.V.strb.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_6"> <Value> <Obj> <type>1</type> <id>6</id> <name>OUT_V_user_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>OUT.V.user.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_7"> <Value> <Obj> <type>1</type> <id>7</id> <name>OUT_V_last_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>OUT.V.last.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_8"> <Value> <Obj> <type>1</type> <id>8</id> <name>OUT_V_id_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>OUT.V.id.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_9"> <Value> <Obj> <type>1</type> <id>9</id> <name>OUT_V_dest_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>OUT.V.dest.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>12</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_10"> <Value> <Obj> <type>0</type> <id>12</id> <name>IN_size_read_1</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>IN.size</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>21</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>30</item> <item>31</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>1</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_11"> <Value> <Obj> <type>0</type> <id>13</id> <name></name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>165</lineNumber> <contextFuncName>mat2strm</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="11" tracking_level="0" version="0"> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second class_id="12" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="13" tracking_level="0" version="0"> <first class_id="14" tracking_level="0" version="0"> <first>hls_video_block.cpp</first> <second>mat2strm</second> </first> <second>165</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>32</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.65</m_delay> <m_topoIndex>2</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>15</id> <name>i</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>i</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>20</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>34</item> <item>35</item> <item>36</item> <item>37</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>3</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_13"> <Value> <Obj> <type>0</type> <id>16</id> <name>i_cast</name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>165</lineNumber> <contextFuncName>mat2strm</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_block.cpp</first> <second>mat2strm</second> </first> <second>165</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>21</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>38</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>4</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_14"> <Value> <Obj> <type>0</type> <id>17</id> <name>tmp</name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>165</lineNumber> <contextFuncName>mat2strm</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_block.cpp</first> <second>mat2strm</second> </first> <second>165</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>39</item> <item>40</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.06</m_delay> <m_topoIndex>5</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_15"> <Value> <Obj> <type>0</type> <id>18</id> <name>i_2</name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>165</lineNumber> <contextFuncName>mat2strm</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_block.cpp</first> <second>mat2strm</second> </first> <second>165</second> </item> </second> </item> </inlineStackInfo> <originalName>i</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>20</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>41</item> <item>43</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.89</m_delay> <m_topoIndex>6</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_16"> <Value> <Obj> <type>0</type> <id>20</id> <name></name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>165</lineNumber> <contextFuncName>mat2strm</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_block.cpp</first> <second>mat2strm</second> </first> <second>165</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>44</item> <item>45</item> <item>46</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>7</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_17"> <Value> <Obj> <type>0</type> <id>22</id> <name>IN_data_V_read</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>17</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>48</item> <item>49</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.83</m_delay> <m_topoIndex>8</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_18"> <Value> <Obj> <type>0</type> <id>23</id> <name>tmp_data_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>tmp.data.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>24</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>50</item> </oprand_edges> <opcode>sext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>9</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_19"> <Value> <Obj> <type>0</type> <id>24</id> <name></name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>167</lineNumber> <contextFuncName>mat2strm</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_block.cpp</first> <second>mat2strm</second> </first> <second>167</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>15</count> <item_version>0</item_version> <item>52</item> <item>53</item> <item>54</item> <item>55</item> <item>56</item> <item>57</item> <item>58</item> <item>59</item> <item>60</item> <item>62</item> <item>63</item> <item>65</item> <item>66</item> <item>67</item> <item>68</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>10</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_20"> <Value> <Obj> <type>0</type> <id>25</id> <name></name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>165</lineNumber> <contextFuncName>mat2strm</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_block.cpp</first> <second>mat2strm</second> </first> <second>165</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>69</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>12</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_21"> <Value> <Obj> <type>0</type> <id>27</id> <name></name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>169</lineNumber> <contextFuncName>mat2strm</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_block.cpp</first> <second>mat2strm</second> </first> <second>169</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>0</count> <item_version>0</item_version> </oprand_edges> <opcode>ret</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>11</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_22"> <Value> <Obj> <type>2</type> <id>33</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>20</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_23"> <Value> <Obj> <type>2</type> <id>42</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>20</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_24"> <Value> <Obj> <type>2</type> <id>61</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <const_type>4</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_25"> <Value> <Obj> <type>2</type> <id>64</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <const_type>4</const_type> <content>0</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_26"> <Obj> <type>3</type> <id>14</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>2</count> <item_version>0</item_version> <item>12</item> <item>13</item> </node_objs> </item> <item class_id_reference="18" object_id="_27"> <Obj> <type>3</type> <id>21</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>5</count> <item_version>0</item_version> <item>15</item> <item>16</item> <item>17</item> <item>18</item> <item>20</item> </node_objs> </item> <item class_id_reference="18" object_id="_28"> <Obj> <type>3</type> <id>26</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>4</count> <item_version>0</item_version> <item>22</item> <item>23</item> <item>24</item> <item>25</item> </node_objs> </item> <item class_id_reference="18" object_id="_29"> <Obj> <type>3</type> <id>28</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>27</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>35</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_30"> <id>31</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>12</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_31"> <id>32</id> <edge_type>2</edge_type> <source_obj>21</source_obj> <sink_obj>13</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_32"> <id>34</id> <edge_type>1</edge_type> <source_obj>33</source_obj> <sink_obj>15</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_33"> <id>35</id> <edge_type>2</edge_type> <source_obj>14</source_obj> <sink_obj>15</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_34"> <id>36</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>15</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_35"> <id>37</id> <edge_type>2</edge_type> <source_obj>26</source_obj> <sink_obj>15</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_36"> <id>38</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>16</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_37"> <id>39</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>17</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_38"> <id>40</id> <edge_type>1</edge_type> <source_obj>12</source_obj> <sink_obj>17</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_39"> <id>41</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>18</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_40"> <id>43</id> <edge_type>1</edge_type> <source_obj>42</source_obj> <sink_obj>18</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_41"> <id>44</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>20</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_42"> <id>45</id> <edge_type>2</edge_type> <source_obj>28</source_obj> <sink_obj>20</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_43"> <id>46</id> <edge_type>2</edge_type> <source_obj>26</source_obj> <sink_obj>20</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_44"> <id>49</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>22</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_45"> <id>50</id> <edge_type>1</edge_type> <source_obj>22</source_obj> <sink_obj>23</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_46"> <id>53</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_47"> <id>54</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_48"> <id>55</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_49"> <id>56</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_50"> <id>57</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_51"> <id>58</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_52"> <id>59</id> <edge_type>1</edge_type> <source_obj>9</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_53"> <id>60</id> <edge_type>1</edge_type> <source_obj>23</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_54"> <id>62</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_55"> <id>63</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_56"> <id>65</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_57"> <id>66</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_58"> <id>67</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_59"> <id>68</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_60"> <id>69</id> <edge_type>2</edge_type> <source_obj>21</source_obj> <sink_obj>25</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_61"> <id>128</id> <edge_type>2</edge_type> <source_obj>14</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_62"> <id>129</id> <edge_type>2</edge_type> <source_obj>21</source_obj> <sink_obj>26</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_63"> <id>130</id> <edge_type>2</edge_type> <source_obj>21</source_obj> <sink_obj>28</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_64"> <id>131</id> <edge_type>2</edge_type> <source_obj>26</source_obj> <sink_obj>21</sink_obj> <is_back_edge>1</is_back_edge> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_65"> <mId>1</mId> <mTag>mat2strm</mTag> <mType>0</mType> <sub_regions> <count>3</count> <item_version>0</item_version> <item>2</item> <item>3</item> <item>4</item> </sub_regions> <basic_blocks> <count>0</count> <item_version>0</item_version> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>1843201</mMinLatency> <mMaxLatency>1843201</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_66"> <mId>2</mId> <mTag>Entry</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>14</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_67"> <mId>3</mId> <mTag>Loop 1</mTag> <mType>1</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>21</item> <item>26</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>921600</mMinTripCount> <mMaxTripCount>921600</mMaxTripCount> <mMinLatency>1843200</mMinLatency> <mMaxLatency>1843200</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_68"> <mId>4</mId> <mTag>Return</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>28</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> </cdfg_regions> <fsm class_id="24" tracking_level="1" version="0" object_id="_69"> <states class_id="25" tracking_level="0" version="0"> <count>3</count> <item_version>0</item_version> <item class_id="26" tracking_level="1" version="0" object_id="_70"> <id>1</id> <operations class_id="27" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="28" tracking_level="1" version="0" object_id="_71"> <id>10</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_72"> <id>11</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_73"> <id>12</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_74"> <id>13</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_75"> <id>2</id> <operations> <count>10</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_76"> <id>15</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_77"> <id>16</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_78"> <id>17</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_79"> <id>18</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_80"> <id>19</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_81"> <id>20</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_82"> <id>22</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_83"> <id>23</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_84"> <id>24</id> <stage>2</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_85"> <id>27</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_86"> <id>3</id> <operations> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_87"> <id>24</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_88"> <id>25</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> </states> <transitions class_id="29" tracking_level="0" version="0"> <count>3</count> <item_version>0</item_version> <item class_id="30" tracking_level="1" version="0" object_id="_89"> <inState>1</inState> <outState>2</outState> <condition class_id="31" tracking_level="0" version="0"> <id>-1</id> <sop class_id="32" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="33" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_90"> <inState>2</inState> <outState>3</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item class_id="34" tracking_level="0" version="0"> <first class_id="35" tracking_level="0" version="0"> <first>17</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_91"> <inState>3</inState> <outState>2</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> </transitions> </fsm> <res class_id="-1"></res> <node_label_latency class_id="37" tracking_level="0" version="0"> <count>12</count> <item_version>0</item_version> <item class_id="38" tracking_level="0" version="0"> <first>12</first> <second class_id="39" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>13</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>15</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>16</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>17</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>18</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>20</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>22</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>23</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>24</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>25</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>27</first> <second> <first>1</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="40" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="41" tracking_level="0" version="0"> <first>14</first> <second class_id="42" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>21</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>26</first> <second> <first>1</first> <second>2</second> </second> </item> <item> <first>28</first> <second> <first>1</first> <second>1</second> </second> </item> </bblk_ent_exit> <regions class_id="43" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </regions> <dp_fu_nodes class_id="44" tracking_level="0" version="0"> <count>8</count> <item_version>0</item_version> <item class_id="45" tracking_level="0" version="0"> <first>60</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> <item> <first>66</first> <second> <count>1</count> <item_version>0</item_version> <item>22</item> </second> </item> <item> <first>72</first> <second> <count>2</count> <item_version>0</item_version> <item>24</item> <item>24</item> </second> </item> <item> <first>107</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> <item> <first>114</first> <second> <count>1</count> <item_version>0</item_version> <item>16</item> </second> </item> <item> <first>118</first> <second> <count>1</count> <item_version>0</item_version> <item>17</item> </second> </item> <item> <first>123</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> <item> <first>129</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> </dp_fu_nodes> <dp_fu_nodes_expression class_id="47" tracking_level="0" version="0"> <count>5</count> <item_version>0</item_version> <item class_id="48" tracking_level="0" version="0"> <first>i_2_fu_123</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> <item> <first>i_cast_fu_114</first> <second> <count>1</count> <item_version>0</item_version> <item>16</item> </second> </item> <item> <first>i_phi_fu_107</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> <item> <first>tmp_data_V_fu_129</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> <item> <first>tmp_fu_118</first> <second> <count>1</count> <item_version>0</item_version> <item>17</item> </second> </item> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>3</count> <item_version>0</item_version> <item> <first>IN_data_V_read_read_fu_66</first> <second> <count>1</count> <item_version>0</item_version> <item>22</item> </second> </item> <item> <first>IN_size_read_1_read_fu_60</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> <item> <first>grp_write_fu_72</first> <second> <count>2</count> <item_version>0</item_version> <item>24</item> <item>24</item> </second> </item> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="49" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_mem_port_nodes> <dp_reg_nodes> <count>4</count> <item_version>0</item_version> <item> <first>103</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> <item> <first>134</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> <item> <first>142</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> <item> <first>147</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> </dp_reg_nodes> <dp_regname_nodes> <count>4</count> <item_version>0</item_version> <item> <first>IN_size_read_1_reg_134</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> <item> <first>i_2_reg_142</first> <second> <count>1</count> <item_version>0</item_version> <item>18</item> </second> </item> <item> <first>i_reg_103</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> <item> <first>tmp_data_V_reg_147</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> </dp_regname_nodes> <dp_reg_phi> <count>1</count> <item_version>0</item_version> <item> <first>103</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> </dp_reg_phi> <dp_regname_phi> <count>1</count> <item_version>0</item_version> <item> <first>i_reg_103</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> </dp_regname_phi> <dp_port_io_nodes class_id="50" tracking_level="0" version="0"> <count>9</count> <item_version>0</item_version> <item class_id="51" tracking_level="0" version="0"> <first>IN_data_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>22</item> </second> </item> </second> </item> <item> <first>IN_size_read</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>12</item> </second> </item> </second> </item> <item> <first>OUT_V_data_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> </second> </item> <item> <first>OUT_V_dest_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> </second> </item> <item> <first>OUT_V_id_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> </second> </item> <item> <first>OUT_V_keep_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> </second> </item> <item> <first>OUT_V_last_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> </second> </item> <item> <first>OUT_V_strb_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> </second> </item> <item> <first>OUT_V_user_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>write</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> </second> </item> </dp_port_io_nodes> <port2core class_id="52" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="53" tracking_level="0" version="0"> <first>2</first> <second>FIFO_SRL</second> </item> </port2core> <node2core> <count>0</count> <item_version>0</item_version> </node2core> </syndb> </boost_serialization>
25.843338
82
0.60397
57f54062f0fa1534e09ece9c559cca74182c9bcd
54,992
adb
Ada
tools-src/gnu/gcc/gcc/ada/par.adb
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
80
2015-01-02T10:14:04.000Z
2021-06-07T06:29:49.000Z
tools-src/gnu/gcc/gcc/ada/par.adb
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
9
2015-05-14T11:03:12.000Z
2018-01-04T07:12:58.000Z
tools-src/gnu/gcc/gcc/ada/par.adb
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
69
2015-01-02T10:45:56.000Z
2021-09-06T07:52:13.000Z
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- P A R -- -- -- -- B o d y -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992-2001 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 2, 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. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Atree; use Atree; with Casing; use Casing; with Csets; use Csets; with Debug; use Debug; with Elists; use Elists; with Errout; use Errout; with Fname; use Fname; with Lib; use Lib; with Namet; use Namet; with Nlists; use Nlists; with Nmake; use Nmake; with Opt; use Opt; with Output; use Output; with Scans; use Scans; with Scn; use Scn; with Sinput; use Sinput; with Sinput.L; use Sinput.L; with Sinfo; use Sinfo; with Snames; use Snames; with Style; with Table; function Par (Configuration_Pragmas : Boolean) return List_Id is Num_Library_Units : Natural := 0; -- Count number of units parsed (relevant only in syntax check only mode, -- since in semantics check mode only a single unit is permitted anyway) Unit_Node : Node_Id; -- Stores compilation unit node for current unit Save_Config_Switches : Config_Switches_Type; -- Variable used to save values of config switches while we parse the -- new unit, to be restored on exit for proper recursive behavior. Loop_Block_Count : Nat := 0; -- Counter used for constructing loop/block names (see the routine -- Par.Ch5.Get_Loop_Block_Name) -------------------- -- Error Recovery -- -------------------- -- When an error is encountered, a call is made to one of the Error_Msg -- routines to record the error. If the syntax scan is not derailed by the -- error (e.g. a complaint that logical operators are inconsistent in an -- EXPRESSION), then control returns from the Error_Msg call, and the -- parse continues unimpeded. -- If on the other hand, the Error_Msg represents a situation from which -- the parser cannot recover locally, the exception Error_Resync is raised -- immediately after the call to Error_Msg. Handlers for Error_Resync -- are located at strategic points to resynchronize the parse. For example, -- when an error occurs in a statement, the handler skips to the next -- semicolon and continues the scan from there. -- Each parsing procedure contains a note with the heading "Error recovery" -- which shows if it can propagate the Error_Resync exception. In order -- not to propagate the exception, a procedure must either contain its own -- handler for this exception, or it must not call any other routines which -- propagate the exception. -- Note: the arrangement of Error_Resync handlers is such that it should -- never be possible to transfer control through a procedure which made -- an entry in the scope stack, invalidating the contents of the stack. Error_Resync : exception; -- Exception raised on error that is not handled locally, see above. Last_Resync_Point : Source_Ptr; -- The resynchronization routines in Par.Sync run a risk of getting -- stuck in an infinite loop if they do not skip a token, and the caller -- keeps repeating the same resync call. On the other hand, if they skip -- a token unconditionally, some recovery opportunities are missed. The -- variable Last_Resync_Point records the token location previously set -- by a Resync call, and if a subsequent Resync call occurs at the same -- location, then the Resync routine does guarantee to skip a token. -------------------------------------------- -- Handling Semicolon Used in Place of IS -- -------------------------------------------- -- The following global variables are used in handling the error situation -- of using a semicolon in place of IS in a subprogram declaration as in: -- procedure X (Y : Integer); -- Q : Integer; -- begin -- ... -- end; -- The two contexts in which this can appear are at the outer level, and -- within a declarative region. At the outer level, we know something is -- wrong as soon as we see the Q (or begin, if there are no declarations), -- and we can immediately decide that the semicolon should have been IS. -- The situation in a declarative region is more complex. The declaration -- of Q could belong to the outer region, and we do not know that we have -- an error until we hit the begin. It is still not clear at this point -- from a syntactic point of view that something is wrong, because the -- begin could belong to the enclosing subprogram or package. However, we -- can incorporate a bit of semantic knowledge and note that the body of -- X is missing, so we definitely DO have an error. We diagnose this error -- as semicolon in place of IS on the subprogram line. -- There are two styles for this diagnostic. If the begin immediately -- follows the semicolon, then we can place a flag (IS expected) right -- on the semicolon. Otherwise we do not detect the error until we hit -- the begin which refers back to the line with the semicolon. -- To control the process in the second case, the following global -- variables are set to indicate that we have a subprogram declaration -- whose body is required and has not yet been found. The prefix SIS -- stands for "Subprogram IS" handling. SIS_Entry_Active : Boolean; -- Set True to indicate that an entry is active (i.e. that a subprogram -- declaration has been encountered, and no body for this subprogram has -- been encountered). The remaining fields are valid only if this is True. SIS_Labl : Node_Id; -- Subprogram designator SIS_Sloc : Source_Ptr; -- Source location of FUNCTION/PROCEDURE keyword SIS_Ecol : Column_Number; -- Column number of FUNCTION/PROCEDURE keyword SIS_Semicolon_Sloc : Source_Ptr; -- Source location of semicolon at end of subprogram declaration SIS_Declaration_Node : Node_Id; -- Pointer to tree node for subprogram declaration SIS_Missing_Semicolon_Message : Error_Msg_Id; -- Used to save message ID of missing semicolon message (which will be -- modified to missing IS if necessary). Set to No_Error_Msg in the -- normal (non-error) case. -- Five things can happen to an active SIS entry -- 1. If a BEGIN is encountered with an SIS entry active, then we have -- exactly the situation in which we know the body of the subprogram is -- missing. After posting an error message, we change the spec to a body, -- rechaining the declarations that intervened between the spec and BEGIN. -- 2. Another subprogram declaration or body is encountered. In this -- case the entry gets overwritten with the information for the new -- subprogram declaration. We don't catch some nested cases this way, -- but it doesn't seem worth the effort. -- 3. A nested declarative region (e.g. package declaration or package -- body) is encountered. The SIS active indication is reset at the start -- of such a nested region. Again, like case 2, this causes us to miss -- some nested cases, but it doesn't seen worth the effort to stack and -- unstack the SIS information. Maybe we will reconsider this if we ever -- get a complaint about a missed case :-) -- 4. We encounter a valid pragma INTERFACE or IMPORT that effectively -- supplies the missing body. In this case we reset the entry. -- 5. We encounter the end of the declarative region without encoutering -- a BEGIN first. In this situation we simply reset the entry. We know -- that there is a missing body, but it seems more reasonable to let the -- later semantic checking discover this. -------------------------------------------- -- Handling IS Used in Place of Semicolon -- -------------------------------------------- -- This is a somewhat trickier situation, and we can't catch it in all -- cases, but we do our best to detect common situations resulting from -- a "cut and paste" operation which forgets to change the IS to semicolon. -- Consider the following example: -- package body X is -- procedure A; -- procedure B is -- procedure C; -- ... -- procedure D is -- begin -- ... -- end; -- begin -- ... -- end; -- The trouble is that the section of text from PROCEDURE B through END; -- consitutes a valid procedure body, and the danger is that we find out -- far too late that something is wrong (indeed most compilers will behave -- uncomfortably on the above example). -- We have two approaches to helping to control this situation. First we -- make every attempt to avoid swallowing the last END; if we can be -- sure that some error will result from doing so. In particular, we won't -- accept the END; unless it is exactly correct (in particular it must not -- have incorrect name tokens), and we won't accept it if it is immediately -- followed by end of file, WITH or SEPARATE (all tokens that unmistakeably -- signal the start of a compilation unit, and which therefore allow us to -- reserve the END; for the outer level.) For more details on this aspect -- of the handling, see package Par.Endh. -- If we can avoid eating up the END; then the result in the absense of -- any additional steps would be to post a missing END referring back to -- the subprogram with the bogus IS. Similarly, if the enclosing package -- has no BEGIN, then the result is a missing BEGIN message, which again -- refers back to the subprogram header. -- Such an error message is not too bad (it's already a big improvement -- over what many parsers do), but it's not ideal, because the declarations -- following the IS have been absorbed into the wrong scope. In the above -- case, this could result for example in a bogus complaint that the body -- of D was missing from the package. -- To catch at least some of these cases, we take the following additional -- steps. First, a subprogram body is marked as having a suspicious IS if -- the declaration line is followed by a line which starts with a symbol -- that can start a declaration in the same column, or to the left of the -- column in which the FUNCTION or PROCEDURE starts (normal style is to -- indent any declarations which really belong a subprogram). If such a -- subprogram encounters a missing BEGIN or missing END, then we decide -- that the IS should have been a semicolon, and the subprogram body node -- is marked (by setting the Bad_Is_Detected flag true. Note that we do -- not do this for library level procedures, only for nested procedures, -- since for library level procedures, we must have a body. -- The processing for a declarative part checks to see if the last -- declaration scanned is marked in this way, and if it is, the tree -- is modified to reflect the IS being interpreted as a semicolon. --------------------------------------------------- -- Parser Type Definitions and Control Variables -- --------------------------------------------------- -- The following variable and associated type declaration are used by the -- expression parsing routines to return more detailed information about -- the categorization of a parsed expression. type Expr_Form_Type is ( EF_Simple_Name, -- Simple name, i.e. possibly qualified identifier EF_Name, -- Simple expression which could also be a name EF_Simple, -- Simple expression which is not call or name EF_Range_Attr, -- Range attribute reference EF_Non_Simple); -- Expression that is not a simple expression Expr_Form : Expr_Form_Type; -- The following type is used for calls to P_Subprogram, P_Package, P_Task, -- P_Protected to indicate which of several possibilities is acceptable. type Pf_Rec is record Spcn : Boolean; -- True if specification OK Decl : Boolean; -- True if declaration OK Gins : Boolean; -- True if generic instantiation OK Pbod : Boolean; -- True if proper body OK Rnam : Boolean; -- True if renaming declaration OK Stub : Boolean; -- True if body stub OK Fil1 : Boolean; -- Filler to fill to 8 bits Fil2 : Boolean; -- Filler to fill to 8 bits end record; pragma Pack (Pf_Rec); function T return Boolean renames True; function F return Boolean renames False; Pf_Decl_Gins_Pbod_Rnam_Stub : constant Pf_Rec := Pf_Rec'(F, T, T, T, T, T, F, F); Pf_Decl : constant Pf_Rec := Pf_Rec'(F, T, F, F, F, F, F, F); Pf_Decl_Gins_Pbod_Rnam : constant Pf_Rec := Pf_Rec'(F, T, T, T, T, F, F, F); Pf_Decl_Pbod : constant Pf_Rec := Pf_Rec'(F, T, F, T, F, F, F, F); Pf_Pbod : constant Pf_Rec := Pf_Rec'(F, F, F, T, F, F, F, F); Pf_Spcn : constant Pf_Rec := Pf_Rec'(T, F, F, F, F, F, F, F); -- The above are the only allowed values of Pf_Rec arguments type SS_Rec is record Eftm : Boolean; -- ELSIF can terminate sequence Eltm : Boolean; -- ELSE can terminate sequence Extm : Boolean; -- EXCEPTION can terminate sequence Ortm : Boolean; -- OR can terminate sequence Sreq : Boolean; -- at least one statement required Tatm : Boolean; -- THEN ABORT can terminate sequence Whtm : Boolean; -- WHEN can terminate sequence Unco : Boolean; -- Unconditional terminate after one statement end record; pragma Pack (SS_Rec); SS_Eftm_Eltm_Sreq : constant SS_Rec := SS_Rec'(T, T, F, F, T, F, F, F); SS_Eltm_Ortm_Tatm : constant SS_Rec := SS_Rec'(F, T, F, T, F, T, F, F); SS_Extm_Sreq : constant SS_Rec := SS_Rec'(F, F, T, F, T, F, F, F); SS_None : constant SS_Rec := SS_Rec'(F, F, F, F, F, F, F, F); SS_Ortm_Sreq : constant SS_Rec := SS_Rec'(F, F, F, T, T, F, F, F); SS_Sreq : constant SS_Rec := SS_Rec'(F, F, F, F, T, F, F, F); SS_Sreq_Whtm : constant SS_Rec := SS_Rec'(F, F, F, F, T, F, T, F); SS_Whtm : constant SS_Rec := SS_Rec'(F, F, F, F, F, F, T, F); SS_Unco : constant SS_Rec := SS_Rec'(F, F, F, F, F, F, F, T); Label_List : Elist_Id; -- List of label nodes for labels appearing in the current compilation. -- Used by Par.Labl to construct the corresponding implicit declarations. ----------------- -- Scope Table -- ----------------- -- The scope table, also referred to as the scope stack, is used to -- record the current scope context. It is organized as a stack, with -- inner nested entries corresponding to higher entries on the stack. -- An entry is made when the parser encounters the opening of a nested -- construct (such as a record, task, package etc.), and then package -- Par.Endh uses this stack to deal with END lines (including properly -- dealing with END nesting errors). type SS_End_Type is -- Type of end entry required for this scope. The last two entries are -- used only in the subprogram body case to mark the case of a suspicious -- IS, or a bad IS (i.e. suspicions confirmed by missing BEGIN or END). -- See separate section on dealing with IS used in place of semicolon. -- Note that for many purposes E_Name, E_Suspicious_Is and E_Bad_Is are -- treated the same (E_Suspicious_Is and E_Bad_Is are simply special cases -- of E_Name). They are placed at the end of the enumeration so that a -- test for >= E_Name catches all three cases efficiently. (E_Dummy, -- dummy entry at outer level E_Case, -- END CASE; E_If, -- END IF; E_Loop, -- END LOOP; E_Record, -- END RECORD; E_Select, -- END SELECT; E_Name, -- END [name]; E_Suspicious_Is, -- END [name]; (case of suspicious IS) E_Bad_Is); -- END [name]; (case of bad IS) -- The following describes a single entry in the scope table type Scope_Table_Entry is record Etyp : SS_End_Type; -- Type of end entry, as per above description Lreq : Boolean; -- A flag indicating whether the label, if present, is required to -- appear on the end line. It is referenced only in the case of -- Etyp = E_Name or E_Suspicious_Is where the name may or may not be -- required (yes for labeled block, no in other cases). Note that for -- all cases except begin, the question of whether a label is required -- can be determined from the other fields (for loop, it is required if -- it is present, and for the other constructs it is never required or -- allowed). Ecol : Column_Number; -- Contains the absolute column number (with tabs expanded) of the -- the expected column of the end assuming normal Ada indentation -- usage. If the RM_Column_Check mode is set, this value is used for -- generating error messages about indentation. Otherwise it is used -- only to control heuristic error recovery actions. Labl : Node_Id; -- This field is used only for the LOOP and BEGIN cases, and is the -- Node_Id value of the label name. For all cases except child units, -- this value is an entity whose Chars field contains the name pointer -- that identifies the label uniquely. For the child unit case the Labl -- field references an N_Defining_Program_Unit_Name node for the name. -- For cases other than LOOP or BEGIN, the Label field is set to Error, -- indicating that it is an error to have a label on the end line. -- (this is really a misuse of Error since there is no Error ???) Decl : List_Id; -- Points to the list of declarations (i.e. the declarative part) -- associated with this construct. It is set only in the END [name] -- cases, and is set to No_List for all other cases which do not have a -- declarative unit associated with them. This is used for determining -- the proper location for implicit label declarations. Node : Node_Id; -- Empty except in the case of entries for IF and CASE statements, -- in which case it contains the N_If_Statement or N_Case_Statement -- node. This is used for setting the End_Span field. Sloc : Source_Ptr; -- Source location of the opening token of the construct. This is -- used to refer back to this line in error messages (such as missing -- or incorrect end lines). The Sloc field is not used, and is not set, -- if a label is present (the Labl field provides the text name of the -- label in this case, which is fine for error messages). S_Is : Source_Ptr; -- S_Is is relevant only if Etyp is set to E_Suspicious_Is or -- E_Bad_Is. It records the location of the IS that is considered -- to be suspicious. Junk : Boolean; -- A boolean flag that is set true if the opening entry is the dubious -- result of some prior error, e.g. a record entry where the record -- keyword was missing. It is used to suppress the issuing of a -- corresponding junk complaint about the end line (we do not want -- to complain about a missing end record when there was no record). end record; -- The following declares the scope table itself. The Last field is the -- stack pointer, so that Scope.Table (Scope.Last) is the top entry. The -- oldest entry, at Scope_Stack (0), is a dummy entry with Etyp set to -- E_Dummy, and the other fields undefined. This dummy entry ensures that -- Scope_Stack (Scope_Stack_Ptr).Etyp can always be tested, and that the -- scope stack pointer is always in range. package Scope is new Table.Table ( Table_Component_Type => Scope_Table_Entry, Table_Index_Type => Int, Table_Low_Bound => 0, Table_Initial => 50, Table_Increment => 100, Table_Name => "Scope"); --------------------------------- -- Parsing Routines by Chapter -- --------------------------------- -- Uncommented declarations in this section simply parse the construct -- corresponding to their name, and return an ID value for the Node or -- List that is created. package Ch2 is function P_Identifier return Node_Id; function P_Pragma return Node_Id; function P_Pragmas_Opt return List_Id; -- This function scans for a sequence of pragmas in other than a -- declaration sequence or statement sequence context. All pragmas -- can appear except pragmas Assert and Debug, which are only allowed -- in a declaration or statement sequence context. procedure P_Pragmas_Misplaced; -- Skips misplaced pragmas with a complaint procedure P_Pragmas_Opt (List : List_Id); -- Parses optional pragmas and appends them to the List end Ch2; package Ch3 is Missing_Begin_Msg : Error_Msg_Id; -- This variable is set by a call to P_Declarative_Part. Normally it -- is set to No_Error_Msg, indicating that no special processing is -- required by the caller. The special case arises when a statement -- is found in the sequence of declarations. In this case the Id of -- the message issued ("declaration expected") is preserved in this -- variable, then the caller can change it to an appropriate missing -- begin message if indeed the BEGIN is missing. function P_Access_Definition return Node_Id; function P_Access_Type_Definition return Node_Id; function P_Array_Type_Definition return Node_Id; function P_Basic_Declarative_Items return List_Id; function P_Constraint_Opt return Node_Id; function P_Declarative_Part return List_Id; function P_Defining_Identifier return Node_Id; function P_Discrete_Choice_List return List_Id; function P_Discrete_Range return Node_Id; function P_Discrete_Subtype_Definition return Node_Id; function P_Known_Discriminant_Part_Opt return List_Id; function P_Signed_Integer_Type_Definition return Node_Id; function P_Range return Node_Id; function P_Range_Or_Subtype_Mark return Node_Id; function P_Range_Constraint return Node_Id; function P_Record_Definition return Node_Id; function P_Subtype_Indication return Node_Id; function P_Subtype_Mark return Node_Id; function P_Subtype_Mark_Resync return Node_Id; function P_Unknown_Discriminant_Part_Opt return Boolean; procedure P_Component_Items (Decls : List_Id); -- Scan out one or more component items and append them to the -- given list. Only scans out more than one declaration in the -- case where the source has a single declaration with multiple -- defining identifiers. function Init_Expr_Opt (P : Boolean := False) return Node_Id; -- If an initialization expression is present (:= expression), then -- it is scanned out and returned, otherwise Empty is returned if no -- initialization expression is present. This procedure also handles -- certain common error cases cleanly. The parameter P indicates if -- a right paren can follow the expression (default = no right paren -- allowed). procedure Skip_Declaration (S : List_Id); -- Used when scanning statements to skip past a mispaced declaration -- The declaration is scanned out and appended to the given list. -- Token is known to be a declaration token (in Token_Class_Declk) -- on entry, so there definition is a declaration to be scanned. function P_Subtype_Indication (Subtype_Mark : Node_Id) return Node_Id; -- This version of P_Subtype_Indication is called when the caller has -- already scanned out the subtype mark which is passed as a parameter. function P_Subtype_Mark_Attribute (Type_Node : Node_Id) return Node_Id; -- Parse a subtype mark attribute. The caller has already parsed the -- subtype mark, which is passed in as the argument, and has checked -- that the current token is apostrophe. end Ch3; package Ch4 is function P_Aggregate return Node_Id; function P_Expression return Node_Id; function P_Expression_No_Right_Paren return Node_Id; function P_Expression_Or_Range_Attribute return Node_Id; function P_Function_Name return Node_Id; function P_Name return Node_Id; function P_Qualified_Simple_Name return Node_Id; function P_Qualified_Simple_Name_Resync return Node_Id; function P_Simple_Expression return Node_Id; function P_Simple_Expression_Or_Range_Attribute return Node_Id; function P_Qualified_Expression (Subtype_Mark : Node_Id) return Node_Id; -- This routine scans out a qualified expression when the caller has -- already scanned out the name and apostrophe of the construct. end Ch4; package Ch5 is function P_Statement_Name (Name_Node : Node_Id) return Node_Id; -- Given a node representing a name (which is a call), converts it -- to the syntactically corresponding procedure call statement. function P_Sequence_Of_Statements (SS_Flags : SS_Rec) return List_Id; -- The argument indicates the acceptable termination tokens. -- See body in Par.Ch5 for details of the use of this parameter. procedure Parse_Decls_Begin_End (Parent : Node_Id); -- Parses declarations and handled statement sequence, setting -- fields of Parent node appropriately. end Ch5; package Ch6 is function P_Designator return Node_Id; function P_Defining_Program_Unit_Name return Node_Id; function P_Formal_Part return List_Id; function P_Parameter_Profile return List_Id; function P_Return_Statement return Node_Id; function P_Subprogram_Specification return Node_Id; procedure P_Mode (Node : Node_Id); -- Sets In_Present and/or Out_Present flags in Node scanning past -- IN, OUT or IN OUT tokens in the source. function P_Subprogram (Pf_Flags : Pf_Rec) return Node_Id; -- Scans out any construct starting with either of the keywords -- PROCEDURE or FUNCTION. The parameter indicates which possible -- possible kinds of construct (body, spec, instantiation etc.) -- are permissible in the current context. end Ch6; package Ch7 is function P_Package (Pf_Flags : Pf_Rec) return Node_Id; -- Scans out any construct starting with the keyword PACKAGE. The -- parameter indicates which possible kinds of construct (body, spec, -- instantiation etc.) are permissible in the current context. end Ch7; package Ch8 is function P_Use_Clause return Node_Id; end Ch8; package Ch9 is function P_Abort_Statement return Node_Id; function P_Abortable_Part return Node_Id; function P_Accept_Statement return Node_Id; function P_Delay_Statement return Node_Id; function P_Entry_Body return Node_Id; function P_Protected return Node_Id; function P_Requeue_Statement return Node_Id; function P_Select_Statement return Node_Id; function P_Task return Node_Id; function P_Terminate_Alternative return Node_Id; end Ch9; package Ch10 is function P_Compilation_Unit return Node_Id; -- Note: this function scans a single compilation unit, and -- checks that an end of file follows this unit, diagnosing -- any unexpected input as an error, and then skipping it, so -- that Token is set to Tok_EOF on return. An exception is in -- syntax-only mode, where multiple compilation units are -- permitted. In this case, P_Compilation_Unit does not check -- for end of file and there may be more compilation units to -- scan. The caller can uniquely detect this situation by the -- fact that Token is not set to Tok_EOF on return. end Ch10; package Ch11 is function P_Handled_Sequence_Of_Statements return Node_Id; function P_Raise_Statement return Node_Id; function Parse_Exception_Handlers return List_Id; -- Parses the partial construct EXCEPTION followed by a list of -- exception handlers which appears in a number of productions, -- and returns the list of exception handlers. end Ch11; package Ch12 is function P_Generic return Node_Id; function P_Generic_Actual_Part_Opt return List_Id; end Ch12; package Ch13 is function P_Representation_Clause return Node_Id; function P_Code_Statement (Subtype_Mark : Node_Id) return Node_Id; -- Function to parse a code statement. The caller has scanned out -- the name to be used as the subtype mark (but has not checked that -- it is suitable for use as a subtype mark, i.e. is either an -- identifier or a selected component). The current token is an -- apostrophe and the following token is either a left paren or -- RANGE (the latter being an error to be caught by P_Code_Statement. end Ch13; -- Note: the parsing for annexe J features (i.e. obsolescent features) -- is found in the logical section where these features would be if -- they were not obsolescent. In particular: -- Delta constraint is parsed by P_Delta_Constraint (3.5.9) -- At clause is parsed by P_At_Clause (13.1) -- Mod clause is parsed by P_Mod_Clause (13.5.1) ------------------ -- End Handling -- ------------------ -- Routines for handling end lines, including scope recovery package Endh is function Check_End return Boolean; -- Called when an end sequence is required. In the absence of an error -- situation, Token contains Tok_End on entry, but in a missing end -- case, this may not be the case. Pop_End_Context is used to determine -- the appropriate action to be taken. The returned result is True if -- an End sequence was encountered and False if no End sequence was -- present. This occurs if the END keyword encountered was determined -- to be improper and deleted (i.e. Pop_End_Context set End_Action to -- Skip_And_Reject). Note that the END sequence includes a semicolon, -- except in the case of END RECORD, where a semicolon follows the END -- RECORD, but is not part of the record type definition itself. procedure End_Skip; -- Skip past an end sequence. On entry Token contains Tok_End, and we -- we know that the end sequence is syntactically incorrect, and that -- an appropriate error message has already been posted. The mission -- is simply to position the scan pointer to be the best guess of the -- position after the end sequence. We do not issue any additional -- error messages while carrying this out. procedure End_Statements (Parent : Node_Id := Empty); -- Called when an end is required or expected to terminate a sequence -- of statements. The caller has already made an appropriate entry in -- the Scope.Table to describe the expected form of the end. This can -- only be used in cases where the only appropriate terminator is end. -- If Parent is non-empty, then if a correct END line is encountered, -- the End_Label field of Parent is set appropriately. end Endh; ------------------------------------ -- Resynchronization After Errors -- ------------------------------------ -- These procedures are used to resynchronize after errors. Following an -- error which is not immediately locally recoverable, the exception -- Error_Resync is raised. The handler for Error_Resync typically calls -- one of these recovery procedures to resynchronize the source position -- to a point from which parsing can be restarted. -- Note: these procedures output an information message that tokens are -- being skipped, but this message is output only if the option for -- Multiple_Errors_Per_Line is set in Options. package Sync is procedure Resync_Choice; -- Used if an error occurs scanning a choice. The scan pointer is -- advanced to the next vertical bar, arrow, or semicolon, whichever -- comes first. We also quit if we encounter an end of file. procedure Resync_Expression; -- Used if an error is detected during the parsing of an expression. -- It skips past tokens until either a token which cannot be part of -- an expression is encountered (an expression terminator), or if a -- comma or right parenthesis or vertical bar is encountered at the -- current parenthesis level (a parenthesis level counter is maintained -- to carry out this test). procedure Resync_Past_Semicolon; -- Used if an error occurs while scanning a sequence of declarations. -- The scan pointer is positioned past the next semicolon and the scan -- resumes. The scan is also resumed on encountering a token which -- starts a declaration (but we make sure to skip at least one token -- in this case, to avoid getting stuck in a loop). procedure Resync_Past_Semicolon_Or_To_Loop_Or_Then; -- Used if an error occurs while scanning a sequence of statements. -- The scan pointer is positioned past the next semicolon, or to the -- next occurrence of either then or loop, and the scan resumes. procedure Resync_To_When; -- Used when an error occurs scanning an entry index specification. -- The scan pointer is positioned to the next WHEN (or to IS or -- semicolon if either of these appear before WHEN, indicating -- another error has occurred). procedure Resync_Semicolon_List; -- Used if an error occurs while scanning a parenthesized list of items -- separated by semicolons. The scan pointer is advanced to the next -- semicolon or right parenthesis at the outer parenthesis level, or -- to the next is or RETURN keyword occurrence, whichever comes first. procedure Resync_Cunit; -- Synchronize to next token which could be the start of a compilation -- unit, or to the end of file token. end Sync; ------------------------- -- Token Scan Routines -- ------------------------- -- Routines to check for expected tokens package Tchk is -- Procedures with names of the form T_xxx, where Tok_xxx is a token -- name, check that the current token matches the required token, and -- if so, scan past it. If not, an error is issued indicating that -- the required token is not present (xxx expected). In most cases, the -- scan pointer is not moved in the not-found case, but there are some -- exceptions to this, see for example T_Id, where the scan pointer is -- moved across a literal appearing where an identifier is expected. procedure T_Abort; procedure T_Arrow; procedure T_At; procedure T_Body; procedure T_Box; procedure T_Colon; procedure T_Colon_Equal; procedure T_Comma; procedure T_Dot_Dot; procedure T_For; procedure T_Greater_Greater; procedure T_Identifier; procedure T_In; procedure T_Is; procedure T_Left_Paren; procedure T_Loop; procedure T_Mod; procedure T_New; procedure T_Of; procedure T_Or; procedure T_Private; procedure T_Range; procedure T_Record; procedure T_Right_Paren; procedure T_Semicolon; procedure T_Then; procedure T_Type; procedure T_Use; procedure T_When; procedure T_With; -- Procedures have names of the form TF_xxx, where Tok_xxx is a token -- name check that the current token matches the required token, and -- if so, scan past it. If not, an error message is issued indicating -- that the required token is not present (xxx expected). -- If the missing token is at the end of the line, then control returns -- immediately after posting the message. If there are remaining tokens -- on the current line, a search is conducted to see if the token -- appears later on the current line, as follows: -- A call to Scan_Save is issued and a forward search for the token -- is carried out. If the token is found on the current line before a -- semicolon, then it is scanned out and the scan continues from that -- point. If not the scan is restored to the point where it was missing. procedure TF_Arrow; procedure TF_Is; procedure TF_Loop; procedure TF_Return; procedure TF_Semicolon; procedure TF_Then; procedure TF_Use; end Tchk; ---------------------- -- Utility Routines -- ---------------------- package Util is function Bad_Spelling_Of (T : Token_Type) return Boolean; -- This function is called in an error situation. It checks if the -- current token is an identifier whose name is a plausible bad -- spelling of the given keyword token, and if so, issues an error -- message, sets Token from T, and returns True. Otherwise Token is -- unchanged, and False is returned. procedure Check_Bad_Layout; -- Check for bad indentation in RM checking mode. Used for statements -- and declarations. Checks if current token is at start of line and -- is exdented from the current expected end column, and if so an -- error message is generated. procedure Check_Misspelling_Of (T : Token_Type); pragma Inline (Check_Misspelling_Of); -- This is similar to the function above, except that it does not -- return a result. It is typically used in a situation where any -- identifier is an error, and it makes sense to simply convert it -- to the given token if it is a plausible misspelling of it. procedure Check_95_Keyword (Token_95, Next : Token_Type); -- This routine checks if the token after the current one matches the -- Next argument. If so, the scan is backed up to the current token -- and Token_Type is changed to Token_95 after issuing an appropriate -- error message ("(Ada 83) keyword xx cannot be used"). If not, -- the scan is backed up with Token_Type unchanged. This routine -- is used to deal with an attempt to use a 95 keyword in Ada 83 -- mode. The caller has typically checked that the current token, -- an identifier, matches one of the 95 keywords. procedure Check_Simple_Expression (E : Node_Id); -- Given an expression E, that has just been scanned, so that Expr_Form -- is still set, outputs an error if E is a non-simple expression. E is -- not modified by this call. procedure Check_Simple_Expression_In_Ada_83 (E : Node_Id); -- Like Check_Simple_Expression, except that the error message is only -- given when operating in Ada 83 mode, and includes "in Ada 83". function Check_Subtype_Mark (Mark : Node_Id) return Node_Id; -- Called to check that a node representing a name (or call) is -- suitable for a subtype mark, i.e, that it is an identifier or -- a selected component. If so, or if it is already Error, then -- it is returned unchanged. Otherwise an error message is issued -- and Error is returned. function Comma_Present return Boolean; -- Used in comma delimited lists to determine if a comma is present, or -- can reasonably be assumed to have been present (an error message is -- generated in the latter case). If True is returned, the scan has been -- positioned past the comma. If False is returned, the scan position -- is unchanged. Note that all comma-delimited lists are terminated by -- a right paren, so the only legitimate tokens when Comma_Present is -- called are right paren and comma. If some other token is found, then -- Comma_Present has the job of deciding whether it is better to pretend -- a comma was present, post a message for a missing comma and return -- True, or return False and let the caller diagnose the missing right -- parenthesis. procedure Discard_Junk_Node (N : Node_Id); procedure Discard_Junk_List (L : List_Id); pragma Inline (Discard_Junk_Node); pragma Inline (Discard_Junk_List); -- These procedures do nothing at all, their effect is simply to discard -- the argument. A typical use is to skip by some junk that is not -- expected in the current context. procedure Ignore (T : Token_Type); -- If current token matches T, then give an error message and skip -- past it, otherwise the call has no effect at all. T may be any -- reserved word token, or comma, left or right paren, or semicolon. function Is_Reserved_Identifier return Boolean; -- Test if current token is a reserved identifier. This test is based -- on the token being a keyword and being spelled in typical identifier -- style (i.e. starting with an upper case letter). procedure Merge_Identifier (Prev : Node_Id; Nxt : Token_Type); -- Called when the previous token is an identifier (whose Token_Node -- value is given by Prev) to check if current token is an identifier -- that can be merged with the previous one adding an underscore. The -- merge is only attempted if the following token matches Nxt. If all -- conditions are met, an error message is issued, and the merge is -- carried out, modifying the Chars field of Prev. procedure No_Constraint; -- Called in a place where no constraint is allowed, but one might -- appear due to a common error (e.g. after the type mark in a procedure -- parameter. If a constraint is present, an error message is posted, -- and the constraint is scanned and discarded. function No_Right_Paren (Expr : Node_Id) return Node_Id; -- Function to check for no right paren at end of expression, returns -- its argument if no right paren, else flags paren and returns Error. procedure Push_Scope_Stack; pragma Inline (Push_Scope_Stack); -- Push a new entry onto the scope stack. Scope.Last (the stack pointer) -- is incremented. The Junk field is preinitialized to False. The caller -- is expected to fill in all remaining entries of the new new top stack -- entry at Scope.Table (Scope.Last). procedure Pop_Scope_Stack; -- Pop an entry off the top of the scope stack. Scope_Last (the scope -- table stack pointer) is decremented by one. It is a fatal error to -- try to pop off the dummy entry at the bottom of the stack (i.e. -- Scope.Last must be non-zero at the time of call). function Separate_Present return Boolean; -- Determines if the current token is either Tok_Separate, or an -- identifier that is a possible misspelling of "separate" followed -- by a semicolon. True is returned if so, otherwise False. procedure Signal_Bad_Attribute; -- The current token is an identifier that is supposed to be an -- attribute identifier but is not. This routine posts appropriate -- error messages, including a check for a near misspelling. function Token_Is_At_Start_Of_Line return Boolean; pragma Inline (Token_Is_At_Start_Of_Line); -- Determines if the current token is the first token on the line end Util; --------------------------------------- -- Specialized Syntax Check Routines -- --------------------------------------- function Prag (Pragma_Node : Node_Id; Semi : Source_Ptr) return Node_Id; -- This function is passed a tree for a pragma that has been scanned out. -- The pragma is syntactically well formed according to the general syntax -- for pragmas and the pragma identifier is for one of the recognized -- pragmas. It performs specific syntactic checks for specific pragmas. -- The result is the input node if it is OK, or Error otherwise. The -- reason that this is separated out is to facilitate the addition -- of implementation defined pragmas. The second parameter records the -- location of the semicolon following the pragma (this is needed for -- correct processing of the List and Page pragmas). The returned value -- is a copy of Pragma_Node, or Error if an error is found. ------------------------- -- Subsidiary Routines -- ------------------------- procedure Labl; -- This procedure creates implicit label declarations for all label that -- are declared in the current unit. Note that this could conceptually -- be done at the point where the labels are declared, but it is tricky -- to do it then, since the tree is not hooked up at the point where the -- label is declared (e.g. a sequence of statements is not yet attached -- to its containing scope at the point a label in the sequence is found) procedure Load; -- This procedure loads all subsidiary units that are required by this -- unit, including with'ed units, specs for bodies, and parents for child -- units. It does not load bodies for inlined procedures and generics, -- since we don't know till semantic analysis is complete what is needed. ----------- -- Stubs -- ----------- -- The package bodies can see all routines defined in all other subpackages use Ch2; use Ch3; use Ch4; use Ch5; use Ch6; use Ch7; use Ch8; use Ch9; use Ch10; use Ch11; use Ch12; use Ch13; use Endh; use Tchk; use Sync; use Util; package body Ch2 is separate; package body Ch3 is separate; package body Ch4 is separate; package body Ch5 is separate; package body Ch6 is separate; package body Ch7 is separate; package body Ch8 is separate; package body Ch9 is separate; package body Ch10 is separate; package body Ch11 is separate; package body Ch12 is separate; package body Ch13 is separate; package body Endh is separate; package body Tchk is separate; package body Sync is separate; package body Util is separate; function Prag (Pragma_Node : Node_Id; Semi : Source_Ptr) return Node_Id is separate; procedure Labl is separate; procedure Load is separate; --------- -- Par -- --------- -- This function is the parse routine called at the outer level. It parses -- the current compilation unit and adds implicit label declarations. begin -- Deal with configuration pragmas case first if Configuration_Pragmas then declare Ecount : constant Int := Errors_Detected; Pragmas : List_Id := Empty_List; P_Node : Node_Id; begin loop if Token = Tok_EOF then return Pragmas; elsif Token /= Tok_Pragma then Error_Msg_SC ("only pragmas allowed in configuration file"); return Error_List; else P_Node := P_Pragma; if Errors_Detected > Ecount then return Error_List; end if; if Chars (P_Node) > Last_Configuration_Pragma_Name and then Chars (P_Node) /= Name_Source_Reference then Error_Msg_SC ("only configuration pragmas allowed " & "in configuration file"); return Error_List; end if; Append (P_Node, Pragmas); end if; end loop; end; -- Normal case of compilation unit else Save_Opt_Config_Switches (Save_Config_Switches); -- Special processing for language defined units. For this purpose -- we do NOT consider the renamings in annex J as predefined. That -- allows users to compile their own versions of these files, and -- in particular, in the VMS implementation, the DEC versions can -- be substituted for the standard Ada 95 versions. if Is_Predefined_File_Name (Fname => File_Name (Current_Source_File), Renamings_Included => False) then Set_Opt_Config_Switches (Is_Internal_File_Name (File_Name (Current_Source_File))); -- If this is the main unit, disallow compilation unless the -gnatg -- (GNAT mode) switch is set (from a user point of view, the rule is -- that language defined units cannot be recompiled). -- However, an exception is s-rpc, and its children. We test this -- by looking at the character after the minus, the rule is that -- System.RPC and its children are the only children in System -- whose second level name can start with the letter r. Get_Name_String (File_Name (Current_Source_File)); if (Name_Len < 3 or else Name_Buffer (1 .. 3) /= "s-r") and then Current_Source_Unit = Main_Unit and then not GNAT_Mode and then Operating_Mode = Generate_Code then Error_Msg_SC ("language defined units may not be recompiled"); end if; end if; -- The following loop runs more than once only in syntax check mode -- where we allow multiple compilation units in the same file. loop Set_Opt_Config_Switches (Is_Internal_File_Name (File_Name (Current_Source_File))); -- Initialize scope table and other parser control variables Compiler_State := Parsing; Scope.Init; Scope.Increment_Last; Scope.Table (0).Etyp := E_Dummy; SIS_Entry_Active := False; Last_Resync_Point := No_Location; Label_List := New_Elmt_List; Unit_Node := P_Compilation_Unit; -- If we are not at an end of file, then this means that we are -- in syntax scan mode, and we can have another compilation unit, -- otherwise we will exit from the loop. exit when Token = Tok_EOF; Restore_Opt_Config_Switches (Save_Config_Switches); Set_Comes_From_Source_Default (False); end loop; -- Now that we have completely parsed the source file, we can -- complete the source file table entry. Complete_Source_File_Entry; -- An internal error check, the scope stack should now be empty pragma Assert (Scope.Last = 0); -- Remaining steps are to create implicit label declarations and to -- load required subsidiary sources. These steps are required only -- if we are doing semantic checking. if Operating_Mode /= Check_Syntax or else Debug_Flag_F then Par.Labl; Par.Load; end if; -- Restore settings of switches saved on entry Restore_Opt_Config_Switches (Save_Config_Switches); Set_Comes_From_Source_Default (False); return Empty_List; end if; end Par;
46.485207
79
0.642857
59479527c30596540f484142d0e1afcb14739e72
1,400
ads
Ada
llvm-gcc-4.2-2.9/gcc/ada/a-swbwha.ads
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
1
2016-04-09T02:58:13.000Z
2016-04-09T02:58:13.000Z
llvm-gcc-4.2-2.9/gcc/ada/a-swbwha.ads
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
llvm-gcc-4.2-2.9/gcc/ada/a-swbwha.ads
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- A D A . S T R I N G S . W I D E _ B O U N D E D . W I D E _ H A S H -- -- -- -- S p e c -- -- -- -- This specification is adapted from the Ada Reference Manual for use with -- -- GNAT. In accordance with the copyright of that document, you can freely -- -- copy and modify this specification, provided that if you redistribute a -- -- modified version, any changes that you have made are clearly indicated. -- -- -- ------------------------------------------------------------------------------ with Ada.Containers; generic with package Bounded is new Ada.Strings.Wide_Bounded.Generic_Bounded_Length (<>); function Ada.Strings.Wide_Bounded.Wide_Hash (Key : Bounded.Bounded_Wide_String) return Containers.Hash_Type; pragma Preelaborate (Ada.Strings.Wide_Bounded.Wide_Hash);
53.846154
79
0.376429
3d99a75a2626bcc3adbfeae07b0d293329080e1c
5,872
ads
Ada
source/nodes/program-nodes-interface_types.ads
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
null
null
null
source/nodes/program-nodes-interface_types.ads
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
null
null
null
source/nodes/program-nodes-interface_types.ads
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
1
2019-10-16T09:05:27.000Z
2019-10-16T09:05:27.000Z
-- SPDX-FileCopyrightText: 2019 Max Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Lexical_Elements; with Program.Elements.Expressions; with Program.Elements.Interface_Types; with Program.Element_Visitors; package Program.Nodes.Interface_Types is pragma Preelaborate; type Interface_Type is new Program.Nodes.Node and Program.Elements.Interface_Types.Interface_Type and Program.Elements.Interface_Types.Interface_Type_Text with private; function Create (Limited_Token : Program.Lexical_Elements.Lexical_Element_Access; Task_Token : Program.Lexical_Elements.Lexical_Element_Access; Protected_Token : Program.Lexical_Elements.Lexical_Element_Access; Synchronized_Token : Program.Lexical_Elements.Lexical_Element_Access; Interface_Token : Program.Lexical_Elements.Lexical_Element_Access; And_Token : Program.Lexical_Elements.Lexical_Element_Access; Progenitors : Program.Elements.Expressions .Expression_Vector_Access) return Interface_Type; type Implicit_Interface_Type is new Program.Nodes.Node and Program.Elements.Interface_Types.Interface_Type with private; function Create (Progenitors : Program.Elements.Expressions .Expression_Vector_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False; Has_Limited : Boolean := False; Has_Task : Boolean := False; Has_Protected : Boolean := False; Has_Synchronized : Boolean := False) return Implicit_Interface_Type with Pre => Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance; private type Base_Interface_Type is abstract new Program.Nodes.Node and Program.Elements.Interface_Types.Interface_Type with record Progenitors : Program.Elements.Expressions.Expression_Vector_Access; end record; procedure Initialize (Self : in out Base_Interface_Type'Class); overriding procedure Visit (Self : not null access Base_Interface_Type; Visitor : in out Program.Element_Visitors.Element_Visitor'Class); overriding function Progenitors (Self : Base_Interface_Type) return Program.Elements.Expressions.Expression_Vector_Access; overriding function Is_Interface_Type (Self : Base_Interface_Type) return Boolean; overriding function Is_Type_Definition (Self : Base_Interface_Type) return Boolean; overriding function Is_Definition (Self : Base_Interface_Type) return Boolean; type Interface_Type is new Base_Interface_Type and Program.Elements.Interface_Types.Interface_Type_Text with record Limited_Token : Program.Lexical_Elements.Lexical_Element_Access; Task_Token : Program.Lexical_Elements.Lexical_Element_Access; Protected_Token : Program.Lexical_Elements.Lexical_Element_Access; Synchronized_Token : Program.Lexical_Elements.Lexical_Element_Access; Interface_Token : Program.Lexical_Elements.Lexical_Element_Access; And_Token : Program.Lexical_Elements.Lexical_Element_Access; end record; overriding function To_Interface_Type_Text (Self : in out Interface_Type) return Program.Elements.Interface_Types.Interface_Type_Text_Access; overriding function Limited_Token (Self : Interface_Type) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Task_Token (Self : Interface_Type) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Protected_Token (Self : Interface_Type) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Synchronized_Token (Self : Interface_Type) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Interface_Token (Self : Interface_Type) return Program.Lexical_Elements.Lexical_Element_Access; overriding function And_Token (Self : Interface_Type) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Has_Limited (Self : Interface_Type) return Boolean; overriding function Has_Task (Self : Interface_Type) return Boolean; overriding function Has_Protected (Self : Interface_Type) return Boolean; overriding function Has_Synchronized (Self : Interface_Type) return Boolean; type Implicit_Interface_Type is new Base_Interface_Type with record Is_Part_Of_Implicit : Boolean; Is_Part_Of_Inherited : Boolean; Is_Part_Of_Instance : Boolean; Has_Limited : Boolean; Has_Task : Boolean; Has_Protected : Boolean; Has_Synchronized : Boolean; end record; overriding function To_Interface_Type_Text (Self : in out Implicit_Interface_Type) return Program.Elements.Interface_Types.Interface_Type_Text_Access; overriding function Is_Part_Of_Implicit (Self : Implicit_Interface_Type) return Boolean; overriding function Is_Part_Of_Inherited (Self : Implicit_Interface_Type) return Boolean; overriding function Is_Part_Of_Instance (Self : Implicit_Interface_Type) return Boolean; overriding function Has_Limited (Self : Implicit_Interface_Type) return Boolean; overriding function Has_Task (Self : Implicit_Interface_Type) return Boolean; overriding function Has_Protected (Self : Implicit_Interface_Type) return Boolean; overriding function Has_Synchronized (Self : Implicit_Interface_Type) return Boolean; end Program.Nodes.Interface_Types;
34.139535
79
0.734843
297689b5b60d2bdc8983878e0a3b3d51f1bf647b
9,753
ads
Ada
.emacs.d/elpa/wisi-2.1.1/wisitoken-generate-lr.ads
caqg/linux-home
eed631aae6f5e59e4f46e14f1dff443abca5fa28
[ "Linux-OpenIB" ]
null
null
null
.emacs.d/elpa/wisi-2.1.1/wisitoken-generate-lr.ads
caqg/linux-home
eed631aae6f5e59e4f46e14f1dff443abca5fa28
[ "Linux-OpenIB" ]
null
null
null
.emacs.d/elpa/wisi-2.1.1/wisitoken-generate-lr.ads
caqg/linux-home
eed631aae6f5e59e4f46e14f1dff443abca5fa28
[ "Linux-OpenIB" ]
null
null
null
-- Abstract : -- -- Common utilities for LR parser table generators. -- -- Copyright (C) 2017 - 2019 Free Software Foundation, Inc. -- -- This library is free software; you can redistribute it and/or modify it -- under terms of the GNU General Public License as published by the Free -- Software Foundation; either version 3, 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 MERCHAN- -- TABILITY 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. pragma License (Modified_GPL); with Ada.Containers.Doubly_Linked_Lists; with WisiToken.Generate.LR1_Items; with WisiToken.Parse.LR; with WisiToken.Productions; package WisiToken.Generate.LR is use WisiToken.Parse.LR; subtype Conflict_Parse_Actions is Parse_Action_Verbs range Shift .. Accept_It; type Conflict is record -- A typical conflict is: -- -- SHIFT/REDUCE in state: 11 on token IS -- -- State numbers change with minor changes in the grammar, so we -- attempt to identify the state by the LHS of the two productions -- involved; this is _not_ guarranteed to be unique, but is good -- enough for our purposes. We also store the state number for -- generated conflicts (not for known conflicts from the grammar -- definition file), for debugging. Action_A : Conflict_Parse_Actions; LHS_A : Token_ID; Action_B : Conflict_Parse_Actions; LHS_B : Token_ID; State_Index : Unknown_State_Index; On : Token_ID; end record; package Conflict_Lists is new Ada.Containers.Doubly_Linked_Lists (Conflict); type Conflict_Count is record State : State_Index; Accept_Reduce : Integer := 0; Shift_Reduce : Integer := 0; Reduce_Reduce : Integer := 0; end record; package Conflict_Count_Lists is new Ada.Containers.Doubly_Linked_Lists (Conflict_Count); procedure Put (Item : in Conflict_Lists.List; File : in Ada.Text_IO.File_Type; Descriptor : in WisiToken.Descriptor); procedure Add_Action (Symbol : in Token_ID; Action : in Parse_Action_Rec; Action_List : in out Action_Node_Ptr; Closure : in LR1_Items.Item_Set; Grammar : in WisiToken.Productions.Prod_Arrays.Vector; Has_Empty_Production : in Token_ID_Set; First_Nonterm_Set : in Token_Array_Token_Set; Conflict_Counts : in out Conflict_Count_Lists.List; Conflicts : in out Conflict_Lists.List; Descriptor : in WisiToken.Descriptor); -- Add (Symbol, Action) to Action_List; check for conflicts -- -- Closure .. Conflicts are for conflict reporting procedure Add_Actions (Closure : in LR1_Items.Item_Set; Table : in out Parse_Table; Grammar : in WisiToken.Productions.Prod_Arrays.Vector; Has_Empty_Production : in Token_ID_Set; First_Nonterm_Set : in Token_Array_Token_Set; Conflict_Counts : in out Conflict_Count_Lists.List; Conflicts : in out Conflict_Lists.List; Descriptor : in WisiToken.Descriptor); -- Add actions for Closure to Table. Has_Empty_Production, First, -- Conflicts used for conflict reporting. procedure Add_Lookahead_Actions (Item : in LR1_Items.Item; Action_List : in out Action_Node_Ptr; Grammar : in WisiToken.Productions.Prod_Arrays.Vector; Has_Empty_Production : in Token_ID_Set; First_Nonterm_Set : in Token_Array_Token_Set; Conflict_Counts : in out Conflict_Count_Lists.List; Conflicts : in out Conflict_Lists.List; Closure : in LR1_Items.Item_Set; Descriptor : in WisiToken.Descriptor); -- Add actions for Item.Lookaheads to Action_List -- Closure must be from the item set containing Item. -- Has_Empty_Production .. Closure used for conflict reporting. procedure Delete_Known (Conflicts : in out Conflict_Lists.List; Known_Conflicts : in out Conflict_Lists.List); -- Delete Known_Conflicts from Conflicts. function Find (Closure : in LR1_Items.Item_Set; Action : in Parse_Action_Rec; Lookahead : in Token_ID; Grammar : in WisiToken.Productions.Prod_Arrays.Vector; Has_Empty_Production : in Token_ID_Set; First : in Token_Array_Token_Set; Descriptor : in WisiToken.Descriptor) return Token_ID; -- Return the LHS of a production in kernel of Closure, for an Action -- conflict on Lookahead; for naming a Conflict object. function Image (Item : in Conflict; Descriptor : in WisiToken.Descriptor) return String; function Is_Present (Item : in Conflict; Conflicts : in Conflict_Lists.List) return Boolean; function Match (Known : in Conflict; Item : in Conflict_Lists.Constant_Reference_Type) return Boolean; ---------- -- Minimal terminal sequences. type RHS_Sequence is record Recursion : Recursion_Lists.List; -- All recursion cycles involving this RHS. Worst_Recursion : WisiToken.Recursion := None; -- worst case of all Recursion. Sequence : Token_ID_Arrays.Vector; end record; package RHS_Sequence_Arrays is new SAL.Gen_Unbounded_Definite_Vectors (Natural, RHS_Sequence, Default_Element => (others => <>)); function Image (Item : in RHS_Sequence; Descriptor : in WisiToken.Descriptor) return String; -- Positional Ada aggregate syntax. function Image is new RHS_Sequence_Arrays.Gen_Image_Aux (Descriptor, Trimmed_Image, Image); function Min (Item : in RHS_Sequence_Arrays.Vector) return RHS_Sequence; -- Return element of Item with minimum length; type Minimal_Sequence_Array is array (Token_ID range <>) of RHS_Sequence_Arrays.Vector; function Compute_Minimal_Terminal_Sequences (Descriptor : in WisiToken.Descriptor; Grammar : in WisiToken.Productions.Prod_Arrays.Vector; Recursions : in Generate.Recursions) return Minimal_Sequence_Array; -- For each production in Grammar, compute the minimal sequence of -- terminals that will complete it. Result is an empty sequence if -- the production may be empty. function Compute_Minimal_Terminal_First (Descriptor : in WisiToken.Descriptor; Minimal_Terminal_Sequences : in Minimal_Sequence_Array) return Token_Array_Token_ID; -- For each nonterminal in Grammar, return the first of the minimal -- sequence of terminals that will complete it; Invalid_Token_ID if -- the minimal sequence is empty. procedure Set_Minimal_Complete_Actions (State : in out Parse_State; Kernel : in LR1_Items.Item_Set; Descriptor : in WisiToken.Descriptor; Grammar : in WisiToken.Productions.Prod_Arrays.Vector; Minimal_Terminal_Sequences : in Minimal_Sequence_Array; Minimal_Terminal_First : in Token_Array_Token_ID); -- Set State.Minimal_Complete_Actions to the set of actions that will -- most quickly complete the productions in Kernel (which must be for -- State). Useful in error correction when we know the next actual -- terminal is a block ending or statement start. -- -- The Minimal_Complete_Actions will be empty in a state where there -- is nothing useful to do; the accept state, or one where all -- productions are recursive. -- -- Also set State.Kernels; used to resolve multiple reduce actions at -- runtime. ---------- -- Parse table output procedure Put_Text_Rep (Table : in Parse_Table; File_Name : in String; Action_Names : in Names_Array_Array; Check_Names : in Names_Array_Array); -- Write machine-readable text format of Table.States to a file -- File_Name, to be read by the parser executable at startup, using -- WisiToken.Parse.LR.Get_Text_Rep. procedure Put (Item : in Parse_Action_Rec; Descriptor : in WisiToken.Descriptor); procedure Put (Item : in McKenzie_Param_Type; Descriptor : in WisiToken.Descriptor); procedure Put (Descriptor : in WisiToken.Descriptor; Item : in Parse_Action_Rec); procedure Put (Descriptor : in WisiToken.Descriptor; Action : in Parse_Action_Node_Ptr); procedure Put (Descriptor : in WisiToken.Descriptor; State : in Parse_State); -- Put Item to Ada.Text_IO.Current_Output in parse table format. procedure Put_Parse_Table (Table : in Parse_Table_Ptr; Title : in String; Grammar : in WisiToken.Productions.Prod_Arrays.Vector; Recursions : in Generate.Recursions; Minimal_Terminal_Sequences : in Minimal_Sequence_Array; Kernels : in LR1_Items.Item_Set_List; Conflicts : in Conflict_Count_Lists.List; Descriptor : in WisiToken.Descriptor; Include_Extra : in Boolean := False); -- "Extra" is recursions, lookaheads. end WisiToken.Generate.LR;
44.131222
105
0.666872
2f9e44069ad57507f49e999b46865f8a99e8884a
16,679
adb
Ada
bb-runtimes/runtimes/ravenscar-full-stm32f3x4/gnat/s-wchcnv.adb
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/runtimes/ravenscar-full-stm32f3x4/gnat/s-wchcnv.adb
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/runtimes/ravenscar-full-stm32f3x4/gnat/s-wchcnv.adb
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . W C H _ C N V -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2021, 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. -- -- -- ------------------------------------------------------------------------------ pragma Compiler_Unit_Warning; with Interfaces; use Interfaces; with System.WCh_Con; use System.WCh_Con; with System.WCh_JIS; use System.WCh_JIS; package body System.WCh_Cnv is ----------------------------- -- Char_Sequence_To_UTF_32 -- ----------------------------- function Char_Sequence_To_UTF_32 (C : Character; EM : System.WCh_Con.WC_Encoding_Method) return UTF_32_Code is B1 : Unsigned_32; C1 : Character; U : Unsigned_32; W : Unsigned_32; procedure Get_Hex (N : Character); -- If N is a hex character, then set B1 to 16 * B1 + character N. -- Raise Constraint_Error if character N is not a hex character. procedure Get_UTF_Byte; pragma Inline (Get_UTF_Byte); -- Used to interpret a 2#10xxxxxx# continuation byte in UTF-8 mode. -- Reads a byte, and raises CE if the first two bits are not 10. -- Otherwise shifts W 6 bits left and or's in the 6 xxxxxx bits. ------------- -- Get_Hex -- ------------- procedure Get_Hex (N : Character) is B2 : constant Unsigned_32 := Character'Pos (N); begin if B2 in Character'Pos ('0') .. Character'Pos ('9') then B1 := B1 * 16 + B2 - Character'Pos ('0'); elsif B2 in Character'Pos ('A') .. Character'Pos ('F') then B1 := B1 * 16 + B2 - (Character'Pos ('A') - 10); elsif B2 in Character'Pos ('a') .. Character'Pos ('f') then B1 := B1 * 16 + B2 - (Character'Pos ('a') - 10); else raise Constraint_Error; end if; end Get_Hex; ------------------ -- Get_UTF_Byte -- ------------------ procedure Get_UTF_Byte is begin U := Unsigned_32 (Character'Pos (In_Char)); if (U and 2#11000000#) /= 2#10_000000# then raise Constraint_Error; end if; W := Shift_Left (W, 6) or (U and 2#00111111#); end Get_UTF_Byte; -- Start of processing for Char_Sequence_To_UTF_32 begin case EM is when WCEM_Hex => if C /= ASCII.ESC then return Character'Pos (C); else B1 := 0; Get_Hex (In_Char); Get_Hex (In_Char); Get_Hex (In_Char); Get_Hex (In_Char); return UTF_32_Code (B1); end if; when WCEM_Upper => if C > ASCII.DEL then return 256 * Character'Pos (C) + Character'Pos (In_Char); else return Character'Pos (C); end if; when WCEM_Shift_JIS => if C > ASCII.DEL then return Wide_Character'Pos (Shift_JIS_To_JIS (C, In_Char)); else return Character'Pos (C); end if; when WCEM_EUC => if C > ASCII.DEL then return Wide_Character'Pos (EUC_To_JIS (C, In_Char)); else return Character'Pos (C); end if; when WCEM_UTF8 => -- Note: for details of UTF8 encoding see RFC 3629 U := Unsigned_32 (Character'Pos (C)); -- 16#00_0000#-16#00_007F#: 0xxxxxxx if (U and 2#10000000#) = 2#00000000# then return Character'Pos (C); -- 16#00_0080#-16#00_07FF#: 110xxxxx 10xxxxxx elsif (U and 2#11100000#) = 2#110_00000# then W := U and 2#00011111#; Get_UTF_Byte; return UTF_32_Code (W); -- 16#00_0800#-16#00_ffff#: 1110xxxx 10xxxxxx 10xxxxxx elsif (U and 2#11110000#) = 2#1110_0000# then W := U and 2#00001111#; Get_UTF_Byte; Get_UTF_Byte; return UTF_32_Code (W); -- 16#01_0000#-16#10_FFFF#: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx elsif (U and 2#11111000#) = 2#11110_000# then W := U and 2#00000111#; for K in 1 .. 3 loop Get_UTF_Byte; end loop; return UTF_32_Code (W); -- 16#0020_0000#-16#03FF_FFFF#: 111110xx 10xxxxxx 10xxxxxx -- 10xxxxxx 10xxxxxx elsif (U and 2#11111100#) = 2#111110_00# then W := U and 2#00000011#; for K in 1 .. 4 loop Get_UTF_Byte; end loop; return UTF_32_Code (W); -- 16#0400_0000#-16#7FFF_FFFF#: 1111110x 10xxxxxx 10xxxxxx -- 10xxxxxx 10xxxxxx 10xxxxxx elsif (U and 2#11111110#) = 2#1111110_0# then W := U and 2#00000001#; for K in 1 .. 5 loop Get_UTF_Byte; end loop; return UTF_32_Code (W); else raise Constraint_Error; end if; when WCEM_Brackets => if C /= '[' then return Character'Pos (C); end if; if In_Char /= '"' then raise Constraint_Error; end if; B1 := 0; Get_Hex (In_Char); Get_Hex (In_Char); C1 := In_Char; if C1 /= '"' then Get_Hex (C1); Get_Hex (In_Char); C1 := In_Char; if C1 /= '"' then Get_Hex (C1); Get_Hex (In_Char); C1 := In_Char; if C1 /= '"' then Get_Hex (C1); Get_Hex (In_Char); if B1 > Unsigned_32 (UTF_32_Code'Last) then raise Constraint_Error; end if; if In_Char /= '"' then raise Constraint_Error; end if; end if; end if; end if; if In_Char /= ']' then raise Constraint_Error; end if; return UTF_32_Code (B1); end case; end Char_Sequence_To_UTF_32; -------------------------------- -- Char_Sequence_To_Wide_Char -- -------------------------------- function Char_Sequence_To_Wide_Char (C : Character; EM : System.WCh_Con.WC_Encoding_Method) return Wide_Character is function Char_Sequence_To_UTF is new Char_Sequence_To_UTF_32 (In_Char); U : constant UTF_32_Code := Char_Sequence_To_UTF (C, EM); begin if U > 16#FFFF# then raise Constraint_Error; else return Wide_Character'Val (U); end if; end Char_Sequence_To_Wide_Char; ----------------------------- -- UTF_32_To_Char_Sequence -- ----------------------------- procedure UTF_32_To_Char_Sequence (Val : UTF_32_Code; EM : System.WCh_Con.WC_Encoding_Method) is Hexc : constant array (UTF_32_Code range 0 .. 15) of Character := "0123456789ABCDEF"; C1, C2 : Character; U : Unsigned_32; begin -- Raise CE for invalid UTF_32_Code if not Val'Valid then raise Constraint_Error; end if; -- Processing depends on encoding mode case EM is when WCEM_Hex => if Val < 256 then Out_Char (Character'Val (Val)); elsif Val <= 16#FFFF# then Out_Char (ASCII.ESC); Out_Char (Hexc (Val / (16**3))); Out_Char (Hexc ((Val / (16**2)) mod 16)); Out_Char (Hexc ((Val / 16) mod 16)); Out_Char (Hexc (Val mod 16)); else raise Constraint_Error; end if; when WCEM_Upper => if Val < 128 then Out_Char (Character'Val (Val)); elsif Val < 16#8000# or else Val > 16#FFFF# then raise Constraint_Error; else Out_Char (Character'Val (Val / 256)); Out_Char (Character'Val (Val mod 256)); end if; when WCEM_Shift_JIS => if Val < 128 then Out_Char (Character'Val (Val)); elsif Val <= 16#FFFF# then JIS_To_Shift_JIS (Wide_Character'Val (Val), C1, C2); Out_Char (C1); Out_Char (C2); else raise Constraint_Error; end if; when WCEM_EUC => if Val < 128 then Out_Char (Character'Val (Val)); elsif Val <= 16#FFFF# then JIS_To_EUC (Wide_Character'Val (Val), C1, C2); Out_Char (C1); Out_Char (C2); else raise Constraint_Error; end if; when WCEM_UTF8 => -- Note: for details of UTF8 encoding see RFC 3629 U := Unsigned_32 (Val); -- 16#00_0000#-16#00_007F#: 0xxxxxxx if U <= 16#00_007F# then Out_Char (Character'Val (U)); -- 16#00_0080#-16#00_07FF#: 110xxxxx 10xxxxxx elsif U <= 16#00_07FF# then Out_Char (Character'Val (2#11000000# or Shift_Right (U, 6))); Out_Char (Character'Val (2#10000000# or (U and 2#00111111#))); -- 16#00_0800#-16#00_FFFF#: 1110xxxx 10xxxxxx 10xxxxxx elsif U <= 16#00_FFFF# then Out_Char (Character'Val (2#11100000# or Shift_Right (U, 12))); Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 6) and 2#00111111#))); Out_Char (Character'Val (2#10000000# or (U and 2#00111111#))); -- 16#01_0000#-16#10_FFFF#: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx elsif U <= 16#10_FFFF# then Out_Char (Character'Val (2#11110000# or Shift_Right (U, 18))); Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 12) and 2#00111111#))); Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 6) and 2#00111111#))); Out_Char (Character'Val (2#10000000# or (U and 2#00111111#))); -- 16#0020_0000#-16#03FF_FFFF#: 111110xx 10xxxxxx 10xxxxxx -- 10xxxxxx 10xxxxxx elsif U <= 16#03FF_FFFF# then Out_Char (Character'Val (2#11111000# or Shift_Right (U, 24))); Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 18) and 2#00111111#))); Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 12) and 2#00111111#))); Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 6) and 2#00111111#))); Out_Char (Character'Val (2#10000000# or (U and 2#00111111#))); -- 16#0400_0000#-16#7FFF_FFFF#: 1111110x 10xxxxxx 10xxxxxx -- 10xxxxxx 10xxxxxx 10xxxxxx elsif U <= 16#7FFF_FFFF# then Out_Char (Character'Val (2#11111100# or Shift_Right (U, 30))); Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 24) and 2#00111111#))); Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 18) and 2#00111111#))); Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 12) and 2#00111111#))); Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 6) and 2#00111111#))); Out_Char (Character'Val (2#10000000# or (U and 2#00111111#))); else raise Constraint_Error; end if; when WCEM_Brackets => -- Values in the range 0-255 are directly output. Note that there -- is an issue with [ (16#5B#) since this will cause confusion -- if the resulting string is interpreted using brackets encoding. -- One possibility would be to always output [ as ["5B"] but in -- practice this is undesirable, since for example normal use of -- Wide_Text_IO for output (much more common than input), really -- does want to be able to say something like -- Put_Line ("Start of output [first run]"); -- and have it come out as intended, rather than contaminated by -- a ["5B"] sequence in place of the left bracket. if Val < 256 then Out_Char (Character'Val (Val)); -- Otherwise use brackets notation for vales greater than 255 else Out_Char ('['); Out_Char ('"'); if Val > 16#FFFF# then if Val > 16#00FF_FFFF# then Out_Char (Hexc (Val / 16 ** 7)); Out_Char (Hexc ((Val / 16 ** 6) mod 16)); end if; Out_Char (Hexc ((Val / 16 ** 5) mod 16)); Out_Char (Hexc ((Val / 16 ** 4) mod 16)); end if; Out_Char (Hexc ((Val / 16 ** 3) mod 16)); Out_Char (Hexc ((Val / 16 ** 2) mod 16)); Out_Char (Hexc ((Val / 16) mod 16)); Out_Char (Hexc (Val mod 16)); Out_Char ('"'); Out_Char (']'); end if; end case; end UTF_32_To_Char_Sequence; -------------------------------- -- Wide_Char_To_Char_Sequence -- -------------------------------- procedure Wide_Char_To_Char_Sequence (WC : Wide_Character; EM : System.WCh_Con.WC_Encoding_Method) is procedure UTF_To_Char_Sequence is new UTF_32_To_Char_Sequence (Out_Char); begin UTF_To_Char_Sequence (Wide_Character'Pos (WC), EM); end Wide_Char_To_Char_Sequence; end System.WCh_Cnv;
35.791845
79
0.452125
12a8cad51fbe5122034b8ff995ee5e7d820bb7f9
3,414
ads
Ada
tools-src/gnu/gcc/gcc/ada/gnatcmd.ads
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
80
2015-01-02T10:14:04.000Z
2021-06-07T06:29:49.000Z
tools-src/gnu/gcc/gcc/ada/gnatcmd.ads
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
9
2015-05-14T11:03:12.000Z
2018-01-04T07:12:58.000Z
tools-src/gnu/gcc/gcc/ada/gnatcmd.ads
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
69
2015-01-02T10:45:56.000Z
2021-09-06T07:52:13.000Z
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- G N A T C M D -- -- -- -- S p e c -- -- -- -- $Revision$ -- -- -- Copyright (C) 1996 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 2, 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. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This program provides a simple command interface for using GNAT and its -- associated utilities. The format of switches accepted is intended to -- be more familiar in style for VMS and DOS users than the standard Unix -- style switches that are accepted directly. -- The program is typically called GNAT when it is installed and -- the two possibile styles of use are: -- To call gcc: -- GNAT filename switches -- To call the tool gnatxxx -- GNAT xxx filename switches -- where xxx is the command name (e.g. MAKE for gnatmake). This command name -- can be abbreviated by giving a prefix (e.g. GNAT MAK) as long as it -- remains unique. -- In both cases, filename is in the format appropriate to the operating -- system in use. The individual commands give more details. In some cases -- a unit name may be given in place of a file name. -- The switches start with a slash. Switch names can also be abbreviated -- where no ambiguity arises. The switches associated with each command -- are specified by the tables that can be found in the body. -- Although by convention we use upper case for command names and switches -- in the documentation, all command and switch names are case insensitive -- and may be given in upper case or lower case or a mixture. procedure GNATCmd;
55.064516
78
0.495313
2f6d073fbb51773a9354a3029e2e4e336b36e237
934
ads
Ada
src/gpr_tools-gprslaves-db-json.ads
persan/gprTools
0a67ea3179a1a5802ca45014ed00c044a945e5a1
[ "BSD-3-Clause" ]
2
2015-05-15T16:03:26.000Z
2018-12-26T19:32:41.000Z
src/gpr_tools-gprslaves-db-json.ads
persan/gprTools
0a67ea3179a1a5802ca45014ed00c044a945e5a1
[ "BSD-3-Clause" ]
null
null
null
src/gpr_tools-gprslaves-db-json.ads
persan/gprTools
0a67ea3179a1a5802ca45014ed00c044a945e5a1
[ "BSD-3-Clause" ]
null
null
null
with GNATCOLL.JSON; package GPR_Tools.Gprslaves.DB.JSON is function Create (Item : Info_Struct) return GNATCOLL.JSON.JSON_Value; function Create (Item : Host_Address) return GNATCOLL.JSON.JSON_Value; function Create (Item : GNAT.Spitbol.Table_VString.Table) return GNATCOLL.JSON.JSON_Value; function Create (Item : Host_Info_Vectors.Vector) return GNATCOLL.JSON.JSON_Value; function Create (Item : GNAT.Spitbol.Table_VString.Table_Entry) return GNATCOLL.JSON.JSON_Value; function Get (Item : GNATCOLL.JSON.JSON_Value) return Info_Struct; function Get (Item : GNATCOLL.JSON.JSON_Value) return Host_Address; function Get (Item : GNATCOLL.JSON.JSON_Value) return GNAT.Spitbol.Table_VString.Table; function Get (Item : GNATCOLL.JSON.JSON_Value) return Host_Info_Vectors.Vector; function Get (Item : GNATCOLL.JSON.JSON_Value) return GNAT.Spitbol.Table_VString.Table_Entry; end GPR_Tools.Gprslaves.DB.JSON;
54.941176
99
0.793362
3d5f589e206d35eaeae3ab90b70c0b49aea452aa
575
ads
Ada
generated-sources/ada-server/mojang-authentication/src/com.ads
AsyncMC/Mojang-API-Libs
b01bbd2bce44bfa2b9ed705a128cf4ecda077916
[ "Apache-2.0" ]
null
null
null
generated-sources/ada-server/mojang-authentication/src/com.ads
AsyncMC/Mojang-API-Libs
b01bbd2bce44bfa2b9ed705a128cf4ecda077916
[ "Apache-2.0" ]
null
null
null
generated-sources/ada-server/mojang-authentication/src/com.ads
AsyncMC/Mojang-API-Libs
b01bbd2bce44bfa2b9ed705a128cf4ecda077916
[ "Apache-2.0" ]
null
null
null
-- Mojang Authentication API -- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) -- ------------ EDIT NOTE ------------ -- This file was generated with openapi-generator. You can modify it to implement -- the server. After you modify this file, you should add the following line -- to the .openapi-generator-ignore file: -- -- src/com-github-asyncmc-mojang-authentication-ada-server-model.ads -- -- Then, you can drop this edit note comment. -- ------------ EDIT NOTE ------------ package com is end com;
38.333333
110
0.68
4181c7fd4244bc69891f7aed52d18972c2309fa1
6,246
adb
Ada
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-pack23.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-pack23.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-pack23.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . P A C K _ 2 3 -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2019, 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 System.Storage_Elements; with System.Unsigned_Types; package body System.Pack_23 is subtype Bit_Order is System.Bit_Order; Reverse_Bit_Order : constant Bit_Order := Bit_Order'Val (1 - Bit_Order'Pos (System.Default_Bit_Order)); subtype Ofs is System.Storage_Elements.Storage_Offset; subtype Uns is System.Unsigned_Types.Unsigned; subtype N07 is System.Unsigned_Types.Unsigned range 0 .. 7; use type System.Storage_Elements.Storage_Offset; use type System.Unsigned_Types.Unsigned; type Cluster is record E0, E1, E2, E3, E4, E5, E6, E7 : Bits_23; end record; for Cluster use record E0 at 0 range 0 * Bits .. 0 * Bits + Bits - 1; E1 at 0 range 1 * Bits .. 1 * Bits + Bits - 1; E2 at 0 range 2 * Bits .. 2 * Bits + Bits - 1; E3 at 0 range 3 * Bits .. 3 * Bits + Bits - 1; E4 at 0 range 4 * Bits .. 4 * Bits + Bits - 1; E5 at 0 range 5 * Bits .. 5 * Bits + Bits - 1; E6 at 0 range 6 * Bits .. 6 * Bits + Bits - 1; E7 at 0 range 7 * Bits .. 7 * Bits + Bits - 1; end record; for Cluster'Size use Bits * 8; for Cluster'Alignment use Integer'Min (Standard'Maximum_Alignment, 1 + 1 * Boolean'Pos (Bits mod 2 = 0) + 2 * Boolean'Pos (Bits mod 4 = 0)); -- Use maximum possible alignment, given the bit field size, since this -- will result in the most efficient code possible for the field. type Cluster_Ref is access Cluster; type Rev_Cluster is new Cluster with Bit_Order => Reverse_Bit_Order, Scalar_Storage_Order => Reverse_Bit_Order; type Rev_Cluster_Ref is access Rev_Cluster; ------------ -- Get_23 -- ------------ function Get_23 (Arr : System.Address; N : Natural; Rev_SSO : Boolean) return Bits_23 is A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8); C : Cluster_Ref with Address => A'Address, Import; RC : Rev_Cluster_Ref with Address => A'Address, Import; begin if Rev_SSO then case N07 (Uns (N) mod 8) is when 0 => return RC.E0; when 1 => return RC.E1; when 2 => return RC.E2; when 3 => return RC.E3; when 4 => return RC.E4; when 5 => return RC.E5; when 6 => return RC.E6; when 7 => return RC.E7; end case; else case N07 (Uns (N) mod 8) is when 0 => return C.E0; when 1 => return C.E1; when 2 => return C.E2; when 3 => return C.E3; when 4 => return C.E4; when 5 => return C.E5; when 6 => return C.E6; when 7 => return C.E7; end case; end if; end Get_23; ------------ -- Set_23 -- ------------ procedure Set_23 (Arr : System.Address; N : Natural; E : Bits_23; Rev_SSO : Boolean) is A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8); C : Cluster_Ref with Address => A'Address, Import; RC : Rev_Cluster_Ref with Address => A'Address, Import; begin if Rev_SSO then case N07 (Uns (N) mod 8) is when 0 => RC.E0 := E; when 1 => RC.E1 := E; when 2 => RC.E2 := E; when 3 => RC.E3 := E; when 4 => RC.E4 := E; when 5 => RC.E5 := E; when 6 => RC.E6 := E; when 7 => RC.E7 := E; end case; else case N07 (Uns (N) mod 8) is when 0 => C.E0 := E; when 1 => C.E1 := E; when 2 => C.E2 := E; when 3 => C.E3 := E; when 4 => C.E4 := E; when 5 => C.E5 := E; when 6 => C.E6 := E; when 7 => C.E7 := E; end case; end if; end Set_23; end System.Pack_23;
39.531646
78
0.460775
411e484c2b78fbe4a2787e572519ce0db5fcc4a0
4,528
adb
Ada
openbsd.adb
gpicchiarelli/openbsd-ada
8decf2e7771ea9e83f6de0f4e4dd4a287694287d
[ "CC0-1.0" ]
3
2021-06-03T21:19:09.000Z
2021-06-07T01:02:09.000Z
openbsd.adb
gpicchiarelli/openbsd-ada
8decf2e7771ea9e83f6de0f4e4dd4a287694287d
[ "CC0-1.0" ]
null
null
null
openbsd.adb
gpicchiarelli/openbsd-ada
8decf2e7771ea9e83f6de0f4e4dd4a287694287d
[ "CC0-1.0" ]
null
null
null
-- OpenBSD - Provide high-level Ada interfaces to OpenBSD's pledge and unveil. -- Written in 2019 by Prince Trippy [email protected] . -- To the extent possible under law, the author(s) have dedicated all copyright and related and -- neighboring rights to this software to the public domain worldwide. -- This software is distributed without any warranty. -- You should have received a copy of the CC0 Public Domain Dedication along with this software. -- If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. pragma Profile(No_Implementation_Extensions); pragma Assertion_Policy(Check); with Interfaces.C.Strings, Ada.Strings.Maps.Constants, Ada.Strings.Bounded; use Interfaces.C.Strings, Interfaces.C; package body OpenBSD is -- The pledge is documented as having three failure cases. -- EFAULT, an invalid pointer, simply won't happen. -- EINVAL, a malformed string, is similarly not a concern. -- EPERM, a permissions error, is then the only failure case left. -- So, having a single exception for this procedure is fine. function C_Pledge (Promises, Exec_Promises : Chars_Ptr) return Int with Import => True, Convention => C, External_Name => "pledge"; procedure Pledge (Promises : in Promise_Array) is -- I'd prefer to have a bounded string only as large as necessary. -- It should automatically be consistent with the Promise type. -- How would I nicely calculate that at compilation, though? package B is new Ada.Strings.Bounded.Generic_Bounded_Length(178); use B; -- Perhaps I should use type here, instead. S : Bounded_String; begin for P in Promise loop if Promises(P) = Allowed then -- Perhaps I should have this avoid the unnecessary last space. S := S & Promise'Image(P) & ' '; end if; end loop; -- It seems the promises are case-sensitive. Translate(S, Ada.Strings.Maps.Constants.Lower_Case_Map); declare -- I need to fix this to avoid Unchecked_Access, later. C : aliased Char_Array := To_C(To_String(S)); P : Chars_Ptr := To_Chars_Ptr(Char_Array_Access'(C'Unchecked_Access)); begin if C_Pledge(P, Null_Ptr) /= 0 then raise Pledge_Error; end if; end; end Pledge; -- A precondition that the limit for bounded strings is larger than the -- largest possible promise string seems the best option available. -- A precondition such as this could likely be determined at compilation. -- I need to specify this precondition privately, though; how? -- The unveil is documented as having four failure cases. -- E2BIG, a storage exhaustion error, will be conflated with the others. -- ENOENT, an invalid directory name, is also reasonable to conflate. -- EINVAL, a malformed string, is not a concern. -- EPERM, a permissions error, is similarly conflated with the others. -- Having a single exception for this procedure isn't as fine as with pledge. -- However, it's acceptable, given each case could be determined anyway. function C_Unveil (Path, Permissions : Chars_Ptr) return Int with Import => True, Convention => C, External_Name => "unveil"; procedure Unveil (Path : in String; Permissions : in Permission_Array) is -- I'd similarly prefer to have a string that is consistent here. -- Given the small size and whatnot, this is less of an issue, however. package B is new Ada.Strings.Bounded.Generic_Bounded_Length(4); use B; -- Perhaps I should use type here, instead. S : Bounded_String; C : constant array (Permission) of Character := (Read => 'r', Write => 'w', Execute => 'x', Create => 'c'); begin for P in Permission loop if Permissions(P) = Allowed then S := S & C(P); end if; end loop; declare -- I need to fix this to avoid Unchecked_Access, later. C : aliased Char_Array := To_C(To_String(S)); D : aliased Char_Array := To_C(Path); P : Chars_Ptr := To_Chars_Ptr(Char_Array_Access'(C'Unchecked_Access)); Q : Chars_Ptr := To_Chars_Ptr(Char_Array_Access'(D'Unchecked_Access)); begin if C_Unveil(Q, P) /= 0 then raise Unveil_Error; end if; end; end Unveil; -- I could add a precondition here, but unveil isn't subject to the same issues. -- The permission array of character won't compile if the enumeration is changed. end OpenBSD;
47.166667
96
0.683083
298f79616327b3f6688fc2e87b5e2f3fb9528ccb
2,879
adb
Ada
runtime/ravenscar-sfp-stm32f427/math/s-lisisq.adb
TUM-EI-RCS/StratoX
5fdd04e01a25efef6052376f43ce85b5bc973392
[ "BSD-3-Clause" ]
12
2017-06-08T14:19:57.000Z
2022-03-09T02:48:59.000Z
runtime/ravenscar-sfp-stm32f427/math/s-lisisq.adb
TUM-EI-RCS/StratoX
5fdd04e01a25efef6052376f43ce85b5bc973392
[ "BSD-3-Clause" ]
6
2017-06-08T13:13:50.000Z
2020-05-15T09:32:43.000Z
runtime/ravenscar-sfp-stm32f427/math/s-lisisq.adb
TUM-EI-RCS/StratoX
5fdd04e01a25efef6052376f43ce85b5bc973392
[ "BSD-3-Clause" ]
3
2017-06-30T14:05:06.000Z
2022-02-17T12:20:45.000Z
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . L I B M _ S I N G L E . S Q R T -- -- -- -- B o d y -- -- -- -- Copyright (C) 2014, 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. -- -- -- ------------------------------------------------------------------------------ -- This is the Ada Cert Math specific implementation of sqrt when the FPU -- has the sqrt instruction. package body System.Libm_Single.Squareroot is -------------- -- Fpu_Sqrt -- -------------- function Fpu_Sqrt (X : Float) return Float with Import, Convention => Intrinsic, External_Name => "__builtin_sqrtf"; ---------- -- Sqrt -- ---------- function Sqrt (X : Float) return Float is begin return Fpu_Sqrt (X); end Sqrt; end System.Libm_Single.Squareroot;
53.314815
79
0.351511
59e445eba16eb106bffb8fde9fc881396dc99a94
5,805
ads
Ada
bb-runtimes/src/s-bbpara__nrf52.ads
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/src/s-bbpara__nrf52.ads
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
bb-runtimes/src/s-bbpara__nrf52.ads
JCGobbi/Nucleo-STM32F334R8
2a0b1b4b2664c92773703ac5e95dcb71979d051c
[ "BSD-3-Clause" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . B B . P A R A M E T E R S -- -- -- -- S p e c -- -- -- -- Copyright (C) 1999-2002 Universidad Politecnica de Madrid -- -- Copyright (C) 2003-2005 The European Space Agency -- -- Copyright (C) 2003-2019, AdaCore -- -- -- -- 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. -- -- -- -- The port of GNARL to bare board targets was initially developed by the -- -- Real-Time Systems Group at the Technical University of Madrid. -- -- -- ------------------------------------------------------------------------------ -- This package defines basic parameters used by the low level tasking system -- This is the nRF52840 (ARMv7) version of this package with System.BB.Board_Parameters; with System.BB.MCU_Parameters; package System.BB.Parameters is pragma No_Elaboration_Code_All; pragma Preelaborate (System.BB.Parameters); Clock_Frequency : constant := Board_Parameters.Main_Clock_Frequency; Ticks_Per_Second : constant := Clock_Frequency; ---------------- -- Interrupts -- ---------------- -- These definitions are in this package in order to isolate target -- dependencies. subtype Interrupt_Range is Integer range -1 .. MCU_Parameters.Number_Of_Interrupts; -- Number of interrupts for the interrupt controller Trap_Vectors : constant := 17; -- While on this target there is little difference between interrupts -- and traps, we consider the following traps: -- -- Name Nr -- -- Reset_Vector 1 -- NMI_Vector 2 -- Hard_Fault_Vector 3 -- Mem_Manage_Vector 4 -- Bus_Fault_Vector 5 -- Usage_Fault_Vector 6 -- SVC_Vector 11 -- Debug_Mon_Vector 12 -- Pend_SV_Vector 14 -- Sys_Tick_Vector 15 -- Interrupt_Request_Vector 16 -- -- These trap vectors correspond to different low-level trap handlers in -- the run time. Note that as all interrupt requests (IRQs) will use the -- same interrupt wrapper, there is no benefit to consider using separate -- vectors for each. Context_Buffer_Capacity : constant := 10; -- The context buffer contains registers r4 .. r11 and the SP_process -- (PSP). The size is rounded up to an even number for alignment ------------ -- Stacks -- ------------ Interrupt_Stack_Size : constant := 2 * 1024; -- Size of each of the interrupt stacks in bytes. While there nominally is -- an interrupt stack per interrupt priority, the entire space is used as a -- single stack. Interrupt_Sec_Stack_Size : constant := 128; -- Size of the secondary stack for interrupt handlers Has_FPU : constant Boolean := True; -- Set to true if core has a FPU Has_VTOR : constant Boolean := True; -- Set to true if core has a Vector Table Offset Register (VTOR). -- VTOR is implemented in Cortex-M0+, Cortex-M4 and above. Has_OS_Extensions : constant Boolean := True; -- Set to true if core has armv6-m OS extensions (PendSV, MSP, PSP, -- etc...). The OS extensions are optional for the Cortex-M1. Is_ARMv6m : constant Boolean := False; -- Set to true if core is an armv6-m (Cortex-M0, Cortex-M0+, Cortex-M1) ---------- -- CPUS -- ---------- Max_Number_Of_CPUs : constant := 1; -- Maximum number of CPUs Multiprocessor : constant Boolean := Max_Number_Of_CPUs /= 1; -- Are we on a multiprocessor board? end System.BB.Parameters;
46.071429
79
0.514556
592b6ea117b0a0ac6216840c88b0d2cbc08ca4c2
35,221
adb
Ada
boards/ip_colordetect_test/colordetect/colordetect/.autopilot/db/colorthresholding_9_0_3_2160_3840_1_Block_colorthresholding_9_0_3_2160_3840_1_exit_proc.adb
Kgfu/PYNQ_HelloWorld
a5197130e7d4a5e7f382c3963349c1c0bd213213
[ "BSD-3-Clause" ]
null
null
null
boards/ip_colordetect_test/colordetect/colordetect/.autopilot/db/colorthresholding_9_0_3_2160_3840_1_Block_colorthresholding_9_0_3_2160_3840_1_exit_proc.adb
Kgfu/PYNQ_HelloWorld
a5197130e7d4a5e7f382c3963349c1c0bd213213
[ "BSD-3-Clause" ]
null
null
null
boards/ip_colordetect_test/colordetect/colordetect/.autopilot/db/colorthresholding_9_0_3_2160_3840_1_Block_colorthresholding_9_0_3_2160_3840_1_exit_proc.adb
Kgfu/PYNQ_HelloWorld
a5197130e7d4a5e7f382c3963349c1c0bd213213
[ "BSD-3-Clause" ]
null
null
null
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="15"> <syndb class_id="0" tracking_level="0" version="0"> <userIPLatency>-1</userIPLatency> <userIPName/> <cdfg class_id="1" tracking_level="1" version="0" object_id="_0"> <name>colorthresholding_9_0_3_2160_3840_1_Block_colorthresholding_9_0_3_2160_3840_1_exit_proc</name> <ret_bitwidth>32</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="3" tracking_level="1" version="0" object_id="_1"> <Value class_id="4" tracking_level="0" version="0"> <Obj class_id="5" tracking_level="0" version="0"> <type>1</type> <id>1</id> <name>p_src_mat_rows</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <contextNormFuncName/> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <control/> <opType/> <implIndex/> <coreName>FIFO_SRL</coreName> <coreId>1768189039</coreId> </Obj> <bitwidth>16</bitwidth> </Value> <direction>0</direction> <if_type>3</if_type> <array_size>0</array_size> <bit_vecs class_id="7" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_2"> <Value> <Obj> <type>1</type> <id>2</id> <name>p_src_mat_cols</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <contextNormFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <control/> <opType/> <implIndex/> <coreName>FIFO_SRL</coreName> <coreId>49</coreId> </Obj> <bitwidth>16</bitwidth> </Value> <direction>0</direction> <if_type>3</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>5</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_3"> <Value> <Obj> <type>0</type> <id>5</id> <name>img_height</name> <fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>152</lineNumber> <contextFuncName>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</contextFuncName> <contextNormFuncName>colorthresholding_9_0_3_2160_3840_1_s</contextNormFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="10" tracking_level="0" version="0"> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first> <second class_id="11" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="12" tracking_level="0" version="0"> <first class_id="13" tracking_level="0" version="0"> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</first> <second>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</second> </first> <second>152</second> </item> </second> </item> </inlineStackInfo> <originalName>img_height</originalName> <rtlName/> <control>auto</control> <opType>fifo</opType> <implIndex>srl</implIndex> <coreName>FIFO_SRL</coreName> <coreId>81</coreId> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>12</item> <item>13</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>3.40</m_delay> <m_topoIndex>1</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_4"> <Value> <Obj> <type>0</type> <id>6</id> <name>img_width</name> <fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>153</lineNumber> <contextFuncName>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</contextFuncName> <contextNormFuncName>colorthresholding_9_0_3_2160_3840_1_s</contextNormFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</first> <second>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</second> </first> <second>153</second> </item> </second> </item> </inlineStackInfo> <originalName>img_width</originalName> <rtlName/> <control>auto</control> <opType>fifo</opType> <implIndex>srl</implIndex> <coreName>FIFO_SRL</coreName> <coreId>81</coreId> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>14</item> <item>15</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>3.40</m_delay> <m_topoIndex>2</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_5"> <Value> <Obj> <type>0</type> <id>7</id> <name>mrv</name> <fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>152</lineNumber> <contextFuncName>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</contextFuncName> <contextNormFuncName>colorthresholding_9_0_3_2160_3840_1_s</contextNormFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</first> <second>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</second> </first> <second>152</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <control/> <opType/> <implIndex/> <coreName/> <coreId>113</coreId> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>17</item> <item>18</item> </oprand_edges> <opcode>insertvalue</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>3</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_6"> <Value> <Obj> <type>0</type> <id>8</id> <name>mrv_1</name> <fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>152</lineNumber> <contextFuncName>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</contextFuncName> <contextNormFuncName>colorthresholding_9_0_3_2160_3840_1_s</contextNormFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</first> <second>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</second> </first> <second>152</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <control/> <opType/> <implIndex/> <coreName/> <coreId>892876845</coreId> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>19</item> <item>20</item> </oprand_edges> <opcode>insertvalue</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>4</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_7"> <Value> <Obj> <type>0</type> <id>9</id> <name>_ln152</name> <fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>152</lineNumber> <contextFuncName>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</contextFuncName> <contextNormFuncName>colorthresholding_9_0_3_2160_3840_1_s</contextNormFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_colorthresholding.hpp</first> <second>colorthresholding&amp;lt;9, 0, 3, 2160, 3840, 1&amp;gt;</second> </first> <second>152</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <control/> <opType/> <implIndex/> <coreName/> <coreId>113</coreId> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>21</item> </oprand_edges> <opcode>ret</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>5</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_8"> <Value> <Obj> <type>2</type> <id>16</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <contextNormFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <control/> <opType/> <implIndex/> <coreName/> <coreId>49</coreId> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>5</const_type> <content>&lt;undef&gt;</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_9"> <Obj> <type>3</type> <id>10</id> <name>colorthresholding&lt;9, 0, 3, 2160, 3840, 1&gt;_Block_colorthresholding&lt;9, 0, 3, 2160, 3840, 1&gt;_.exit_proc</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <contextNormFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <control/> <opType/> <implIndex/> <coreName/> <coreId>1768189039</coreId> </Obj> <node_objs> <count>5</count> <item_version>0</item_version> <item>5</item> <item>6</item> <item>7</item> <item>8</item> <item>9</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_10"> <id>13</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>5</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_11"> <id>15</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>6</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_12"> <id>17</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>7</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_13"> <id>18</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>7</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_14"> <id>19</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>8</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_15"> <id>20</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>8</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_16"> <id>21</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>9</sink_obj> <is_back_edge>0</is_back_edge> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_17"> <mId>1</mId> <mTag>colorthresholding&lt;9, 0, 3, 2160, 3840, 1&gt;_Block_colorthresholding&lt;9, 0, 3, 2160, 3840, 1&gt;_.exit_proc</mTag> <mNormTag>colorthresholding_9_0_3_2160_3840_1_Block_colorthresholding_9_0_3_2160_3840_1_exit_proc</mNormTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>10</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"/> </item> </cdfg_regions> <fsm class_id="24" tracking_level="1" version="0" object_id="_18"> <states class_id="25" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="26" tracking_level="1" version="0" object_id="_19"> <id>1</id> <operations class_id="27" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="28" tracking_level="1" version="0" object_id="_20"> <id>3</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_21"> <id>4</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_22"> <id>5</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_23"> <id>6</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_24"> <id>7</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_25"> <id>8</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_26"> <id>9</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> </states> <transitions class_id="29" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </transitions> </fsm> <res class_id="30" tracking_level="1" version="0" object_id="_27"> <dp_component_resource class_id="31" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_component_resource> <dp_expression_resource> <count>1</count> <item_version>0</item_version> <item class_id="32" tracking_level="0" version="0"> <first>ap_block_state1 ( or ) </first> <second class_id="33" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="34" tracking_level="0" version="0"> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>1</second> </item> </second> </item> </dp_expression_resource> <dp_fifo_resource> <count>0</count> <item_version>0</item_version> </dp_fifo_resource> <dp_memory_resource> <count>0</count> <item_version>0</item_version> </dp_memory_resource> <dp_multiplexer_resource> <count>5</count> <item_version>0</item_version> <item> <first>ap_done</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>2</second> </item> <item> <first>LUT</first> <second>9</second> </item> </second> </item> <item> <first>ap_return_0</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>16</second> </item> <item> <first>(2Count)</first> <second>32</second> </item> <item> <first>LUT</first> <second>9</second> </item> </second> </item> <item> <first>ap_return_1</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>16</second> </item> <item> <first>(2Count)</first> <second>32</second> </item> <item> <first>LUT</first> <second>9</second> </item> </second> </item> <item> <first>p_src_mat_cols_blk_n</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>2</second> </item> <item> <first>LUT</first> <second>9</second> </item> </second> </item> <item> <first>p_src_mat_rows_blk_n</first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0Size)</first> <second>2</second> </item> <item> <first>(1Bits)</first> <second>1</second> </item> <item> <first>(2Count)</first> <second>2</second> </item> <item> <first>LUT</first> <second>9</second> </item> </second> </item> </dp_multiplexer_resource> <dp_register_resource> <count>4</count> <item_version>0</item_version> <item> <first>ap_CS_fsm</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>ap_done_reg</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>1</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>1</second> </item> </second> </item> <item> <first>ap_return_0_preg</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>16</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>16</second> </item> </second> </item> <item> <first>ap_return_1_preg</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>(Bits)</first> <second>16</second> </item> <item> <first>(Consts)</first> <second>0</second> </item> <item> <first>FF</first> <second>16</second> </item> </second> </item> </dp_register_resource> <dp_dsp_resource> <count>0</count> <item_version>0</item_version> </dp_dsp_resource> <dp_component_map class_id="35" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_component_map> <dp_expression_map> <count>0</count> <item_version>0</item_version> </dp_expression_map> <dp_fifo_map> <count>0</count> <item_version>0</item_version> </dp_fifo_map> <dp_memory_map> <count>0</count> <item_version>0</item_version> </dp_memory_map> </res> <node_label_latency class_id="36" tracking_level="0" version="0"> <count>5</count> <item_version>0</item_version> <item class_id="37" tracking_level="0" version="0"> <first>5</first> <second class_id="38" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>6</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>7</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>8</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>9</first> <second> <first>0</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="39" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="40" tracking_level="0" version="0"> <first>10</first> <second class_id="41" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> </bblk_ent_exit> <regions class_id="42" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </regions> <dp_fu_nodes class_id="43" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="44" tracking_level="0" version="0"> <first>22</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> <item> <first>28</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> <item> <first>34</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>40</first> <second> <count>1</count> <item_version>0</item_version> <item>8</item> </second> </item> </dp_fu_nodes> <dp_fu_nodes_expression class_id="46" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="47" tracking_level="0" version="0"> <first>mrv_1_fu_40</first> <second> <count>1</count> <item_version>0</item_version> <item>8</item> </second> </item> <item> <first>mrv_fu_34</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>2</count> <item_version>0</item_version> <item> <first>img_height_read_fu_22</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> <item> <first>img_width_read_fu_28</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> </dp_fu_nodes_io> <return_ports> <count>2</count> <item_version>0</item_version> <item> <first>ap_return_0</first> <second> <count>1</count> <item_version>0</item_version> <item>9</item> </second> </item> <item> <first>ap_return_1</first> <second> <count>1</count> <item_version>0</item_version> <item>9</item> </second> </item> </return_ports> <dp_mem_port_nodes class_id="48" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_mem_port_nodes> <dp_reg_nodes> <count>0</count> <item_version>0</item_version> </dp_reg_nodes> <dp_regname_nodes> <count>0</count> <item_version>0</item_version> </dp_regname_nodes> <dp_reg_phi> <count>0</count> <item_version>0</item_version> </dp_reg_phi> <dp_regname_phi> <count>0</count> <item_version>0</item_version> </dp_regname_phi> <dp_port_io_nodes class_id="49" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="50" tracking_level="0" version="0"> <first>p_src_mat_cols</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> </second> </item> <item> <first>p_src_mat_rows</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>5</item> </second> </item> </second> </item> </dp_port_io_nodes> <port2core> <count>2</count> <item_version>0</item_version> <item> <first>1</first> <second> <first>1150</first> <second>10</second> </second> </item> <item> <first>2</first> <second> <first>1150</first> <second>10</second> </second> </item> </port2core> <node2core> <count>2</count> <item_version>0</item_version> <item> <first>5</first> <second> <first>1150</first> <second>10</second> </second> </item> <item> <first>6</first> <second> <first>1150</first> <second>10</second> </second> </item> </node2core> </syndb> </boost_serialization>
33.227358
151
0.490474
4182d818eeceede3a3a6a9b8d3632949431cc307
916
adb
Ada
src/arch/socs/stm32f429/Ada/default_handlers.adb
wookey-project/ewok-legacy
c973752dac3a0ebe3f7cfca062f50744578f051b
[ "Apache-2.0" ]
null
null
null
src/arch/socs/stm32f429/Ada/default_handlers.adb
wookey-project/ewok-legacy
c973752dac3a0ebe3f7cfca062f50744578f051b
[ "Apache-2.0" ]
null
null
null
src/arch/socs/stm32f429/Ada/default_handlers.adb
wookey-project/ewok-legacy
c973752dac3a0ebe3f7cfca062f50744578f051b
[ "Apache-2.0" ]
null
null
null
-- -- Copyright 2018 The wookey project team <[email protected]> -- - Ryad Benadjila -- - Arnauld Michelizza -- - Mathieu Renard -- - Philippe Thierry -- - Philippe Trebuchet -- -- 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 body default_handlers with spark_mode => off is procedure dummy is begin null; end dummy; end default_handlers;
28.625
79
0.695415
2949230e90a02726730c02d3c385ac68e64b1a27
80,040
adb
Ada
apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b/conv2d_b2b/hls_target/.autopilot/db/hls_target.adb
dillonhuff/Halide-HLS
e9f4c3ac7915e5a52f211ce65004ae17890515a0
[ "MIT" ]
1
2020-06-18T16:51:39.000Z
2020-06-18T16:51:39.000Z
apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b/conv2d_b2b/hls_target/.autopilot/db/hls_target.adb
dillonhuff/Halide-HLS
e9f4c3ac7915e5a52f211ce65004ae17890515a0
[ "MIT" ]
null
null
null
apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b/conv2d_b2b/hls_target/.autopilot/db/hls_target.adb
dillonhuff/Halide-HLS
e9f4c3ac7915e5a52f211ce65004ae17890515a0
[ "MIT" ]
1
2020-03-18T00:43:22.000Z
2020-03-18T00:43:22.000Z
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="14"> <syndb class_id="0" tracking_level="0" version="0"> <userIPLatency>-1</userIPLatency> <userIPName/> <cdfg class_id="1" tracking_level="1" version="0" object_id="_0"> <name>hls_target</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="3" tracking_level="1" version="0" object_id="_1"> <Value class_id="4" tracking_level="0" version="0"> <Obj class_id="5" tracking_level="0" version="0"> <type>1</type> <id>1</id> <name>hw_input_V_value_V</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>hw_input.V.value.V</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs class_id="7" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_2"> <Value> <Obj> <type>1</type> <id>2</id> <name>hw_input_V_last_V</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>hw_input.V.last.V</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_3"> <Value> <Obj> <type>1</type> <id>3</id> <name>hw_output_V_value_V</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>hw_output.V.value.V</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>32</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_4"> <Value> <Obj> <type>1</type> <id>4</id> <name>hw_output_V_last_V</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>hw_output.V.last.V</originalName> <rtlName/> <coreName/> </Obj> <bitwidth>1</bitwidth> </Value> <direction>1</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>10</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_5"> <Value> <Obj> <type>0</type> <id>11</id> <name>p_hw_input_stencil_st</name> <fileName>hls_target.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>50</lineNumber> <contextFuncName>hls_target</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="10" tracking_level="0" version="0"> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first> <second class_id="11" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="12" tracking_level="0" version="0"> <first class_id="13" tracking_level="0" version="0"> <first>hls_target.cpp</first> <second>hls_target</second> </first> <second>50</second> </item> </second> </item> </inlineStackInfo> <originalName>_hw_input_stencil_stream.V.value.V</originalName> <rtlName>p_hw_input_stencil_st_U</rtlName> <coreName>FIFO_SRL</coreName> </Obj> <bitwidth>288</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>37</item> </oprand_edges> <opcode>alloca</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_6"> <Value> <Obj> <type>0</type> <id>15</id> <name>p_mul_stencil_update_1</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName>p_mul_stencil_update_1_U</rtlName> <coreName>FIFO_SRL</coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>38</item> </oprand_edges> <opcode>alloca</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_7"> <Value> <Obj> <type>0</type> <id>19</id> <name>p_mul_stencil_stream_s</name> <fileName>hls_target.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>146</lineNumber> <contextFuncName>hls_target</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_target.cpp</first> <second>hls_target</second> </first> <second>146</second> </item> </second> </item> </inlineStackInfo> <originalName>_mul_stencil_stream.V.value.V</originalName> <rtlName>p_mul_stencil_stream_s_U</rtlName> <coreName>FIFO_SRL</coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>39</item> </oprand_edges> <opcode>alloca</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_8"> <Value> <Obj> <type>0</type> <id>23</id> <name>p_p2_mul1_stencil_str</name> <fileName>hls_target.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>155</lineNumber> <contextFuncName>hls_target</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_target.cpp</first> <second>hls_target</second> </first> <second>155</second> </item> </second> </item> </inlineStackInfo> <originalName>_p2_mul1_stencil_stream.V.value.V</originalName> <rtlName>p_p2_mul1_stencil_str_U</rtlName> <coreName>FIFO_SRL</coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>40</item> </oprand_edges> <opcode>alloca</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_9"> <Value> <Obj> <type>0</type> <id>29</id> <name/> <fileName>hls_target.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>54</lineNumber> <contextFuncName>hls_target</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_target.cpp</first> <second>hls_target</second> </first> <second>54</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>linebuffer_1_U0</rtlName> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>42</item> <item>43</item> <item>44</item> <item>45</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_10"> <Value> <Obj> <type>0</type> <id>30</id> <name/> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName>Loop_1_proc_U0</rtlName> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>5</count> <item_version>0</item_version> <item>47</item> <item>48</item> <item>49</item> <item>283</item> <item>284</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_11"> <Value> <Obj> <type>0</type> <id>31</id> <name/> <fileName>hls_target.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>150</lineNumber> <contextFuncName>hls_target</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_target.cpp</first> <second>hls_target</second> </first> <second>150</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName>linebuffer_2_U0</rtlName> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>5</count> <item_version>0</item_version> <item>51</item> <item>52</item> <item>53</item> <item>282</item> <item>285</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>32</id> <name/> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName>Loop_2_proc_U0</rtlName> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>5</count> <item_version>0</item_version> <item>55</item> <item>56</item> <item>57</item> <item>281</item> <item>286</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_13"> <Value> <Obj> <type>0</type> <id>33</id> <name/> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName>Loop_3_proc_U0</rtlName> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>6</count> <item_version>0</item_version> <item>59</item> <item>60</item> <item>61</item> <item>62</item> <item>280</item> <item>287</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_14"> <Value> <Obj> <type>0</type> <id>34</id> <name/> <fileName>hls_target.cpp</fileName> <fileDirectory>..</fileDirectory> <lineNumber>238</lineNumber> <contextFuncName>hls_target</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d_b2b</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_target.cpp</first> <second>hls_target</second> </first> <second>238</second> </item> </second> </item> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>0</count> <item_version>0</item_version> </oprand_edges> <opcode>ret</opcode> <m_Display>0</m_Display> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>6</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_15"> <Value> <Obj> <type>2</type> <id>36</id> <name>empty</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_16"> <Value> <Obj> <type>2</type> <id>41</id> <name>linebuffer_1</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:linebuffer.1&gt;</content> </item> <item class_id_reference="16" object_id="_17"> <Value> <Obj> <type>2</type> <id>46</id> <name>Loop_1_proc</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:Loop_1_proc&gt;</content> </item> <item class_id_reference="16" object_id="_18"> <Value> <Obj> <type>2</type> <id>50</id> <name>linebuffer_2</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:linebuffer.2&gt;</content> </item> <item class_id_reference="16" object_id="_19"> <Value> <Obj> <type>2</type> <id>54</id> <name>Loop_2_proc</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:Loop_2_proc&gt;</content> </item> <item class_id_reference="16" object_id="_20"> <Value> <Obj> <type>2</type> <id>58</id> <name>Loop_3_proc</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <bitwidth>0</bitwidth> </Value> <const_type>6</const_type> <content>&lt;constant:Loop_3_proc&gt;</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_21"> <Obj> <type>3</type> <id>35</id> <name>hls_target</name> <fileName/> <fileDirectory/> <lineNumber>0</lineNumber> <contextFuncName/> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName/> <rtlName/> <coreName/> </Obj> <node_objs> <count>10</count> <item_version>0</item_version> <item>11</item> <item>15</item> <item>19</item> <item>23</item> <item>29</item> <item>30</item> <item>31</item> <item>32</item> <item>33</item> <item>34</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>29</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_22"> <id>37</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>11</sink_obj> </item> <item class_id_reference="20" object_id="_23"> <id>38</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>15</sink_obj> </item> <item class_id_reference="20" object_id="_24"> <id>39</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>19</sink_obj> </item> <item class_id_reference="20" object_id="_25"> <id>40</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>23</sink_obj> </item> <item class_id_reference="20" object_id="_26"> <id>42</id> <edge_type>1</edge_type> <source_obj>41</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_27"> <id>43</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_28"> <id>44</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_29"> <id>45</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_30"> <id>47</id> <edge_type>1</edge_type> <source_obj>46</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_31"> <id>48</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_32"> <id>49</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_33"> <id>51</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_34"> <id>52</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_35"> <id>53</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_36"> <id>55</id> <edge_type>1</edge_type> <source_obj>54</source_obj> <sink_obj>32</sink_obj> </item> <item class_id_reference="20" object_id="_37"> <id>56</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>32</sink_obj> </item> <item class_id_reference="20" object_id="_38"> <id>57</id> <edge_type>1</edge_type> <source_obj>23</source_obj> <sink_obj>32</sink_obj> </item> <item class_id_reference="20" object_id="_39"> <id>59</id> <edge_type>1</edge_type> <source_obj>58</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_40"> <id>60</id> <edge_type>1</edge_type> <source_obj>23</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_41"> <id>61</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_42"> <id>62</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_43"> <id>280</id> <edge_type>4</edge_type> <source_obj>32</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_44"> <id>281</id> <edge_type>4</edge_type> <source_obj>31</source_obj> <sink_obj>32</sink_obj> </item> <item class_id_reference="20" object_id="_45"> <id>282</id> <edge_type>4</edge_type> <source_obj>30</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_46"> <id>283</id> <edge_type>4</edge_type> <source_obj>29</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_47"> <id>284</id> <edge_type>4</edge_type> <source_obj>29</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_48"> <id>285</id> <edge_type>4</edge_type> <source_obj>30</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_49"> <id>286</id> <edge_type>4</edge_type> <source_obj>31</source_obj> <sink_obj>32</sink_obj> </item> <item class_id_reference="20" object_id="_50"> <id>287</id> <edge_type>4</edge_type> <source_obj>32</source_obj> <sink_obj>33</sink_obj> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_51"> <mId>1</mId> <mTag>hls_target</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>35</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>2077921</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>1</mIsDfPipe> <mDfPipe class_id="23" tracking_level="1" version="0" object_id="_52"> <port_list class_id="24" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </port_list> <process_list class_id="25" tracking_level="0" version="0"> <count>5</count> <item_version>0</item_version> <item class_id="26" tracking_level="1" version="0" object_id="_53"> <type>0</type> <name>linebuffer_1_U0</name> <ssdmobj_id>29</ssdmobj_id> <pins class_id="27" tracking_level="0" version="0"> <count>3</count> <item_version>0</item_version> <item class_id="28" tracking_level="1" version="0" object_id="_54"> <port class_id="29" tracking_level="1" version="0" object_id="_55"> <name>in_axi_stream_V_value_V</name> <dir>3</dir> <type>0</type> </port> <inst class_id="30" tracking_level="1" version="0" object_id="_56"> <type>0</type> <name>linebuffer_1_U0</name> <ssdmobj_id>29</ssdmobj_id> </inst> </item> <item class_id_reference="28" object_id="_57"> <port class_id_reference="29" object_id="_58"> <name>in_axi_stream_V_last_V</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_56"/> </item> <item class_id_reference="28" object_id="_59"> <port class_id_reference="29" object_id="_60"> <name>out_stream_V_value_V</name> <dir>0</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_56"/> </item> </pins> </item> <item class_id_reference="26" object_id="_61"> <type>0</type> <name>Loop_1_proc_U0</name> <ssdmobj_id>30</ssdmobj_id> <pins> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_62"> <port class_id_reference="29" object_id="_63"> <name>p_hw_input_stencil_stream_V_value_V</name> <dir>0</dir> <type>0</type> </port> <inst class_id_reference="30" object_id="_64"> <type>0</type> <name>Loop_1_proc_U0</name> <ssdmobj_id>30</ssdmobj_id> </inst> </item> <item class_id_reference="28" object_id="_65"> <port class_id_reference="29" object_id="_66"> <name>p_mul_stencil_update_stream_V_value_V</name> <dir>0</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_64"/> </item> </pins> </item> <item class_id_reference="26" object_id="_67"> <type>0</type> <name>linebuffer_2_U0</name> <ssdmobj_id>31</ssdmobj_id> <pins> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_68"> <port class_id_reference="29" object_id="_69"> <name>in_stream_V_value_V</name> <dir>0</dir> <type>0</type> </port> <inst class_id_reference="30" object_id="_70"> <type>0</type> <name>linebuffer_2_U0</name> <ssdmobj_id>31</ssdmobj_id> </inst> </item> <item class_id_reference="28" object_id="_71"> <port class_id_reference="29" object_id="_72"> <name>out_stream_V_value_V</name> <dir>0</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_70"/> </item> </pins> </item> <item class_id_reference="26" object_id="_73"> <type>0</type> <name>Loop_2_proc_U0</name> <ssdmobj_id>32</ssdmobj_id> <pins> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_74"> <port class_id_reference="29" object_id="_75"> <name>p_mul_stencil_stream_V_value_V</name> <dir>0</dir> <type>0</type> </port> <inst class_id_reference="30" object_id="_76"> <type>0</type> <name>Loop_2_proc_U0</name> <ssdmobj_id>32</ssdmobj_id> </inst> </item> <item class_id_reference="28" object_id="_77"> <port class_id_reference="29" object_id="_78"> <name>p_p2_mul1_stencil_stream_V_value_V</name> <dir>0</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_76"/> </item> </pins> </item> <item class_id_reference="26" object_id="_79"> <type>0</type> <name>Loop_3_proc_U0</name> <ssdmobj_id>33</ssdmobj_id> <pins> <count>3</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_80"> <port class_id_reference="29" object_id="_81"> <name>p_p2_mul1_stencil_stream_V_value_V</name> <dir>0</dir> <type>0</type> </port> <inst class_id_reference="30" object_id="_82"> <type>0</type> <name>Loop_3_proc_U0</name> <ssdmobj_id>33</ssdmobj_id> </inst> </item> <item class_id_reference="28" object_id="_83"> <port class_id_reference="29" object_id="_84"> <name>hw_output_V_value_V</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_82"/> </item> <item class_id_reference="28" object_id="_85"> <port class_id_reference="29" object_id="_86"> <name>hw_output_V_last_V</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_82"/> </item> </pins> </item> </process_list> <channel_list class_id="31" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="32" tracking_level="1" version="0" object_id="_87"> <type>1</type> <name>p_hw_input_stencil_st</name> <ssdmobj_id>11</ssdmobj_id> <ctype>0</ctype> <depth>1</depth> <bitwidth>288</bitwidth> <source class_id_reference="28" object_id="_88"> <port class_id_reference="29" object_id="_89"> <name>in</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_56"/> </source> <sink class_id_reference="28" object_id="_90"> <port class_id_reference="29" object_id="_91"> <name>out</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_64"/> </sink> </item> <item class_id_reference="32" object_id="_92"> <type>1</type> <name>p_mul_stencil_update_1</name> <ssdmobj_id>15</ssdmobj_id> <ctype>0</ctype> <depth>1</depth> <bitwidth>32</bitwidth> <source class_id_reference="28" object_id="_93"> <port class_id_reference="29" object_id="_94"> <name>in</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_64"/> </source> <sink class_id_reference="28" object_id="_95"> <port class_id_reference="29" object_id="_96"> <name>out</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_70"/> </sink> </item> <item class_id_reference="32" object_id="_97"> <type>1</type> <name>p_mul_stencil_stream_s</name> <ssdmobj_id>19</ssdmobj_id> <ctype>0</ctype> <depth>1</depth> <bitwidth>128</bitwidth> <source class_id_reference="28" object_id="_98"> <port class_id_reference="29" object_id="_99"> <name>in</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_70"/> </source> <sink class_id_reference="28" object_id="_100"> <port class_id_reference="29" object_id="_101"> <name>out</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_76"/> </sink> </item> <item class_id_reference="32" object_id="_102"> <type>1</type> <name>p_p2_mul1_stencil_str</name> <ssdmobj_id>23</ssdmobj_id> <ctype>0</ctype> <depth>1</depth> <bitwidth>32</bitwidth> <source class_id_reference="28" object_id="_103"> <port class_id_reference="29" object_id="_104"> <name>in</name> <dir>3</dir> <type>0</type> </port> <inst class_id_reference="30" object_id_reference="_76"/> </source> <sink class_id_reference="28" object_id="_105"> <port class_id_reference="29" object_id="_106"> <name>out</name> <dir>3</dir> <type>1</type> </port> <inst class_id_reference="30" object_id_reference="_82"/> </sink> </item> </channel_list> <net_list class_id="33" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </net_list> </mDfPipe> </item> </cdfg_regions> <fsm class_id="34" tracking_level="1" version="0" object_id="_107"> <states class_id="35" tracking_level="0" version="0"> <count>10</count> <item_version>0</item_version> <item class_id="36" tracking_level="1" version="0" object_id="_108"> <id>1</id> <operations class_id="37" tracking_level="0" version="0"> <count>5</count> <item_version>0</item_version> <item class_id="38" tracking_level="1" version="0" object_id="_109"> <id>11</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_110"> <id>15</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_111"> <id>19</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_112"> <id>23</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_113"> <id>29</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="36" object_id="_114"> <id>2</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="38" object_id="_115"> <id>29</id> <stage>1</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="36" object_id="_116"> <id>3</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="38" object_id="_117"> <id>30</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="36" object_id="_118"> <id>4</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="38" object_id="_119"> <id>30</id> <stage>1</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="36" object_id="_120"> <id>5</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="38" object_id="_121"> <id>31</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="36" object_id="_122"> <id>6</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="38" object_id="_123"> <id>31</id> <stage>1</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="36" object_id="_124"> <id>7</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="38" object_id="_125"> <id>32</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="36" object_id="_126"> <id>8</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="38" object_id="_127"> <id>32</id> <stage>1</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="36" object_id="_128"> <id>9</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="38" object_id="_129"> <id>33</id> <stage>2</stage> <latency>2</latency> </item> </operations> </item> <item class_id_reference="36" object_id="_130"> <id>10</id> <operations> <count>22</count> <item_version>0</item_version> <item class_id_reference="38" object_id="_131"> <id>5</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_132"> <id>6</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_133"> <id>7</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_134"> <id>8</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_135"> <id>9</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_136"> <id>10</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_137"> <id>12</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_138"> <id>13</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_139"> <id>14</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_140"> <id>16</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_141"> <id>17</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_142"> <id>18</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_143"> <id>20</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_144"> <id>21</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_145"> <id>22</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_146"> <id>24</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_147"> <id>25</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_148"> <id>26</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_149"> <id>27</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_150"> <id>28</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="38" object_id="_151"> <id>33</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="38" object_id="_152"> <id>34</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> </states> <transitions class_id="39" tracking_level="0" version="0"> <count>9</count> <item_version>0</item_version> <item class_id="40" tracking_level="1" version="0" object_id="_153"> <inState>1</inState> <outState>2</outState> <condition class_id="41" tracking_level="0" version="0"> <id>0</id> <sop class_id="42" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="43" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="40" object_id="_154"> <inState>2</inState> <outState>3</outState> <condition> <id>1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="40" object_id="_155"> <inState>3</inState> <outState>4</outState> <condition> <id>2</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="40" object_id="_156"> <inState>4</inState> <outState>5</outState> <condition> <id>3</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="40" object_id="_157"> <inState>5</inState> <outState>6</outState> <condition> <id>4</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="40" object_id="_158"> <inState>6</inState> <outState>7</outState> <condition> <id>5</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="40" object_id="_159"> <inState>7</inState> <outState>8</outState> <condition> <id>6</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="40" object_id="_160"> <inState>8</inState> <outState>9</outState> <condition> <id>7</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="40" object_id="_161"> <inState>9</inState> <outState>10</outState> <condition> <id>8</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> </transitions> </fsm> <res class_id="44" tracking_level="1" version="0" object_id="_162"> <dp_component_resource class_id="45" tracking_level="0" version="0"> <count>9</count> <item_version>0</item_version> <item class_id="46" tracking_level="0" version="0"> <first>Loop_1_proc_U0 (Loop_1_proc)</first> <second class_id="47" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="48" tracking_level="0" version="0"> <first>FF</first> <second>936</second> </item> <item> <first>LUT</first> <second>429</second> </item> </second> </item> <item> <first>Loop_2_proc_U0 (Loop_2_proc)</first> <second> <count>2</count> <item_version>0</item_version> <item> <first>FF</first> <second>486</second> </item> <item> <first>LUT</first> <second>265</second> </item> </second> </item> <item> <first>Loop_3_proc_U0 (Loop_3_proc)</first> <second> <count>2</count> <item_version>0</item_version> <item> <first>FF</first> <second>365</second> </item> <item> <first>LUT</first> <second>319</second> </item> </second> </item> <item> <first>linebuffer_1_U0 (linebuffer_1)</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>BRAM</first> <second>8</second> </item> <item> <first>FF</first> <second>1231</second> </item> <item> <first>LUT</first> <second>805</second> </item> </second> </item> <item> <first>linebuffer_2_U0 (linebuffer_2)</first> <second> <count>3</count> <item_version>0</item_version> <item> <first>BRAM</first> <second>4</second> </item> <item> <first>FF</first> <second>394</second> </item> <item> <first>LUT</first> <second>332</second> </item> </second> </item> <item> <first>start_for_Loop_1_hbi_U (start_for_Loop_1_hbi)</first> <second> <count>0</count> <item_version>0</item_version> </second> </item> <item> <first>start_for_Loop_2_jbC_U (start_for_Loop_2_jbC)</first> <second> <count>0</count> <item_version>0</item_version> </second> </item> <item> <first>start_for_Loop_3_kbM_U (start_for_Loop_3_kbM)</first> <second> <count>0</count> <item_version>0</item_version> </second> </item> <item> <first>start_for_linebufibs_U (start_for_linebufibs)</first> <second> <count>0</count> <item_version>0</item_version> </second> </item> </dp_component_resource> <dp_expression_resource> <count>5</count> <item_version>0</item_version> <item> <first>Loop_1_proc_U0_start_full_n ( or ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>2</second> </item> </second> </item> <item> <first>Loop_2_proc_U0_start_full_n ( or ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>2</second> </item> </second> </item> <item> <first>ap_idle ( and ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>2</second> </item> </second> </item> <item> <first>linebuffer_1_U0_start_full_n ( or ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>2</second> </item> </second> </item> <item> <first>linebuffer_2_U0_start_full_n ( or ) </first> <second> <count>4</count> <item_version>0</item_version> <item> <first>(0P0)</first> <second>1</second> </item> <item> <first>(1P1)</first> <second>1</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>2</second> </item> </second> </item> </dp_expression_resource> <dp_fifo_resource> <count>4</count> <item_version>0</item_version> <item> <first>p_hw_input_stencil_st_U</first> <second> <count>5</count> <item_version>0</item_version> <item> <first>(0Depth)</first> <second>1</second> </item> <item> <first>(1Bits)</first> <second>288</second> </item> <item> <first>(2Size:D*B)</first> <second>288</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>1</second> </item> </second> </item> <item> <first>p_mul_stencil_stream_s_U</first> <second> <count>5</count> <item_version>0</item_version> <item> <first>(0Depth)</first> <second>1</second> </item> <item> <first>(1Bits)</first> <second>128</second> </item> <item> <first>(2Size:D*B)</first> <second>128</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>1</second> </item> </second> </item> <item> <first>p_mul_stencil_update_1_U</first> <second> <count>5</count> <item_version>0</item_version> <item> <first>(0Depth)</first> <second>1</second> </item> <item> <first>(1Bits)</first> <second>32</second> </item> <item> <first>(2Size:D*B)</first> <second>32</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>1</second> </item> </second> </item> <item> <first>p_p2_mul1_stencil_str_U</first> <second> <count>5</count> <item_version>0</item_version> <item> <first>(0Depth)</first> <second>1</second> </item> <item> <first>(1Bits)</first> <second>32</second> </item> <item> <first>(2Size:D*B)</first> <second>32</second> </item> <item> <first>FF</first> <second>0</second> </item> <item> <first>LUT</first> <second>1</second> </item> </second> </item> </dp_fifo_resource> <dp_memory_resource> <count>0</count> <item_version>0</item_version> </dp_memory_resource> <dp_multiplexer_resource> <count>0</count> <item_version>0</item_version> </dp_multiplexer_resource> <dp_register_resource> <count>0</count> <item_version>0</item_version> </dp_register_resource> <dp_component_map class_id="49" tracking_level="0" version="0"> <count>5</count> <item_version>0</item_version> <item class_id="50" tracking_level="0" version="0"> <first>Loop_1_proc_U0 (Loop_1_proc)</first> <second> <count>1</count> <item_version>0</item_version> <item>30</item> </second> </item> <item> <first>Loop_2_proc_U0 (Loop_2_proc)</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>Loop_3_proc_U0 (Loop_3_proc)</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>linebuffer_1_U0 (linebuffer_1)</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>linebuffer_2_U0 (linebuffer_2)</first> <second> <count>1</count> <item_version>0</item_version> <item>31</item> </second> </item> </dp_component_map> <dp_expression_map> <count>0</count> <item_version>0</item_version> </dp_expression_map> <dp_fifo_map> <count>4</count> <item_version>0</item_version> <item> <first>p_hw_input_stencil_st_U</first> <second> <count>1</count> <item_version>0</item_version> <item>103</item> </second> </item> <item> <first>p_mul_stencil_stream_s_U</first> <second> <count>1</count> <item_version>0</item_version> <item>125</item> </second> </item> <item> <first>p_mul_stencil_update_1_U</first> <second> <count>1</count> <item_version>0</item_version> <item>114</item> </second> </item> <item> <first>p_p2_mul1_stencil_str_U</first> <second> <count>1</count> <item_version>0</item_version> <item>135</item> </second> </item> </dp_fifo_map> <dp_memory_map> <count>0</count> <item_version>0</item_version> </dp_memory_map> </res> <node_label_latency class_id="51" tracking_level="0" version="0"> <count>10</count> <item_version>0</item_version> <item class_id="52" tracking_level="0" version="0"> <first>11</first> <second class_id="53" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>15</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>19</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>23</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>29</first> <second> <first>0</first> <second>1</second> </second> </item> <item> <first>30</first> <second> <first>2</first> <second>1</second> </second> </item> <item> <first>31</first> <second> <first>4</first> <second>1</second> </second> </item> <item> <first>32</first> <second> <first>6</first> <second>1</second> </second> </item> <item> <first>33</first> <second> <first>8</first> <second>1</second> </second> </item> <item> <first>34</first> <second> <first>9</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="54" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="55" tracking_level="0" version="0"> <first>35</first> <second class_id="56" tracking_level="0" version="0"> <first>0</first> <second>9</second> </second> </item> </bblk_ent_exit> <regions class_id="57" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="58" tracking_level="1" version="0" object_id="_163"> <region_name>hls_target</region_name> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>35</item> </basic_blocks> <nodes> <count>30</count> <item_version>0</item_version> <item>5</item> <item>6</item> <item>7</item> <item>8</item> <item>9</item> <item>10</item> <item>11</item> <item>12</item> <item>13</item> <item>14</item> <item>15</item> <item>16</item> <item>17</item> <item>18</item> <item>19</item> <item>20</item> <item>21</item> <item>22</item> <item>23</item> <item>24</item> <item>25</item> <item>26</item> <item>27</item> <item>28</item> <item>29</item> <item>30</item> <item>31</item> <item>32</item> <item>33</item> <item>34</item> </nodes> <anchor_node>-1</anchor_node> <region_type>16</region_type> <interval>0</interval> <pipe_depth>0</pipe_depth> </item> </regions> <dp_fu_nodes class_id="59" tracking_level="0" version="0"> <count>9</count> <item_version>0</item_version> <item class_id="60" tracking_level="0" version="0"> <first>60</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>64</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> <item> <first>68</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>72</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> <item> <first>76</first> <second> <count>2</count> <item_version>0</item_version> <item>29</item> <item>29</item> </second> </item> <item> <first>85</first> <second> <count>2</count> <item_version>0</item_version> <item>30</item> <item>30</item> </second> </item> <item> <first>91</first> <second> <count>2</count> <item_version>0</item_version> <item>31</item> <item>31</item> </second> </item> <item> <first>97</first> <second> <count>2</count> <item_version>0</item_version> <item>32</item> <item>32</item> </second> </item> <item> <first>103</first> <second> <count>2</count> <item_version>0</item_version> <item>33</item> <item>33</item> </second> </item> </dp_fu_nodes> <dp_fu_nodes_expression class_id="62" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="63" tracking_level="0" version="0"> <first>p_hw_input_stencil_st_fu_60</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>p_mul_stencil_stream_s_fu_68</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>p_mul_stencil_update_1_fu_64</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> <item> <first>p_p2_mul1_stencil_str_fu_72</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>5</count> <item_version>0</item_version> <item> <first>grp_Loop_1_proc_fu_85</first> <second> <count>2</count> <item_version>0</item_version> <item>30</item> <item>30</item> </second> </item> <item> <first>grp_Loop_2_proc_fu_97</first> <second> <count>2</count> <item_version>0</item_version> <item>32</item> <item>32</item> </second> </item> <item> <first>grp_Loop_3_proc_fu_103</first> <second> <count>2</count> <item_version>0</item_version> <item>33</item> <item>33</item> </second> </item> <item> <first>grp_linebuffer_1_fu_76</first> <second> <count>2</count> <item_version>0</item_version> <item>29</item> <item>29</item> </second> </item> <item> <first>grp_linebuffer_2_fu_91</first> <second> <count>2</count> <item_version>0</item_version> <item>31</item> <item>31</item> </second> </item> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="64" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_mem_port_nodes> <dp_reg_nodes> <count>4</count> <item_version>0</item_version> <item> <first>112</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>118</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> <item> <first>124</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>130</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> </dp_reg_nodes> <dp_regname_nodes> <count>4</count> <item_version>0</item_version> <item> <first>p_hw_input_stencil_st_reg_112</first> <second> <count>1</count> <item_version>0</item_version> <item>11</item> </second> </item> <item> <first>p_mul_stencil_stream_s_reg_124</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>p_mul_stencil_update_1_reg_118</first> <second> <count>1</count> <item_version>0</item_version> <item>15</item> </second> </item> <item> <first>p_p2_mul1_stencil_str_reg_130</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> </dp_regname_nodes> <dp_reg_phi> <count>0</count> <item_version>0</item_version> </dp_reg_phi> <dp_regname_phi> <count>0</count> <item_version>0</item_version> </dp_regname_phi> <dp_port_io_nodes class_id="65" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="66" tracking_level="0" version="0"> <first>hw_input_V_last_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>call</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> </second> </item> <item> <first>hw_input_V_value_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>call</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> </second> </item> <item> <first>hw_output_V_last_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>call</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> </second> </item> <item> <first>hw_output_V_value_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>call</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> </second> </item> </dp_port_io_nodes> <port2core class_id="67" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </port2core> <node2core> <count>4</count> <item_version>0</item_version> <item class_id="68" tracking_level="0" version="0"> <first>11</first> <second>FIFO_SRL</second> </item> <item> <first>15</first> <second>FIFO_SRL</second> </item> <item> <first>19</first> <second>FIFO_SRL</second> </item> <item> <first>23</first> <second>FIFO_SRL</second> </item> </node2core> </syndb> </boost_serialization>
32.131674
136
0.458633
2f0dcf9416e50d9462fad75cd305926b0cce0a05
1,263
ads
Ada
Erathostenes-III/src/soe.ads
Maxelweb/adacore-sandbox
a2576a33660327079f64d32e4b79d5a139cc3631
[ "Unlicense" ]
null
null
null
Erathostenes-III/src/soe.ads
Maxelweb/adacore-sandbox
a2576a33660327079f64d32e4b79d5a139cc3631
[ "Unlicense" ]
null
null
null
Erathostenes-III/src/soe.ads
Maxelweb/adacore-sandbox
a2576a33660327079f64d32e4b79d5a139cc3631
[ "Unlicense" ]
null
null
null
with Ada.Finalization; package SoE is -- process Odd will be activated as part of the elaboration -- of the enclosing package ----------------------------------- task Odd is -- we want the user to set the limit of the search range entry Set_Limit (User_Limit : Positive); end Odd; ----------------------------------- task type Sieve_T (Id : Positive) is entry Relay (Int : Positive); end Sieve_T; type Sieve_Ref is access Sieve_T; -- for terminating processes to express last wishes -- we need to place explicitly finalizable objects -- within the scope of tasks that may be finalized: -- in this way, the task finalization will first require finalization -- of all objects in its scope, which will occur by automatic -- invocation of the method Finalize on each such object ----------------------------------- type Last_Wishes_T is new Ada.Finalization.Limited_Controlled with record Id : Positive; end record; procedure Finalize (Last_Wishes : in out Last_Wishes_T); -- the type of finalizable objects must be an extension of this -- special type of the language ----------------------------------- end SoE;
35.083333
74
0.596991
41e0696b65d537e21cae6e1b830930fbd3dce28c
10,244
ads
Ada
llvm-gcc-4.2-2.9/gcc/ada/system-vms.ads
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
1
2016-04-09T02:58:13.000Z
2016-04-09T02:58:13.000Z
llvm-gcc-4.2-2.9/gcc/ada/system-vms.ads
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
llvm-gcc-4.2-2.9/gcc/ada/system-vms.ads
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M -- -- -- -- S p e c -- -- (OpenVMS DEC Threads Version) -- -- -- -- Copyright (C) 1992-2006, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- -- apply solely to the contents of the part following the private keyword. -- -- -- -- 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 2, 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. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ package System is pragma Pure; -- Note that we take advantage of the implementation permission to make -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada -- 2005, this is Pure in any case (AI-362). type Name is (SYSTEM_NAME_GNAT); System_Name : constant Name := SYSTEM_NAME_GNAT; -- System-Dependent Named Numbers Min_Int : constant := Long_Long_Integer'First; Max_Int : constant := Long_Long_Integer'Last; Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size; Max_Nonbinary_Modulus : constant := Integer'Last; Max_Base_Digits : constant := Long_Long_Float'Digits; Max_Digits : constant := Long_Long_Float'Digits; Max_Mantissa : constant := 63; Fine_Delta : constant := 2.0 ** (-Max_Mantissa); Tick : constant := 0.01; -- Storage-related Declarations type Address is private; Null_Address : constant Address; Storage_Unit : constant := 8; Word_Size : constant := 32; Memory_Size : constant := 2 ** 32; -- Address comparison function "<" (Left, Right : Address) return Boolean; function "<=" (Left, Right : Address) return Boolean; function ">" (Left, Right : Address) return Boolean; function ">=" (Left, Right : Address) return Boolean; function "=" (Left, Right : Address) return Boolean; pragma Import (Intrinsic, "<"); pragma Import (Intrinsic, "<="); pragma Import (Intrinsic, ">"); pragma Import (Intrinsic, ">="); pragma Import (Intrinsic, "="); -- Other System-Dependent Declarations type Bit_Order is (High_Order_First, Low_Order_First); Default_Bit_Order : constant Bit_Order := Low_Order_First; -- Priority-related Declarations (RM D.1) Max_Priority : constant Positive := 30; Max_Interrupt_Priority : constant Positive := 31; subtype Any_Priority is Integer range 0 .. 31; subtype Priority is Any_Priority range 0 .. 30; subtype Interrupt_Priority is Any_Priority range 31 .. 31; Default_Priority : constant Priority := 15; private type Address is mod Memory_Size; Null_Address : constant Address := 0; -------------------------------------- -- System Implementation Parameters -- -------------------------------------- -- These parameters provide information about the target that is used -- by the compiler. They are in the private part of System, where they -- can be accessed using the special circuitry in the Targparm unit -- whose source should be consulted for more detailed descriptions -- of the individual switch values. AAMP : constant Boolean := False; Backend_Divide_Checks : constant Boolean := False; Backend_Overflow_Checks : constant Boolean := False; Command_Line_Args : constant Boolean := True; Compiler_System_Version : constant Boolean := False; Configurable_Run_Time : constant Boolean := False; Denorm : constant Boolean := False; Duration_32_Bits : constant Boolean := False; Exit_Status_Supported : constant Boolean := True; Fractional_Fixed_Ops : constant Boolean := False; Frontend_Layout : constant Boolean := False; Functions_Return_By_DSP : constant Boolean := False; Machine_Overflows : constant Boolean := False; Machine_Rounds : constant Boolean := True; OpenVMS : constant Boolean := True; Preallocated_Stacks : constant Boolean := False; Signed_Zeros : constant Boolean := True; Stack_Check_Default : constant Boolean := True; Stack_Check_Probes : constant Boolean := True; Support_64_Bit_Divides : constant Boolean := True; Support_Aggregates : constant Boolean := True; Support_Composite_Assign : constant Boolean := True; Support_Composite_Compare : constant Boolean := True; Support_Long_Shifts : constant Boolean := True; Suppress_Standard_Library : constant Boolean := False; Use_Ada_Main_Program_Name : constant Boolean := False; ZCX_By_Default : constant Boolean := True; GCC_ZCX_Support : constant Boolean := False; Front_End_ZCX_Support : constant Boolean := True; -- Obsolete entries, to be removed eventually (bootstrap issues!) High_Integrity_Mode : constant Boolean := False; Long_Shifts_Inlined : constant Boolean := False; -------------------------- -- Underlying Priorities -- --------------------------- -- Important note: this section of the file must come AFTER the -- definition of the system implementation parameters to ensure -- that the value of these parameters is available for analysis -- of the declarations here (using Rtsfind at compile time). -- The underlying priorities table provides a generalized mechanism -- for mapping from Ada priorities to system priorities. In some -- cases a 1-1 mapping is not the convenient or optimal choice. -- For DEC Threads OpenVMS, we use the full range of 31 priorities -- in the Ada model, but map them by compression onto the more limited -- range of priorities available in OpenVMS. -- To replace the default values of the Underlying_Priorities mapping, -- copy this source file into your build directory, edit the file to -- reflect your desired behavior, and recompile with the command: -- $ gcc -c -O3 -gnatpgn system.ads -- then recompile the run-time parts that depend on this package: -- $ gnatmake -a -gnatn -O3 <your application> -- then force rebuilding your application if you need different options: -- $ gnatmake -f <your options> <your application> type Priorities_Mapping is array (Any_Priority) of Integer; pragma Suppress_Initialization (Priorities_Mapping); -- Suppress initialization in case gnat.adc specifies Normalize_Scalars Underlying_Priorities : constant Priorities_Mapping := (Priority'First => 16, 1 => 17, 2 => 18, 3 => 18, 4 => 18, 5 => 18, 6 => 19, 7 => 19, 8 => 19, 9 => 20, 10 => 20, 11 => 21, 12 => 21, 13 => 22, 14 => 23, Default_Priority => 24, 16 => 25, 17 => 25, 18 => 25, 19 => 26, 20 => 26, 21 => 26, 22 => 27, 23 => 27, 24 => 27, 25 => 28, 26 => 28, 27 => 29, 28 => 29, 29 => 30, Priority'Last => 30, Interrupt_Priority => 31); ---------------------------- -- Special VMS Interfaces -- ---------------------------- procedure Lib_Stop (I : Integer); pragma Interface (C, Lib_Stop); pragma Import_Procedure (Lib_Stop, "LIB$STOP", Mechanism => (Value)); -- Interface to VMS condition handling. Used by RTSfind and pragma -- {Import,Export}_Exception. Put here because this is the only -- VMS specific package that doesn't drag in tasking. ADA_GNAT : constant Boolean := True; pragma Export_Object (ADA_GNAT, "ADA$GNAT"); -- Uniquitous global symbol identifing a GNAT compiled image to VMS Debug. -- Do not remove! end System;
41.812245
78
0.569211
296c32ebf6825492c1fe831a58e15fc43c517dfc
1,285
ads
Ada
src/commands-init.ads
bracke/websitegenerator
d3aee456f9f0b84e1d4e7030520fac5d8e6c8a1b
[ "CC0-1.0" ]
1
2022-02-14T11:45:43.000Z
2022-02-14T11:45:43.000Z
src/commands-init.ads
bracke/websitegenerator
d3aee456f9f0b84e1d4e7030520fac5d8e6c8a1b
[ "CC0-1.0" ]
null
null
null
src/commands-init.ads
bracke/websitegenerator
d3aee456f9f0b84e1d4e7030520fac5d8e6c8a1b
[ "CC0-1.0" ]
null
null
null
with AAA.Strings; private with GNAT.Strings; package Commands.Init is type Instance is new CLIC.Subcommand.Command with private; overriding function Name (Cmd : Instance) return CLIC.Subcommand.Identifier is ("init"); overriding procedure Execute (Cmd : in out Instance; Args : AAA.Strings.Vector); overriding function Switch_Parsing (This : Instance) return CLIC.Subcommand.Switch_Parsing_Kind is (CLIC.Subcommand.All_As_Args); overriding function Long_Description (Cmd : Instance) return AAA.Strings.Vector is (AAA.Strings.Empty_Vector.Append ("Initializes a new website in the current folder.") .New_Line ); overriding procedure Setup_Switches (Cmd : in out Instance; Config : in out CLIC.Subcommand.Switches_Configuration); overriding function Short_Description (Cmd : Instance) return String is ("Initializes a new website in the current folder."); overriding function Usage_Custom_Parameters (Cmd : Instance) return String is ("[-dry-run] [--blueprint <name>]"); private type Instance is new CLIC.Subcommand.Command with record Dry_Run : aliased Boolean := False; Blueprint : aliased GNAT.Strings.String_Access; end record; end Commands.Init;
28.555556
74
0.714397
1d1548cadbe93a697b58b077957a8849ad9f2618
3,522
adb
Ada
examples/HiFive1_rev_B/src/main.adb
shakram02/Ada_Drivers_Library
a407ca7ddbc2d9756647016c2f8fd8ef24a239ff
[ "BSD-3-Clause" ]
192
2016-06-01T18:32:04.000Z
2022-03-26T22:52:31.000Z
examples/HiFive1_rev_B/src/main.adb
shakram02/Ada_Drivers_Library
a407ca7ddbc2d9756647016c2f8fd8ef24a239ff
[ "BSD-3-Clause" ]
239
2016-05-26T20:02:01.000Z
2022-03-31T09:46:56.000Z
examples/HiFive1_rev_B/src/main.adb
shakram02/Ada_Drivers_Library
a407ca7ddbc2d9756647016c2f8fd8ef24a239ff
[ "BSD-3-Clause" ]
142
2016-06-05T08:12:20.000Z
2022-03-24T17:37:17.000Z
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2017-2018, AdaCore and other contributors -- -- -- -- See github.com/AdaCore/Ada_Drivers_Library/graphs/contributors -- -- for more information -- -- -- -- 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 FE310; with HiFive1.LEDs; use HiFive1.LEDs; with FE310.Time; use FE310.Time; procedure Main is begin -- The SPI flash clock divider should be as small as possible to increase -- the execution speed of instructions that are not yet in the instruction -- cache. FE310.Set_SPI_Flash_Clock_Divider (2); -- Load the internal oscillator factory calibration to be sure it -- oscillates at a known frequency. FE310.Load_Internal_Oscilator_Calibration; -- Use the HiFive1 16 MHz crystal oscillator which is more acurate than the -- internal oscillator. FE310.Use_Crystal_Oscillator; HiFive1.LEDs.Initialize; -- Blinky! loop Turn_On (Red_LED); Delay_S (1); Turn_Off (Red_LED); Turn_On (Green_LED); Delay_S (1); Turn_Off (Green_LED); Turn_On (Blue_LED); Delay_S (1); Turn_Off (Blue_LED); end loop; end Main;
48.916667
79
0.543725
4194c33a6a4c30d54f3b482f20eebddd19f59c94
2,054
adb
Ada
awa/src/awa-applications-factory.adb
My-Colaborations/ada-awa
cc2dee291a14e4df0dbc9c10285bf284a7f1caa8
[ "Apache-2.0" ]
81
2015-01-18T23:02:30.000Z
2022-03-19T17:34:57.000Z
awa/src/awa-applications-factory.adb
My-Colaborations/ada-awa
cc2dee291a14e4df0dbc9c10285bf284a7f1caa8
[ "Apache-2.0" ]
20
2015-12-09T19:26:19.000Z
2022-03-23T14:32:43.000Z
awa/src/awa-applications-factory.adb
My-Colaborations/ada-awa
cc2dee291a14e4df0dbc9c10285bf284a7f1caa8
[ "Apache-2.0" ]
16
2015-06-29T02:44:06.000Z
2021-09-23T18:47:50.000Z
----------------------------------------------------------------------- -- awa-applications-factory -- Factory for AWA Applications -- Copyright (C) 2011, 2012 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- 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 AWA.Permissions.Services; package body AWA.Applications.Factory is -- ------------------------------ -- Create the security manager. The security manager is created during -- the initialization phase of the application. This implementation -- creates a <b>AWA.Permissions.Services.Permission_Manager</b> object. -- ------------------------------ overriding function Create_Security_Manager (App : in Application_Factory) return Security.Policies.Policy_Manager_Access is begin return AWA.Permissions.Services.Create_Permission_Manager (App.App); end Create_Security_Manager; -- ------------------------------ -- Set the application instance that will be used when creating the permission manager. -- ------------------------------ procedure Set_Application (Factory : in out ASF.Applications.Main.Application_Factory'Class; App : in Application_Access) is begin if Factory in Application_Factory'Class then Application_Factory'Class (Factory).App := App; end if; end Set_Application; end AWA.Applications.Factory;
44.652174
95
0.620253
29251c226aae926b9c009a8ea338d2df9886b12f
286,480
adb
Ada
gcc-gcc-7_3_0-release/gcc/ada/atree.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/atree.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/ada/atree.adb
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- A T R E E -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ pragma Style_Checks (All_Checks); -- Turn off subprogram ordering check for this package -- WARNING: There is a C version of this package. Any changes to this source -- file must be properly reflected in the file atree.h which is a C header -- file containing equivalent definitions for use by gigi. with Aspects; use Aspects; with Debug; use Debug; with Nlists; use Nlists; with Opt; use Opt; with Output; use Output; with Sinput; use Sinput; with Tree_IO; use Tree_IO; with GNAT.Heap_Sort_G; package body Atree is Locked : Boolean := False; -- Compiling with assertions enabled, node contents modifications are -- permitted only when this switch is set to False; compiling without -- assertions this lock has no effect. Reporting_Proc : Report_Proc := null; -- Record argument to last call to Set_Reporting_Proc --------------- -- Debugging -- --------------- -- Suppose you find that node 12345 is messed up. You might want to find -- the code that created that node. There are two ways to do this: -- One way is to set a conditional breakpoint on New_Node_Debugging_Output -- (nickname "nnd"): -- break nnd if n = 12345 -- and run gnat1 again from the beginning. -- The other way is to set a breakpoint near the beginning (e.g. on -- gnat1drv), and run. Then set Watch_Node (nickname "ww") to 12345 in gdb: -- ww := 12345 -- and set a breakpoint on New_Node_Breakpoint (nickname "nn"). Continue. -- Either way, gnat1 will stop when node 12345 is created -- The second method is much faster -- Similarly, rr and rrd allow breaking on rewriting of a given node ww : Node_Id'Base := Node_Id'First - 1; pragma Export (Ada, ww); -- trick the optimizer Watch_Node : Node_Id'Base renames ww; -- Node to "watch"; that is, whenever a node is created, we check if it -- is equal to Watch_Node, and if so, call New_Node_Breakpoint. You have -- presumably set a breakpoint on New_Node_Breakpoint. Note that the -- initial value of Node_Id'First - 1 ensures that by default, no node -- will be equal to Watch_Node. procedure nn; pragma Export (Ada, nn); procedure New_Node_Breakpoint renames nn; -- This doesn't do anything interesting; it's just for setting breakpoint -- on as explained above. procedure nnd (N : Node_Id); pragma Export (Ada, nnd); procedure New_Node_Debugging_Output (N : Node_Id) renames nnd; -- For debugging. If debugging is turned on, New_Node and New_Entity call -- this. If debug flag N is turned on, this prints out the new node. -- -- If Node = Watch_Node, this prints out the new node and calls -- New_Node_Breakpoint. Otherwise, does nothing. procedure rr; pragma Export (Ada, rr); procedure Rewrite_Breakpoint renames rr; -- This doesn't do anything interesting; it's just for setting breakpoint -- on as explained above. procedure rrd (Old_Node, New_Node : Node_Id); pragma Export (Ada, rrd); procedure Rewrite_Debugging_Output (Old_Node, New_Node : Node_Id) renames rrd; -- For debugging. If debugging is turned on, Rewrite calls this. If debug -- flag N is turned on, this prints out the new node. -- -- If Old_Node = Watch_Node, this prints out the old and new nodes and -- calls Rewrite_Breakpoint. Otherwise, does nothing. procedure Node_Debug_Output (Op : String; N : Node_Id); -- Common code for nnd and rrd, writes Op followed by information about N procedure Print_Statistics; pragma Export (Ada, Print_Statistics); -- Print various statistics on the tables maintained by the package ----------------------------- -- Local Objects and Types -- ----------------------------- Node_Count : Nat; -- Count allocated nodes for Num_Nodes function use Unchecked_Access; -- We are allowed to see these from within our own body use Atree_Private_Part; -- We are also allowed to see our private data structures -- Functions used to store Entity_Kind value in Nkind field -- The following declarations are used to store flags 65-72 in the -- Nkind field of the third component of an extended (entity) node. type Flag_Byte is record Flag65 : Boolean; Flag66 : Boolean; Flag67 : Boolean; Flag68 : Boolean; Flag69 : Boolean; Flag70 : Boolean; Flag71 : Boolean; Flag72 : Boolean; end record; pragma Pack (Flag_Byte); for Flag_Byte'Size use 8; type Flag_Byte_Ptr is access all Flag_Byte; type Node_Kind_Ptr is access all Node_Kind; function To_Flag_Byte is new Unchecked_Conversion (Node_Kind, Flag_Byte); function To_Flag_Byte_Ptr is new Unchecked_Conversion (Node_Kind_Ptr, Flag_Byte_Ptr); -- The following declarations are used to store flags 239-246 in the -- Nkind field of the fourth component of an extended (entity) node. type Flag_Byte2 is record Flag239 : Boolean; Flag240 : Boolean; Flag241 : Boolean; Flag242 : Boolean; Flag243 : Boolean; Flag244 : Boolean; Flag245 : Boolean; Flag246 : Boolean; end record; pragma Pack (Flag_Byte2); for Flag_Byte2'Size use 8; type Flag_Byte2_Ptr is access all Flag_Byte2; function To_Flag_Byte2 is new Unchecked_Conversion (Node_Kind, Flag_Byte2); function To_Flag_Byte2_Ptr is new Unchecked_Conversion (Node_Kind_Ptr, Flag_Byte2_Ptr); -- The following declarations are used to store flags 247-254 in the -- Nkind field of the fifth component of an extended (entity) node. type Flag_Byte3 is record Flag247 : Boolean; Flag248 : Boolean; Flag249 : Boolean; Flag250 : Boolean; Flag251 : Boolean; Flag252 : Boolean; Flag253 : Boolean; Flag254 : Boolean; end record; pragma Pack (Flag_Byte3); for Flag_Byte3'Size use 8; type Flag_Byte3_Ptr is access all Flag_Byte3; function To_Flag_Byte3 is new Unchecked_Conversion (Node_Kind, Flag_Byte3); function To_Flag_Byte3_Ptr is new Unchecked_Conversion (Node_Kind_Ptr, Flag_Byte3_Ptr); -- The following declarations are used to store flags 310-317 in the -- Nkind field of the sixth component of an extended (entity) node. type Flag_Byte4 is record Flag310 : Boolean; Flag311 : Boolean; Flag312 : Boolean; Flag313 : Boolean; Flag314 : Boolean; Flag315 : Boolean; Flag316 : Boolean; Flag317 : Boolean; end record; pragma Pack (Flag_Byte4); for Flag_Byte4'Size use 8; type Flag_Byte4_Ptr is access all Flag_Byte4; function To_Flag_Byte4 is new Unchecked_Conversion (Node_Kind, Flag_Byte4); function To_Flag_Byte4_Ptr is new Unchecked_Conversion (Node_Kind_Ptr, Flag_Byte4_Ptr); -- The following declarations are used to store flags 73-96 and the -- Convention field in the Field12 field of the third component of an -- extended (Entity) node. type Flag_Word is record Flag73 : Boolean; Flag74 : Boolean; Flag75 : Boolean; Flag76 : Boolean; Flag77 : Boolean; Flag78 : Boolean; Flag79 : Boolean; Flag80 : Boolean; Flag81 : Boolean; Flag82 : Boolean; Flag83 : Boolean; Flag84 : Boolean; Flag85 : Boolean; Flag86 : Boolean; Flag87 : Boolean; Flag88 : Boolean; Flag89 : Boolean; Flag90 : Boolean; Flag91 : Boolean; Flag92 : Boolean; Flag93 : Boolean; Flag94 : Boolean; Flag95 : Boolean; Flag96 : Boolean; Convention : Convention_Id; end record; pragma Pack (Flag_Word); for Flag_Word'Size use 32; for Flag_Word'Alignment use 4; type Flag_Word_Ptr is access all Flag_Word; type Union_Id_Ptr is access all Union_Id; function To_Flag_Word is new Unchecked_Conversion (Union_Id, Flag_Word); function To_Flag_Word_Ptr is new Unchecked_Conversion (Union_Id_Ptr, Flag_Word_Ptr); -- The following declarations are used to store flags 97-128 in the -- Field12 field of the fourth component of an extended (entity) node. type Flag_Word2 is record Flag97 : Boolean; Flag98 : Boolean; Flag99 : Boolean; Flag100 : Boolean; Flag101 : Boolean; Flag102 : Boolean; Flag103 : Boolean; Flag104 : Boolean; Flag105 : Boolean; Flag106 : Boolean; Flag107 : Boolean; Flag108 : Boolean; Flag109 : Boolean; Flag110 : Boolean; Flag111 : Boolean; Flag112 : Boolean; Flag113 : Boolean; Flag114 : Boolean; Flag115 : Boolean; Flag116 : Boolean; Flag117 : Boolean; Flag118 : Boolean; Flag119 : Boolean; Flag120 : Boolean; Flag121 : Boolean; Flag122 : Boolean; Flag123 : Boolean; Flag124 : Boolean; Flag125 : Boolean; Flag126 : Boolean; Flag127 : Boolean; Flag128 : Boolean; end record; pragma Pack (Flag_Word2); for Flag_Word2'Size use 32; for Flag_Word2'Alignment use 4; type Flag_Word2_Ptr is access all Flag_Word2; function To_Flag_Word2 is new Unchecked_Conversion (Union_Id, Flag_Word2); function To_Flag_Word2_Ptr is new Unchecked_Conversion (Union_Id_Ptr, Flag_Word2_Ptr); -- The following declarations are used to store flags 152-183 in the -- Field11 field of the fourth component of an extended (entity) node. type Flag_Word3 is record Flag152 : Boolean; Flag153 : Boolean; Flag154 : Boolean; Flag155 : Boolean; Flag156 : Boolean; Flag157 : Boolean; Flag158 : Boolean; Flag159 : Boolean; Flag160 : Boolean; Flag161 : Boolean; Flag162 : Boolean; Flag163 : Boolean; Flag164 : Boolean; Flag165 : Boolean; Flag166 : Boolean; Flag167 : Boolean; Flag168 : Boolean; Flag169 : Boolean; Flag170 : Boolean; Flag171 : Boolean; Flag172 : Boolean; Flag173 : Boolean; Flag174 : Boolean; Flag175 : Boolean; Flag176 : Boolean; Flag177 : Boolean; Flag178 : Boolean; Flag179 : Boolean; Flag180 : Boolean; Flag181 : Boolean; Flag182 : Boolean; Flag183 : Boolean; end record; pragma Pack (Flag_Word3); for Flag_Word3'Size use 32; for Flag_Word3'Alignment use 4; type Flag_Word3_Ptr is access all Flag_Word3; function To_Flag_Word3 is new Unchecked_Conversion (Union_Id, Flag_Word3); function To_Flag_Word3_Ptr is new Unchecked_Conversion (Union_Id_Ptr, Flag_Word3_Ptr); -- The following declarations are used to store flags 184-215 in the -- Field12 field of the fifth component of an extended (entity) node. type Flag_Word4 is record Flag184 : Boolean; Flag185 : Boolean; Flag186 : Boolean; Flag187 : Boolean; Flag188 : Boolean; Flag189 : Boolean; Flag190 : Boolean; Flag191 : Boolean; Flag192 : Boolean; Flag193 : Boolean; Flag194 : Boolean; Flag195 : Boolean; Flag196 : Boolean; Flag197 : Boolean; Flag198 : Boolean; Flag199 : Boolean; Flag200 : Boolean; Flag201 : Boolean; Flag202 : Boolean; Flag203 : Boolean; Flag204 : Boolean; Flag205 : Boolean; Flag206 : Boolean; Flag207 : Boolean; Flag208 : Boolean; Flag209 : Boolean; Flag210 : Boolean; Flag211 : Boolean; Flag212 : Boolean; Flag213 : Boolean; Flag214 : Boolean; Flag215 : Boolean; end record; pragma Pack (Flag_Word4); for Flag_Word4'Size use 32; for Flag_Word4'Alignment use 4; type Flag_Word4_Ptr is access all Flag_Word4; function To_Flag_Word4 is new Unchecked_Conversion (Union_Id, Flag_Word4); function To_Flag_Word4_Ptr is new Unchecked_Conversion (Union_Id_Ptr, Flag_Word4_Ptr); -- The following declarations are used to store flags 255-286 in the -- Field12 field of the sixth component of an extended (entity) node. type Flag_Word5 is record Flag255 : Boolean; Flag256 : Boolean; Flag257 : Boolean; Flag258 : Boolean; Flag259 : Boolean; Flag260 : Boolean; Flag261 : Boolean; Flag262 : Boolean; Flag263 : Boolean; Flag264 : Boolean; Flag265 : Boolean; Flag266 : Boolean; Flag267 : Boolean; Flag268 : Boolean; Flag269 : Boolean; Flag270 : Boolean; Flag271 : Boolean; Flag272 : Boolean; Flag273 : Boolean; Flag274 : Boolean; Flag275 : Boolean; Flag276 : Boolean; Flag277 : Boolean; Flag278 : Boolean; Flag279 : Boolean; Flag280 : Boolean; Flag281 : Boolean; Flag282 : Boolean; Flag283 : Boolean; Flag284 : Boolean; Flag285 : Boolean; Flag286 : Boolean; end record; pragma Pack (Flag_Word5); for Flag_Word5'Size use 32; for Flag_Word5'Alignment use 4; type Flag_Word5_Ptr is access all Flag_Word5; function To_Flag_Word5 is new Unchecked_Conversion (Union_Id, Flag_Word5); function To_Flag_Word5_Ptr is new Unchecked_Conversion (Union_Id_Ptr, Flag_Word5_Ptr); -------------------------------------------------- -- Implementation of Tree Substitution Routines -- -------------------------------------------------- -- A separate table keeps track of the mapping between rewritten nodes -- and their corresponding original tree nodes. Rewrite makes an entry -- in this table for use by Original_Node. By default, if no call is -- Rewrite, the entry in this table points to the original unwritten node. -- Note: eventually, this should be a field in the Node directly, but -- for now we do not want to disturb the efficiency of a power of 2 -- for the node size package Orig_Nodes is new Table.Table ( Table_Component_Type => Node_Id, Table_Index_Type => Node_Id'Base, Table_Low_Bound => First_Node_Id, Table_Initial => Alloc.Orig_Nodes_Initial, Table_Increment => Alloc.Orig_Nodes_Increment, Release_Threshold => Alloc.Orig_Nodes_Release_Threshold, Table_Name => "Orig_Nodes"); -------------------------- -- Paren_Count Handling -- -------------------------- -- As noted in the spec, the paren count in a sub-expression node has -- four possible values 0,1,2, and 3. The value 3 really means 3 or more, -- and we use an auxiliary serially scanned table to record the actual -- count. A serial search is fine, only pathological programs will use -- entries in this table. Normal programs won't use it at all. type Paren_Count_Entry is record Nod : Node_Id; -- The node to which this count applies Count : Nat range 3 .. Nat'Last; -- The count of parentheses, which will be in the indicated range end record; package Paren_Counts is new Table.Table ( Table_Component_Type => Paren_Count_Entry, Table_Index_Type => Int, Table_Low_Bound => 0, Table_Initial => 10, Table_Increment => 200, Table_Name => "Paren_Counts"); ----------------------- -- Local Subprograms -- ----------------------- function Allocate_Initialize_Node (Src : Node_Id; With_Extension : Boolean) return Node_Id; -- Allocate a new node or node extension. If Src is not empty, the -- information for the newly-allocated node is copied from it. procedure Fix_Parents (Ref_Node, Fix_Node : Node_Id); -- Fix up parent pointers for the syntactic children of Fix_Node after a -- copy, setting them to Fix_Node when they pointed to Ref_Node. procedure Mark_New_Ghost_Node (N : Node_Or_Entity_Id); -- Mark arbitrary node or entity N as Ghost when it is created within a -- Ghost region. ------------------------------ -- Allocate_Initialize_Node -- ------------------------------ function Allocate_Initialize_Node (Src : Node_Id; With_Extension : Boolean) return Node_Id is New_Id : Node_Id; begin if Present (Src) and then not Has_Extension (Src) and then With_Extension and then Src = Nodes.Last then New_Id := Src; -- We are allocating a new node, or extending a node other than -- Nodes.Last. else if Present (Src) then Nodes.Append (Nodes.Table (Src)); Flags.Append (Flags.Table (Src)); else Nodes.Append (Default_Node); Flags.Append (Default_Flags); end if; New_Id := Nodes.Last; Orig_Nodes.Append (New_Id); Node_Count := Node_Count + 1; end if; -- Clear Check_Actuals to False Set_Check_Actuals (New_Id, False); -- Specifically copy Paren_Count to deal with creating new table entry -- if the parentheses count is at the maximum possible value already. if Present (Src) and then Nkind (Src) in N_Subexpr then Set_Paren_Count (New_Id, Paren_Count (Src)); end if; -- Set extension nodes if required if With_Extension then if Present (Src) and then Has_Extension (Src) then for J in 1 .. Num_Extension_Nodes loop Nodes.Append (Nodes.Table (Src + J)); Flags.Append (Flags.Table (Src + J)); end loop; else for J in 1 .. Num_Extension_Nodes loop Nodes.Append (Default_Node_Extension); Flags.Append (Default_Flags); end loop; end if; end if; Orig_Nodes.Set_Last (Nodes.Last); Allocate_List_Tables (Nodes.Last); -- Invoke the reporting procedure (if available) if Reporting_Proc /= null then Reporting_Proc.all (Target => New_Id, Source => Src); end if; return New_Id; end Allocate_Initialize_Node; -------------- -- Analyzed -- -------------- function Analyzed (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Analyzed; end Analyzed; -------------------------- -- Basic_Set_Convention -- -------------------------- procedure Basic_Set_Convention (E : Entity_Id; Val : Convention_Id) is begin pragma Assert (Nkind (E) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (E + 2).Field12'Unrestricted_Access)).Convention := Val; end Basic_Set_Convention; ------------------- -- Check_Actuals -- ------------------- function Check_Actuals (N : Node_Id) return Boolean is begin return Flags.Table (N).Check_Actuals; end Check_Actuals; -------------------------- -- Check_Error_Detected -- -------------------------- procedure Check_Error_Detected is begin -- An anomaly has been detected which is assumed to be a consequence of -- a previous serious error or configurable run time violation. Raise -- an exception if no such error has been detected. if Serious_Errors_Detected = 0 and then Configurable_Run_Time_Violations = 0 then raise Program_Error; end if; end Check_Error_Detected; ----------------- -- Change_Node -- ----------------- procedure Change_Node (N : Node_Id; New_Node_Kind : Node_Kind) is Save_Sloc : constant Source_Ptr := Sloc (N); Save_In_List : constant Boolean := Nodes.Table (N).In_List; Save_Link : constant Union_Id := Nodes.Table (N).Link; Save_CFS : constant Boolean := Nodes.Table (N).Comes_From_Source; Save_Posted : constant Boolean := Nodes.Table (N).Error_Posted; Par_Count : Nat := 0; begin if Nkind (N) in N_Subexpr then Par_Count := Paren_Count (N); end if; Nodes.Table (N) := Default_Node; Nodes.Table (N).Sloc := Save_Sloc; Nodes.Table (N).In_List := Save_In_List; Nodes.Table (N).Link := Save_Link; Nodes.Table (N).Comes_From_Source := Save_CFS; Nodes.Table (N).Nkind := New_Node_Kind; Nodes.Table (N).Error_Posted := Save_Posted; Flags.Table (N) := Default_Flags; if New_Node_Kind in N_Subexpr then Set_Paren_Count (N, Par_Count); end if; end Change_Node; ----------------------- -- Comes_From_Source -- ----------------------- function Comes_From_Source (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Comes_From_Source; end Comes_From_Source; ---------------- -- Convention -- ---------------- function Convention (E : Entity_Id) return Convention_Id is begin pragma Assert (Nkind (E) in N_Entity); return To_Flag_Word (Nodes.Table (E + 2).Field12).Convention; end Convention; --------------- -- Copy_Node -- --------------- procedure Copy_Node (Source : Node_Id; Destination : Node_Id) is Save_In_List : constant Boolean := Nodes.Table (Destination).In_List; Save_Link : constant Union_Id := Nodes.Table (Destination).Link; begin Nodes.Table (Destination) := Nodes.Table (Source); Nodes.Table (Destination).In_List := Save_In_List; Nodes.Table (Destination).Link := Save_Link; Flags.Table (Destination) := Flags.Table (Source); -- Specifically set Paren_Count to make sure auxiliary table entry -- gets correctly made if the parentheses count is at the max value. if Nkind (Destination) in N_Subexpr then Set_Paren_Count (Destination, Paren_Count (Source)); end if; -- Deal with copying extension nodes if present. No need to copy flags -- table entries, since they are always zero for extending components. if Has_Extension (Source) then pragma Assert (Has_Extension (Destination)); for J in 1 .. Num_Extension_Nodes loop Nodes.Table (Destination + J) := Nodes.Table (Source + J); end loop; else pragma Assert (not Has_Extension (Source)); null; end if; end Copy_Node; ------------------------ -- Copy_Separate_List -- ------------------------ function Copy_Separate_List (Source : List_Id) return List_Id is Result : constant List_Id := New_List; Nod : Node_Id; begin Nod := First (Source); while Present (Nod) loop Append (Copy_Separate_Tree (Nod), Result); Next (Nod); end loop; return Result; end Copy_Separate_List; ------------------------ -- Copy_Separate_Tree -- ------------------------ function Copy_Separate_Tree (Source : Node_Id) return Node_Id is New_Id : Node_Id; function Copy_Entity (E : Entity_Id) return Entity_Id; -- Copy Entity, copying only the Ekind and Chars fields function Copy_List (List : List_Id) return List_Id; -- Copy list function Possible_Copy (Field : Union_Id) return Union_Id; -- Given a field, returns a copy of the node or list if its parent is -- the current source node, and otherwise returns the input. ----------------- -- Copy_Entity -- ----------------- function Copy_Entity (E : Entity_Id) return Entity_Id is New_Ent : Entity_Id; begin -- Build appropriate node case N_Entity (Nkind (E)) is when N_Defining_Identifier => New_Ent := New_Entity (N_Defining_Identifier, Sloc (E)); when N_Defining_Character_Literal => New_Ent := New_Entity (N_Defining_Character_Literal, Sloc (E)); when N_Defining_Operator_Symbol => New_Ent := New_Entity (N_Defining_Operator_Symbol, Sloc (E)); end case; Set_Chars (New_Ent, Chars (E)); -- Set_Comes_From_Source (New_Ent, Comes_From_Source (E)); return New_Ent; end Copy_Entity; --------------- -- Copy_List -- --------------- function Copy_List (List : List_Id) return List_Id is NL : List_Id; E : Node_Id; begin if List = No_List then return No_List; else NL := New_List; E := First (List); while Present (E) loop if Has_Extension (E) then Append (Copy_Entity (E), NL); else Append (Copy_Separate_Tree (E), NL); end if; Next (E); end loop; return NL; end if; end Copy_List; ------------------- -- Possible_Copy -- ------------------- function Possible_Copy (Field : Union_Id) return Union_Id is New_N : Union_Id; begin if Field in Node_Range then New_N := Union_Id (Copy_Separate_Tree (Node_Id (Field))); if Parent (Node_Id (Field)) = Source then Set_Parent (Node_Id (New_N), New_Id); end if; return New_N; elsif Field in List_Range then New_N := Union_Id (Copy_List (List_Id (Field))); if Parent (List_Id (Field)) = Source then Set_Parent (List_Id (New_N), New_Id); end if; return New_N; else return Field; end if; end Possible_Copy; -- Start of processing for Copy_Separate_Tree begin if Source <= Empty_Or_Error then return Source; elsif Has_Extension (Source) then return Copy_Entity (Source); else New_Id := New_Copy (Source); -- Recursively copy descendants Set_Field1 (New_Id, Possible_Copy (Field1 (New_Id))); Set_Field2 (New_Id, Possible_Copy (Field2 (New_Id))); Set_Field3 (New_Id, Possible_Copy (Field3 (New_Id))); Set_Field4 (New_Id, Possible_Copy (Field4 (New_Id))); Set_Field5 (New_Id, Possible_Copy (Field5 (New_Id))); -- Explicitly copy the aspect specifications as those do not reside -- in a node field. if Permits_Aspect_Specifications (Source) and then Has_Aspects (Source) then Set_Aspect_Specifications (New_Id, Copy_List (Aspect_Specifications (Source))); end if; -- Set Entity field to Empty to ensure that no entity references -- are shared between the two, if the source is already analyzed. if Nkind (New_Id) in N_Has_Entity or else Nkind (New_Id) = N_Freeze_Entity then Set_Entity (New_Id, Empty); end if; -- Reset all Etype fields and Analyzed flags, because input tree may -- have been fully or partially analyzed. if Nkind (New_Id) in N_Has_Etype then Set_Etype (New_Id, Empty); end if; Set_Analyzed (New_Id, False); -- Rather special case, if we have an expanded name, then change -- it back into a selected component, so that the tree looks the -- way it did coming out of the parser. This will change back -- when we analyze the selected component node. if Nkind (New_Id) = N_Expanded_Name then -- The following code is a bit kludgy. It would be cleaner to -- Add an entry Change_Expanded_Name_To_Selected_Component to -- Sinfo.CN, but that's an earthquake, because it has the wrong -- license, and Atree is used outside the compiler, e.g. in the -- binder and in ASIS, so we don't want to add that dependency. -- Consequently we have no choice but to hold our noses and do -- the change manually. At least we are Atree, so this odd use -- of Atree.Unchecked_Access is at least all in the family. -- Change the node type Atree.Unchecked_Access.Set_Nkind (New_Id, N_Selected_Component); -- Clear the Chars field which is not present in a selected -- component node, so we don't want a junk value around. Set_Node1 (New_Id, Empty); end if; -- All done, return copied node return New_Id; end if; end Copy_Separate_Tree; ----------- -- Ekind -- ----------- function Ekind (E : Entity_Id) return Entity_Kind is begin pragma Assert (Nkind (E) in N_Entity); return N_To_E (Nodes.Table (E + 1).Nkind); end Ekind; -------------- -- Ekind_In -- -------------- function Ekind_In (T : Entity_Kind; V1 : Entity_Kind; V2 : Entity_Kind) return Boolean is begin return T = V1 or else T = V2; end Ekind_In; function Ekind_In (T : Entity_Kind; V1 : Entity_Kind; V2 : Entity_Kind; V3 : Entity_Kind) return Boolean is begin return T = V1 or else T = V2 or else T = V3; end Ekind_In; function Ekind_In (T : Entity_Kind; V1 : Entity_Kind; V2 : Entity_Kind; V3 : Entity_Kind; V4 : Entity_Kind) return Boolean is begin return T = V1 or else T = V2 or else T = V3 or else T = V4; end Ekind_In; function Ekind_In (T : Entity_Kind; V1 : Entity_Kind; V2 : Entity_Kind; V3 : Entity_Kind; V4 : Entity_Kind; V5 : Entity_Kind) return Boolean is begin return T = V1 or else T = V2 or else T = V3 or else T = V4 or else T = V5; end Ekind_In; function Ekind_In (T : Entity_Kind; V1 : Entity_Kind; V2 : Entity_Kind; V3 : Entity_Kind; V4 : Entity_Kind; V5 : Entity_Kind; V6 : Entity_Kind) return Boolean is begin return T = V1 or else T = V2 or else T = V3 or else T = V4 or else T = V5 or else T = V6; end Ekind_In; function Ekind_In (T : Entity_Kind; V1 : Entity_Kind; V2 : Entity_Kind; V3 : Entity_Kind; V4 : Entity_Kind; V5 : Entity_Kind; V6 : Entity_Kind; V7 : Entity_Kind) return Boolean is begin return T = V1 or else T = V2 or else T = V3 or else T = V4 or else T = V5 or else T = V6 or else T = V7; end Ekind_In; function Ekind_In (T : Entity_Kind; V1 : Entity_Kind; V2 : Entity_Kind; V3 : Entity_Kind; V4 : Entity_Kind; V5 : Entity_Kind; V6 : Entity_Kind; V7 : Entity_Kind; V8 : Entity_Kind) return Boolean is begin return T = V1 or else T = V2 or else T = V3 or else T = V4 or else T = V5 or else T = V6 or else T = V7 or else T = V8; end Ekind_In; function Ekind_In (T : Entity_Kind; V1 : Entity_Kind; V2 : Entity_Kind; V3 : Entity_Kind; V4 : Entity_Kind; V5 : Entity_Kind; V6 : Entity_Kind; V7 : Entity_Kind; V8 : Entity_Kind; V9 : Entity_Kind) return Boolean is begin return T = V1 or else T = V2 or else T = V3 or else T = V4 or else T = V5 or else T = V6 or else T = V7 or else T = V8 or else T = V9; end Ekind_In; function Ekind_In (T : Entity_Kind; V1 : Entity_Kind; V2 : Entity_Kind; V3 : Entity_Kind; V4 : Entity_Kind; V5 : Entity_Kind; V6 : Entity_Kind; V7 : Entity_Kind; V8 : Entity_Kind; V9 : Entity_Kind; V10 : Entity_Kind) return Boolean is begin return T = V1 or else T = V2 or else T = V3 or else T = V4 or else T = V5 or else T = V6 or else T = V7 or else T = V8 or else T = V9 or else T = V10; end Ekind_In; function Ekind_In (T : Entity_Kind; V1 : Entity_Kind; V2 : Entity_Kind; V3 : Entity_Kind; V4 : Entity_Kind; V5 : Entity_Kind; V6 : Entity_Kind; V7 : Entity_Kind; V8 : Entity_Kind; V9 : Entity_Kind; V10 : Entity_Kind; V11 : Entity_Kind) return Boolean is begin return T = V1 or else T = V2 or else T = V3 or else T = V4 or else T = V5 or else T = V6 or else T = V7 or else T = V8 or else T = V9 or else T = V10 or else T = V11; end Ekind_In; function Ekind_In (E : Entity_Id; V1 : Entity_Kind; V2 : Entity_Kind) return Boolean is begin return Ekind_In (Ekind (E), V1, V2); end Ekind_In; function Ekind_In (E : Entity_Id; V1 : Entity_Kind; V2 : Entity_Kind; V3 : Entity_Kind) return Boolean is begin return Ekind_In (Ekind (E), V1, V2, V3); end Ekind_In; function Ekind_In (E : Entity_Id; V1 : Entity_Kind; V2 : Entity_Kind; V3 : Entity_Kind; V4 : Entity_Kind) return Boolean is begin return Ekind_In (Ekind (E), V1, V2, V3, V4); end Ekind_In; function Ekind_In (E : Entity_Id; V1 : Entity_Kind; V2 : Entity_Kind; V3 : Entity_Kind; V4 : Entity_Kind; V5 : Entity_Kind) return Boolean is begin return Ekind_In (Ekind (E), V1, V2, V3, V4, V5); end Ekind_In; function Ekind_In (E : Entity_Id; V1 : Entity_Kind; V2 : Entity_Kind; V3 : Entity_Kind; V4 : Entity_Kind; V5 : Entity_Kind; V6 : Entity_Kind) return Boolean is begin return Ekind_In (Ekind (E), V1, V2, V3, V4, V5, V6); end Ekind_In; function Ekind_In (E : Entity_Id; V1 : Entity_Kind; V2 : Entity_Kind; V3 : Entity_Kind; V4 : Entity_Kind; V5 : Entity_Kind; V6 : Entity_Kind; V7 : Entity_Kind) return Boolean is begin return Ekind_In (Ekind (E), V1, V2, V3, V4, V5, V6, V7); end Ekind_In; function Ekind_In (E : Entity_Id; V1 : Entity_Kind; V2 : Entity_Kind; V3 : Entity_Kind; V4 : Entity_Kind; V5 : Entity_Kind; V6 : Entity_Kind; V7 : Entity_Kind; V8 : Entity_Kind) return Boolean is begin return Ekind_In (Ekind (E), V1, V2, V3, V4, V5, V6, V7, V8); end Ekind_In; function Ekind_In (E : Entity_Id; V1 : Entity_Kind; V2 : Entity_Kind; V3 : Entity_Kind; V4 : Entity_Kind; V5 : Entity_Kind; V6 : Entity_Kind; V7 : Entity_Kind; V8 : Entity_Kind; V9 : Entity_Kind) return Boolean is begin return Ekind_In (Ekind (E), V1, V2, V3, V4, V5, V6, V7, V8, V9); end Ekind_In; function Ekind_In (E : Entity_Id; V1 : Entity_Kind; V2 : Entity_Kind; V3 : Entity_Kind; V4 : Entity_Kind; V5 : Entity_Kind; V6 : Entity_Kind; V7 : Entity_Kind; V8 : Entity_Kind; V9 : Entity_Kind; V10 : Entity_Kind) return Boolean is begin return Ekind_In (Ekind (E), V1, V2, V3, V4, V5, V6, V7, V8, V9, V10); end Ekind_In; function Ekind_In (E : Entity_Id; V1 : Entity_Kind; V2 : Entity_Kind; V3 : Entity_Kind; V4 : Entity_Kind; V5 : Entity_Kind; V6 : Entity_Kind; V7 : Entity_Kind; V8 : Entity_Kind; V9 : Entity_Kind; V10 : Entity_Kind; V11 : Entity_Kind) return Boolean is begin return Ekind_In (Ekind (E), V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11); end Ekind_In; ------------------------ -- Set_Reporting_Proc -- ------------------------ procedure Set_Reporting_Proc (P : Report_Proc) is begin pragma Assert (Reporting_Proc = null); Reporting_Proc := P; end Set_Reporting_Proc; ------------------ -- Error_Posted -- ------------------ function Error_Posted (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Error_Posted; end Error_Posted; ----------------------- -- Exchange_Entities -- ----------------------- procedure Exchange_Entities (E1 : Entity_Id; E2 : Entity_Id) is Temp_Ent : Node_Record; Temp_Flg : Flags_Byte; begin pragma Assert (True and then Has_Extension (E1) and then Has_Extension (E2) and then not Nodes.Table (E1).In_List and then not Nodes.Table (E2).In_List); -- Exchange the contents of the two entities for J in 0 .. Num_Extension_Nodes loop Temp_Ent := Nodes.Table (E1 + J); Nodes.Table (E1 + J) := Nodes.Table (E2 + J); Nodes.Table (E2 + J) := Temp_Ent; end loop; -- Exchange flag bytes for first component. No need to do the exchange -- for the other components, since the flag bytes are always zero. Temp_Flg := Flags.Table (E1); Flags.Table (E1) := Flags.Table (E2); Flags.Table (E2) := Temp_Flg; -- That exchange exchanged the parent pointers as well, which is what -- we want, but we need to patch up the defining identifier pointers -- in the parent nodes (the child pointers) to match this switch -- unless for Implicit types entities which have no parent, in which -- case we don't do anything otherwise we won't be able to revert back -- to the original situation. -- Shouldn't this use Is_Itype instead of the Parent test if Present (Parent (E1)) and then Present (Parent (E2)) then Set_Defining_Identifier (Parent (E1), E1); Set_Defining_Identifier (Parent (E2), E2); end if; end Exchange_Entities; ----------------- -- Extend_Node -- ----------------- function Extend_Node (Node : Node_Id) return Entity_Id is Result : Entity_Id; procedure Debug_Extend_Node; pragma Inline (Debug_Extend_Node); -- Debug routine for debug flag N ----------------------- -- Debug_Extend_Node -- ----------------------- procedure Debug_Extend_Node is begin if Debug_Flag_N then Write_Str ("Extend node "); Write_Int (Int (Node)); if Result = Node then Write_Str (" in place"); else Write_Str (" copied to "); Write_Int (Int (Result)); end if; -- Write_Eol; end if; end Debug_Extend_Node; -- Start of processing for Extend_Node begin pragma Assert (not (Has_Extension (Node))); Result := Allocate_Initialize_Node (Node, With_Extension => True); pragma Debug (Debug_Extend_Node); return Result; end Extend_Node; ----------------- -- Fix_Parents -- ----------------- procedure Fix_Parents (Ref_Node, Fix_Node : Node_Id) is procedure Fix_Parent (Field : Union_Id); -- Fix up one parent pointer. Field is checked to see if it points to -- a node, list, or element list that has a parent that points to -- Ref_Node. If so, the parent is reset to point to Fix_Node. ---------------- -- Fix_Parent -- ---------------- procedure Fix_Parent (Field : Union_Id) is begin -- Fix parent of node that is referenced by Field. Note that we must -- exclude the case where the node is a member of a list, because in -- this case the parent is the parent of the list. if Field in Node_Range and then Present (Node_Id (Field)) and then not Nodes.Table (Node_Id (Field)).In_List and then Parent (Node_Id (Field)) = Ref_Node then Set_Parent (Node_Id (Field), Fix_Node); -- Fix parent of list that is referenced by Field elsif Field in List_Range and then Present (List_Id (Field)) and then Parent (List_Id (Field)) = Ref_Node then Set_Parent (List_Id (Field), Fix_Node); end if; end Fix_Parent; -- Start of processing for Fix_Parents begin Fix_Parent (Field1 (Fix_Node)); Fix_Parent (Field2 (Fix_Node)); Fix_Parent (Field3 (Fix_Node)); Fix_Parent (Field4 (Fix_Node)); Fix_Parent (Field5 (Fix_Node)); end Fix_Parents; ------------------- -- Flags_Address -- ------------------- function Flags_Address return System.Address is begin return Flags.Table (First_Node_Id)'Address; end Flags_Address; ----------------------------------- -- Get_Comes_From_Source_Default -- ----------------------------------- function Get_Comes_From_Source_Default return Boolean is begin return Default_Node.Comes_From_Source; end Get_Comes_From_Source_Default; ----------------- -- Has_Aspects -- ----------------- function Has_Aspects (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Has_Aspects; end Has_Aspects; ------------------- -- Has_Extension -- ------------------- function Has_Extension (N : Node_Id) return Boolean is begin return N < Nodes.Last and then Nodes.Table (N + 1).Is_Extension; end Has_Extension; ---------------- -- Initialize -- ---------------- procedure Initialize is Dummy : Node_Id; pragma Warnings (Off, Dummy); begin Node_Count := 0; Atree_Private_Part.Nodes.Init; Atree_Private_Part.Flags.Init; Orig_Nodes.Init; Paren_Counts.Init; -- Allocate Empty node Dummy := New_Node (N_Empty, No_Location); Set_Name1 (Empty, No_Name); -- Allocate Error node, and set Error_Posted, since we certainly -- only generate an Error node if we do post some kind of error. Dummy := New_Node (N_Error, No_Location); Set_Name1 (Error, Error_Name); Set_Error_Posted (Error, True); end Initialize; --------------------------- -- Is_Ignored_Ghost_Node -- --------------------------- function Is_Ignored_Ghost_Node (N : Node_Id) return Boolean is begin return Flags.Table (N).Is_Ignored_Ghost_Node; end Is_Ignored_Ghost_Node; -------------------------- -- Is_Rewrite_Insertion -- -------------------------- function Is_Rewrite_Insertion (Node : Node_Id) return Boolean is begin return Nodes.Table (Node).Rewrite_Ins; end Is_Rewrite_Insertion; ----------------------------- -- Is_Rewrite_Substitution -- ----------------------------- function Is_Rewrite_Substitution (Node : Node_Id) return Boolean is begin return Orig_Nodes.Table (Node) /= Node; end Is_Rewrite_Substitution; ------------------ -- Last_Node_Id -- ------------------ function Last_Node_Id return Node_Id is begin return Nodes.Last; end Last_Node_Id; ---------- -- Lock -- ---------- procedure Lock is begin Nodes.Locked := True; Flags.Locked := True; Orig_Nodes.Locked := True; Nodes.Release; Flags.Release; Orig_Nodes.Release; end Lock; ---------------- -- Lock_Nodes -- ---------------- procedure Lock_Nodes is begin pragma Assert (not Locked); Locked := True; end Lock_Nodes; ------------------------- -- Mark_New_Ghost_Node -- ------------------------- procedure Mark_New_Ghost_Node (N : Node_Or_Entity_Id) is begin -- The Ghost node is created within a Ghost region if Ghost_Mode = Check then if Nkind (N) in N_Entity then Set_Is_Checked_Ghost_Entity (N); end if; elsif Ghost_Mode = Ignore then if Nkind (N) in N_Entity then Set_Is_Ignored_Ghost_Entity (N); end if; Set_Is_Ignored_Ghost_Node (N); end if; end Mark_New_Ghost_Node; ---------------------------- -- Mark_Rewrite_Insertion -- ---------------------------- procedure Mark_Rewrite_Insertion (New_Node : Node_Id) is begin Nodes.Table (New_Node).Rewrite_Ins := True; end Mark_Rewrite_Insertion; -------------- -- New_Copy -- -------------- function New_Copy (Source : Node_Id) return Node_Id is New_Id : Node_Id := Source; begin if Source > Empty_Or_Error then New_Id := Allocate_Initialize_Node (Source, Has_Extension (Source)); Nodes.Table (New_Id).Link := Empty_List_Or_Node; Nodes.Table (New_Id).In_List := False; -- If the original is marked as a rewrite insertion, then unmark the -- copy, since we inserted the original, not the copy. Nodes.Table (New_Id).Rewrite_Ins := False; pragma Debug (New_Node_Debugging_Output (New_Id)); -- Clear Is_Overloaded since we cannot have semantic interpretations -- of this new node. if Nkind (Source) in N_Subexpr then Set_Is_Overloaded (New_Id, False); end if; -- Always clear Has_Aspects, the caller must take care of copying -- aspects if this is required for the particular situation. Set_Has_Aspects (New_Id, False); -- Mark the copy as Ghost depending on the current Ghost region Mark_New_Ghost_Node (New_Id); end if; return New_Id; end New_Copy; ---------------- -- New_Entity -- ---------------- function New_Entity (New_Node_Kind : Node_Kind; New_Sloc : Source_Ptr) return Entity_Id is Ent : Entity_Id; begin pragma Assert (New_Node_Kind in N_Entity); Ent := Allocate_Initialize_Node (Empty, With_Extension => True); -- If this is a node with a real location and we are generating -- source nodes, then reset Current_Error_Node. This is useful -- if we bomb during parsing to get a error location for the bomb. if Default_Node.Comes_From_Source and then New_Sloc > No_Location then Current_Error_Node := Ent; end if; Nodes.Table (Ent).Nkind := New_Node_Kind; Nodes.Table (Ent).Sloc := New_Sloc; pragma Debug (New_Node_Debugging_Output (Ent)); -- Mark the new entity as Ghost depending on the current Ghost region Mark_New_Ghost_Node (Ent); return Ent; end New_Entity; -------------- -- New_Node -- -------------- function New_Node (New_Node_Kind : Node_Kind; New_Sloc : Source_Ptr) return Node_Id is Nod : Node_Id; begin pragma Assert (New_Node_Kind not in N_Entity); Nod := Allocate_Initialize_Node (Empty, With_Extension => False); Nodes.Table (Nod).Nkind := New_Node_Kind; Nodes.Table (Nod).Sloc := New_Sloc; pragma Debug (New_Node_Debugging_Output (Nod)); -- If this is a node with a real location and we are generating source -- nodes, then reset Current_Error_Node. This is useful if we bomb -- during parsing to get an error location for the bomb. if Default_Node.Comes_From_Source and then New_Sloc > No_Location then Current_Error_Node := Nod; end if; -- Mark the new node as Ghost depending on the current Ghost region Mark_New_Ghost_Node (Nod); return Nod; end New_Node; ------------------------- -- New_Node_Breakpoint -- ------------------------- procedure nn is begin Write_Str ("Watched node "); Write_Int (Int (Watch_Node)); Write_Str (" created"); Write_Eol; end nn; ------------------------------- -- New_Node_Debugging_Output -- ------------------------------- procedure nnd (N : Node_Id) is Node_Is_Watched : constant Boolean := N = Watch_Node; begin if Debug_Flag_N or else Node_Is_Watched then Node_Debug_Output ("Allocate", N); if Node_Is_Watched then New_Node_Breakpoint; end if; end if; end nnd; ----------- -- Nkind -- ----------- function Nkind (N : Node_Id) return Node_Kind is begin return Nodes.Table (N).Nkind; end Nkind; -------------- -- Nkind_In -- -------------- function Nkind_In (N : Node_Id; V1 : Node_Kind; V2 : Node_Kind) return Boolean is begin return Nkind_In (Nkind (N), V1, V2); end Nkind_In; function Nkind_In (N : Node_Id; V1 : Node_Kind; V2 : Node_Kind; V3 : Node_Kind) return Boolean is begin return Nkind_In (Nkind (N), V1, V2, V3); end Nkind_In; function Nkind_In (N : Node_Id; V1 : Node_Kind; V2 : Node_Kind; V3 : Node_Kind; V4 : Node_Kind) return Boolean is begin return Nkind_In (Nkind (N), V1, V2, V3, V4); end Nkind_In; function Nkind_In (N : Node_Id; V1 : Node_Kind; V2 : Node_Kind; V3 : Node_Kind; V4 : Node_Kind; V5 : Node_Kind) return Boolean is begin return Nkind_In (Nkind (N), V1, V2, V3, V4, V5); end Nkind_In; function Nkind_In (N : Node_Id; V1 : Node_Kind; V2 : Node_Kind; V3 : Node_Kind; V4 : Node_Kind; V5 : Node_Kind; V6 : Node_Kind) return Boolean is begin return Nkind_In (Nkind (N), V1, V2, V3, V4, V5, V6); end Nkind_In; function Nkind_In (N : Node_Id; V1 : Node_Kind; V2 : Node_Kind; V3 : Node_Kind; V4 : Node_Kind; V5 : Node_Kind; V6 : Node_Kind; V7 : Node_Kind) return Boolean is begin return Nkind_In (Nkind (N), V1, V2, V3, V4, V5, V6, V7); end Nkind_In; function Nkind_In (N : Node_Id; V1 : Node_Kind; V2 : Node_Kind; V3 : Node_Kind; V4 : Node_Kind; V5 : Node_Kind; V6 : Node_Kind; V7 : Node_Kind; V8 : Node_Kind) return Boolean is begin return Nkind_In (Nkind (N), V1, V2, V3, V4, V5, V6, V7, V8); end Nkind_In; function Nkind_In (N : Node_Id; V1 : Node_Kind; V2 : Node_Kind; V3 : Node_Kind; V4 : Node_Kind; V5 : Node_Kind; V6 : Node_Kind; V7 : Node_Kind; V8 : Node_Kind; V9 : Node_Kind) return Boolean is begin return Nkind_In (Nkind (N), V1, V2, V3, V4, V5, V6, V7, V8, V9); end Nkind_In; -------- -- No -- -------- function No (N : Node_Id) return Boolean is begin return N = Empty; end No; ----------------------- -- Node_Debug_Output -- ----------------------- procedure Node_Debug_Output (Op : String; N : Node_Id) is begin Write_Str (Op); if Nkind (N) in N_Entity then Write_Str (" entity"); else Write_Str (" node"); end if; Write_Str (" Id = "); Write_Int (Int (N)); Write_Str (" "); Write_Location (Sloc (N)); Write_Str (" "); Write_Str (Node_Kind'Image (Nkind (N))); Write_Eol; end Node_Debug_Output; ------------------- -- Nodes_Address -- ------------------- function Nodes_Address return System.Address is begin return Nodes.Table (First_Node_Id)'Address; end Nodes_Address; --------------- -- Num_Nodes -- --------------- function Num_Nodes return Nat is begin return Node_Count; end Num_Nodes; ------------------- -- Original_Node -- ------------------- function Original_Node (Node : Node_Id) return Node_Id is begin return Orig_Nodes.Table (Node); end Original_Node; ----------------- -- Paren_Count -- ----------------- function Paren_Count (N : Node_Id) return Nat is C : Nat := 0; begin pragma Assert (N <= Nodes.Last); if Nodes.Table (N).Pflag1 then C := C + 1; end if; if Nodes.Table (N).Pflag2 then C := C + 2; end if; -- Value of 0,1,2 returned as is if C <= 2 then return C; -- Value of 3 means we search the table, and we must find an entry else for J in Paren_Counts.First .. Paren_Counts.Last loop if N = Paren_Counts.Table (J).Nod then return Paren_Counts.Table (J).Count; end if; end loop; raise Program_Error; end if; end Paren_Count; ------------ -- Parent -- ------------ function Parent (N : Node_Id) return Node_Id is begin if Is_List_Member (N) then return Parent (List_Containing (N)); else return Node_Id (Nodes.Table (N).Link); end if; end Parent; ------------- -- Present -- ------------- function Present (N : Node_Id) return Boolean is begin return N /= Empty; end Present; -------------------------------- -- Preserve_Comes_From_Source -- -------------------------------- procedure Preserve_Comes_From_Source (NewN, OldN : Node_Id) is begin Nodes.Table (NewN).Comes_From_Source := Nodes.Table (OldN).Comes_From_Source; end Preserve_Comes_From_Source; ---------------------- -- Print_Statistics -- ---------------------- procedure Print_Statistics is N_Count : constant Natural := Natural (Nodes.Last - First_Node_Id + 1); E_Count : Natural := 0; begin Write_Str ("Number of entities: "); Write_Eol; declare function CP_Lt (Op1, Op2 : Natural) return Boolean; -- Compare routine for Sort procedure CP_Move (From : Natural; To : Natural); -- Move routine for Sort Kind_Count : array (Node_Kind) of Natural := (others => 0); -- Array of occurrence count per node kind Kind_Max : constant Natural := Node_Kind'Pos (N_Unused_At_End) - 1; -- The index of the largest (interesting) node kind Ranking : array (0 .. Kind_Max) of Node_Kind; -- Ranking array for node kinds (index 0 is used for the temporary) package Sorting is new GNAT.Heap_Sort_G (CP_Move, CP_Lt); function CP_Lt (Op1, Op2 : Natural) return Boolean is begin return Kind_Count (Ranking (Op2)) < Kind_Count (Ranking (Op1)); end CP_Lt; procedure CP_Move (From : Natural; To : Natural) is begin Ranking (To) := Ranking (From); end CP_Move; begin -- Count the number of occurrences of each node kind for I in First_Node_Id .. Nodes.Last loop declare Nkind : constant Node_Kind := Nodes.Table (I).Nkind; begin if not Nodes.Table (I).Is_Extension then Kind_Count (Nkind) := Kind_Count (Nkind) + 1; end if; end; end loop; -- Sort the node kinds by number of occurrences for N in 1 .. Kind_Max loop Ranking (N) := Node_Kind'Val (N); end loop; Sorting.Sort (Kind_Max); -- Print the list in descending order for N in 1 .. Kind_Max loop declare Count : constant Natural := Kind_Count (Ranking (N)); begin if Count > 0 then Write_Str (" "); Write_Str (Node_Kind'Image (Ranking (N))); Write_Str (": "); Write_Int (Int (Count)); Write_Eol; E_Count := E_Count + Count; end if; end; end loop; end; Write_Str ("Total number of entities: "); Write_Int (Int (E_Count)); Write_Eol; Write_Str ("Maximum number of nodes per entity: "); Write_Int (Int (Num_Extension_Nodes + 1)); Write_Eol; Write_Str ("Number of allocated nodes: "); Write_Int (Int (N_Count)); Write_Eol; Write_Str ("Ratio allocated nodes/entities: "); Write_Int (Int (Long_Long_Integer (N_Count) * 100 / Long_Long_Integer (E_Count))); Write_Str ("/100"); Write_Eol; Write_Str ("Size of a node in bytes: "); Write_Int (Int (Node_Record'Size) / Storage_Unit); Write_Eol; Write_Str ("Memory consumption in bytes: "); Write_Int (Int (Long_Long_Integer (N_Count) * (Node_Record'Size / Storage_Unit))); Write_Eol; end Print_Statistics; ------------------- -- Relocate_Node -- ------------------- function Relocate_Node (Source : Node_Id) return Node_Id is New_Node : Node_Id; begin if No (Source) then return Empty; end if; New_Node := New_Copy (Source); Fix_Parents (Ref_Node => Source, Fix_Node => New_Node); -- We now set the parent of the new node to be the same as the parent of -- the source. Almost always this parent will be replaced by a new value -- when the relocated node is reattached to the tree, but by doing it -- now, we ensure that this node is not even temporarily disconnected -- from the tree. Note that this does not happen free, because in the -- list case, the parent does not get set. Set_Parent (New_Node, Parent (Source)); -- If the node being relocated was a rewriting of some original node, -- then the relocated node has the same original node. if Orig_Nodes.Table (Source) /= Source then Orig_Nodes.Table (New_Node) := Orig_Nodes.Table (Source); end if; return New_Node; end Relocate_Node; ------------- -- Replace -- ------------- procedure Replace (Old_Node, New_Node : Node_Id) is Old_Post : constant Boolean := Nodes.Table (Old_Node).Error_Posted; Old_HasA : constant Boolean := Nodes.Table (Old_Node).Has_Aspects; Old_CFS : constant Boolean := Nodes.Table (Old_Node).Comes_From_Source; begin pragma Assert (not Has_Extension (Old_Node) and not Has_Extension (New_Node) and not Nodes.Table (New_Node).In_List); -- Do copy, preserving link and in list status and required flags Copy_Node (Source => New_Node, Destination => Old_Node); Nodes.Table (Old_Node).Comes_From_Source := Old_CFS; Nodes.Table (Old_Node).Error_Posted := Old_Post; Nodes.Table (Old_Node).Has_Aspects := Old_HasA; -- Fix parents of substituted node, since it has changed identity Fix_Parents (Ref_Node => New_Node, Fix_Node => Old_Node); -- Since we are doing a replace, we assume that the original node -- is intended to become the new replaced node. The call would be -- to Rewrite if there were an intention to save the original node. Orig_Nodes.Table (Old_Node) := Old_Node; -- Invoke the reporting procedure (if available) if Reporting_Proc /= null then Reporting_Proc.all (Target => Old_Node, Source => New_Node); end if; end Replace; ------------- -- Rewrite -- ------------- procedure Rewrite (Old_Node, New_Node : Node_Id) is Old_Error_P : constant Boolean := Nodes.Table (Old_Node).Error_Posted; -- This field is always preserved in the new node Old_Has_Aspects : constant Boolean := Nodes.Table (Old_Node).Has_Aspects; -- This field is always preserved in the new node Old_Paren_Count : Nat; Old_Must_Not_Freeze : Boolean; -- These fields are preserved in the new node only if the new node -- and the old node are both subexpression nodes. -- Note: it is a violation of abstraction levels for Must_Not_Freeze -- to be referenced like this. ??? Sav_Node : Node_Id; begin pragma Assert (not Has_Extension (Old_Node) and not Has_Extension (New_Node) and not Nodes.Table (New_Node).In_List); pragma Debug (Rewrite_Debugging_Output (Old_Node, New_Node)); if Nkind (Old_Node) in N_Subexpr then Old_Paren_Count := Paren_Count (Old_Node); Old_Must_Not_Freeze := Must_Not_Freeze (Old_Node); else Old_Paren_Count := 0; Old_Must_Not_Freeze := False; end if; -- Allocate a new node, to be used to preserve the original contents -- of the Old_Node, for possible later retrival by Original_Node and -- make an entry in the Orig_Nodes table. This is only done if we have -- not already rewritten the node, as indicated by an Orig_Nodes entry -- that does not reference the Old_Node. if Orig_Nodes.Table (Old_Node) = Old_Node then Sav_Node := New_Copy (Old_Node); Orig_Nodes.Table (Sav_Node) := Sav_Node; Orig_Nodes.Table (Old_Node) := Sav_Node; -- Both the old and new copies of the node will share the same list -- of aspect specifications if aspect specifications are present. if Old_Has_Aspects then Set_Aspect_Specifications (Sav_Node, Aspect_Specifications (Old_Node)); end if; end if; -- Copy substitute node into place, preserving old fields as required Copy_Node (Source => New_Node, Destination => Old_Node); Nodes.Table (Old_Node).Error_Posted := Old_Error_P; Nodes.Table (Old_Node).Has_Aspects := Old_Has_Aspects; if Nkind (New_Node) in N_Subexpr then Set_Paren_Count (Old_Node, Old_Paren_Count); Set_Must_Not_Freeze (Old_Node, Old_Must_Not_Freeze); end if; Fix_Parents (Ref_Node => New_Node, Fix_Node => Old_Node); -- Invoke the reporting procedure (if available) if Reporting_Proc /= null then Reporting_Proc.all (Target => Old_Node, Source => New_Node); end if; end Rewrite; ------------------------- -- Rewrite_Breakpoint -- ------------------------- procedure rr is begin Write_Str ("Watched node "); Write_Int (Int (Watch_Node)); Write_Str (" rewritten"); Write_Eol; end rr; ------------------------------ -- Rewrite_Debugging_Output -- ------------------------------ procedure rrd (Old_Node, New_Node : Node_Id) is Node_Is_Watched : constant Boolean := Old_Node = Watch_Node; begin if Debug_Flag_N or else Node_Is_Watched then Node_Debug_Output ("Rewrite", Old_Node); Node_Debug_Output ("into", New_Node); if Node_Is_Watched then Rewrite_Breakpoint; end if; end if; end rrd; ------------------ -- Set_Analyzed -- ------------------ procedure Set_Analyzed (N : Node_Id; Val : Boolean := True) is begin pragma Assert (not Locked); Nodes.Table (N).Analyzed := Val; end Set_Analyzed; ----------------------- -- Set_Check_Actuals -- ----------------------- procedure Set_Check_Actuals (N : Node_Id; Val : Boolean := True) is begin pragma Assert (not Locked); Flags.Table (N).Check_Actuals := Val; end Set_Check_Actuals; --------------------------- -- Set_Comes_From_Source -- --------------------------- procedure Set_Comes_From_Source (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Comes_From_Source := Val; end Set_Comes_From_Source; ----------------------------------- -- Set_Comes_From_Source_Default -- ----------------------------------- procedure Set_Comes_From_Source_Default (Default : Boolean) is begin Default_Node.Comes_From_Source := Default; end Set_Comes_From_Source_Default; --------------- -- Set_Ekind -- --------------- procedure Set_Ekind (E : Entity_Id; Val : Entity_Kind) is begin pragma Assert (not Locked); pragma Assert (Nkind (E) in N_Entity); Nodes.Table (E + 1).Nkind := E_To_N (Val); end Set_Ekind; ---------------------- -- Set_Error_Posted -- ---------------------- procedure Set_Error_Posted (N : Node_Id; Val : Boolean := True) is begin pragma Assert (not Locked); Nodes.Table (N).Error_Posted := Val; end Set_Error_Posted; --------------------- -- Set_Has_Aspects -- --------------------- procedure Set_Has_Aspects (N : Node_Id; Val : Boolean := True) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Has_Aspects := Val; end Set_Has_Aspects; ------------------------------- -- Set_Is_Ignored_Ghost_Node -- ------------------------------- procedure Set_Is_Ignored_Ghost_Node (N : Node_Id; Val : Boolean := True) is begin pragma Assert (not Locked); Flags.Table (N).Is_Ignored_Ghost_Node := Val; end Set_Is_Ignored_Ghost_Node; ----------------------- -- Set_Original_Node -- ----------------------- procedure Set_Original_Node (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); Orig_Nodes.Table (N) := Val; end Set_Original_Node; --------------------- -- Set_Paren_Count -- --------------------- procedure Set_Paren_Count (N : Node_Id; Val : Nat) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Subexpr); -- Value of 0,1,2 stored as is if Val <= 2 then Nodes.Table (N).Pflag1 := (Val mod 2 /= 0); Nodes.Table (N).Pflag2 := (Val = 2); -- Value of 3 or greater stores 3 in node and makes table entry else Nodes.Table (N).Pflag1 := True; Nodes.Table (N).Pflag2 := True; for J in Paren_Counts.First .. Paren_Counts.Last loop if N = Paren_Counts.Table (J).Nod then Paren_Counts.Table (J).Count := Val; return; end if; end loop; Paren_Counts.Append ((Nod => N, Count => Val)); end if; end Set_Paren_Count; ---------------- -- Set_Parent -- ---------------- procedure Set_Parent (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (not Nodes.Table (N).In_List); Nodes.Table (N).Link := Union_Id (Val); end Set_Parent; -------------- -- Set_Sloc -- -------------- procedure Set_Sloc (N : Node_Id; Val : Source_Ptr) is begin pragma Assert (not Locked); Nodes.Table (N).Sloc := Val; end Set_Sloc; ---------- -- Sloc -- ---------- function Sloc (N : Node_Id) return Source_Ptr is begin return Nodes.Table (N).Sloc; end Sloc; ------------------- -- Traverse_Func -- ------------------- function Traverse_Func (Node : Node_Id) return Traverse_Final_Result is function Traverse_Field (Nod : Node_Id; Fld : Union_Id; FN : Field_Num) return Traverse_Final_Result; -- Fld is one of the fields of Nod. If the field points to syntactic -- node or list, then this node or list is traversed, and the result is -- the result of this traversal. Otherwise a value of True is returned -- with no processing. FN is the number of the field (1 .. 5). -------------------- -- Traverse_Field -- -------------------- function Traverse_Field (Nod : Node_Id; Fld : Union_Id; FN : Field_Num) return Traverse_Final_Result is begin if Fld = Union_Id (Empty) then return OK; -- Descendant is a node elsif Fld in Node_Range then -- Traverse descendant that is syntactic subtree node if Is_Syntactic_Field (Nkind (Nod), FN) then return Traverse_Func (Node_Id (Fld)); -- Node that is not a syntactic subtree else return OK; end if; -- Descendant is a list elsif Fld in List_Range then -- Traverse descendant that is a syntactic subtree list if Is_Syntactic_Field (Nkind (Nod), FN) then declare Elmt : Node_Id := First (List_Id (Fld)); begin while Present (Elmt) loop if Traverse_Func (Elmt) = Abandon then return Abandon; else Next (Elmt); end if; end loop; return OK; end; -- List that is not a syntactic subtree else return OK; end if; -- Field was not a node or a list else return OK; end if; end Traverse_Field; Cur_Node : Node_Id := Node; -- Start of processing for Traverse_Func begin -- We walk Field2 last, and if it is a node, we eliminate the tail -- recursion by jumping back to this label. This is because Field2 is -- where the Left_Opnd field of N_Op_Concat is stored, and in practice -- concatenations are sometimes deeply nested, as in X1&X2&...&XN. This -- trick prevents us from running out of memory in that case. We don't -- bother eliminating the tail recursion if Field2 is a list. <<Tail_Recurse>> case Process (Cur_Node) is when Abandon => return Abandon; when Skip => return OK; when OK => null; when OK_Orig => Cur_Node := Original_Node (Cur_Node); end case; if Traverse_Field (Cur_Node, Field1 (Cur_Node), 1) = Abandon or else -- skip Field2 here Traverse_Field (Cur_Node, Field3 (Cur_Node), 3) = Abandon or else Traverse_Field (Cur_Node, Field4 (Cur_Node), 4) = Abandon or else Traverse_Field (Cur_Node, Field5 (Cur_Node), 5) = Abandon then return Abandon; end if; if Field2 (Cur_Node) not in Node_Range then return Traverse_Field (Cur_Node, Field2 (Cur_Node), 2); elsif Is_Syntactic_Field (Nkind (Cur_Node), 2) and then Field2 (Cur_Node) /= Empty_List_Or_Node then -- Here is the tail recursion step, we reset Cur_Node and jump back -- to the start of the procedure, which has the same semantic effect -- as a call. Cur_Node := Node_Id (Field2 (Cur_Node)); goto Tail_Recurse; end if; return OK; end Traverse_Func; ------------------- -- Traverse_Proc -- ------------------- procedure Traverse_Proc (Node : Node_Id) is function Traverse is new Traverse_Func (Process); Discard : Traverse_Final_Result; pragma Warnings (Off, Discard); begin Discard := Traverse (Node); end Traverse_Proc; --------------- -- Tree_Read -- --------------- procedure Tree_Read is begin Tree_Read_Int (Node_Count); Nodes.Tree_Read; Flags.Tree_Read; Orig_Nodes.Tree_Read; Paren_Counts.Tree_Read; end Tree_Read; ---------------- -- Tree_Write -- ---------------- procedure Tree_Write is begin Tree_Write_Int (Node_Count); Nodes.Tree_Write; Flags.Tree_Write; Orig_Nodes.Tree_Write; Paren_Counts.Tree_Write; end Tree_Write; ------------------------------ -- Unchecked Access Package -- ------------------------------ package body Unchecked_Access is function Field1 (N : Node_Id) return Union_Id is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Field1; end Field1; function Field2 (N : Node_Id) return Union_Id is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Field2; end Field2; function Field3 (N : Node_Id) return Union_Id is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Field3; end Field3; function Field4 (N : Node_Id) return Union_Id is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Field4; end Field4; function Field5 (N : Node_Id) return Union_Id is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Field5; end Field5; function Field6 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Field6; end Field6; function Field7 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Field7; end Field7; function Field8 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Field8; end Field8; function Field9 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Field9; end Field9; function Field10 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Field10; end Field10; function Field11 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Field11; end Field11; function Field12 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Field12; end Field12; function Field13 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Field6; end Field13; function Field14 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Field7; end Field14; function Field15 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Field8; end Field15; function Field16 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Field9; end Field16; function Field17 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Field10; end Field17; function Field18 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Field11; end Field18; function Field19 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Field6; end Field19; function Field20 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Field7; end Field20; function Field21 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Field8; end Field21; function Field22 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Field9; end Field22; function Field23 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Field10; end Field23; function Field24 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Field6; end Field24; function Field25 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Field7; end Field25; function Field26 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Field8; end Field26; function Field27 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Field9; end Field27; function Field28 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Field10; end Field28; function Field29 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Field11; end Field29; function Field30 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Field6; end Field30; function Field31 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Field7; end Field31; function Field32 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Field8; end Field32; function Field33 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Field9; end Field33; function Field34 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Field10; end Field34; function Field35 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Field11; end Field35; function Field36 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 6).Field6; end Field36; function Field37 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 6).Field7; end Field37; function Field38 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 6).Field8; end Field38; function Field39 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 6).Field9; end Field39; function Field40 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 6).Field10; end Field40; function Field41 (N : Node_Id) return Union_Id is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 6).Field11; end Field41; function Node1 (N : Node_Id) return Node_Id is begin pragma Assert (N <= Nodes.Last); return Node_Id (Nodes.Table (N).Field1); end Node1; function Node2 (N : Node_Id) return Node_Id is begin pragma Assert (N <= Nodes.Last); return Node_Id (Nodes.Table (N).Field2); end Node2; function Node3 (N : Node_Id) return Node_Id is begin pragma Assert (N <= Nodes.Last); return Node_Id (Nodes.Table (N).Field3); end Node3; function Node4 (N : Node_Id) return Node_Id is begin pragma Assert (N <= Nodes.Last); return Node_Id (Nodes.Table (N).Field4); end Node4; function Node5 (N : Node_Id) return Node_Id is begin pragma Assert (N <= Nodes.Last); return Node_Id (Nodes.Table (N).Field5); end Node5; function Node6 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 1).Field6); end Node6; function Node7 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 1).Field7); end Node7; function Node8 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 1).Field8); end Node8; function Node9 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 1).Field9); end Node9; function Node10 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 1).Field10); end Node10; function Node11 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 1).Field11); end Node11; function Node12 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 1).Field12); end Node12; function Node13 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 2).Field6); end Node13; function Node14 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 2).Field7); end Node14; function Node15 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 2).Field8); end Node15; function Node16 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 2).Field9); end Node16; function Node17 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 2).Field10); end Node17; function Node18 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 2).Field11); end Node18; function Node19 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 3).Field6); end Node19; function Node20 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 3).Field7); end Node20; function Node21 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 3).Field8); end Node21; function Node22 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 3).Field9); end Node22; function Node23 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 3).Field10); end Node23; function Node24 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 4).Field6); end Node24; function Node25 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 4).Field7); end Node25; function Node26 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 4).Field8); end Node26; function Node27 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 4).Field9); end Node27; function Node28 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 4).Field10); end Node28; function Node29 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 4).Field11); end Node29; function Node30 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 5).Field6); end Node30; function Node31 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 5).Field7); end Node31; function Node32 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 5).Field8); end Node32; function Node33 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 5).Field9); end Node33; function Node34 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 5).Field10); end Node34; function Node35 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 5).Field11); end Node35; function Node36 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 6).Field6); end Node36; function Node37 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 6).Field7); end Node37; function Node38 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 6).Field8); end Node38; function Node39 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 6).Field9); end Node39; function Node40 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 6).Field10); end Node40; function Node41 (N : Node_Id) return Node_Id is begin pragma Assert (Nkind (N) in N_Entity); return Node_Id (Nodes.Table (N + 6).Field11); end Node41; function List1 (N : Node_Id) return List_Id is begin pragma Assert (N <= Nodes.Last); return List_Id (Nodes.Table (N).Field1); end List1; function List2 (N : Node_Id) return List_Id is begin pragma Assert (N <= Nodes.Last); return List_Id (Nodes.Table (N).Field2); end List2; function List3 (N : Node_Id) return List_Id is begin pragma Assert (N <= Nodes.Last); return List_Id (Nodes.Table (N).Field3); end List3; function List4 (N : Node_Id) return List_Id is begin pragma Assert (N <= Nodes.Last); return List_Id (Nodes.Table (N).Field4); end List4; function List5 (N : Node_Id) return List_Id is begin pragma Assert (N <= Nodes.Last); return List_Id (Nodes.Table (N).Field5); end List5; function List10 (N : Node_Id) return List_Id is begin pragma Assert (Nkind (N) in N_Entity); return List_Id (Nodes.Table (N + 1).Field10); end List10; function List14 (N : Node_Id) return List_Id is begin pragma Assert (Nkind (N) in N_Entity); return List_Id (Nodes.Table (N + 2).Field7); end List14; function List25 (N : Node_Id) return List_Id is begin pragma Assert (Nkind (N) in N_Entity); return List_Id (Nodes.Table (N + 4).Field7); end List25; function List38 (N : Node_Id) return List_Id is begin return List_Id (Nodes.Table (N + 6).Field8); end List38; function List39 (N : Node_Id) return List_Id is begin return List_Id (Nodes.Table (N + 6).Field9); end List39; function Elist1 (N : Node_Id) return Elist_Id is pragma Assert (N <= Nodes.Last); Value : constant Union_Id := Nodes.Table (N).Field1; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist1; function Elist2 (N : Node_Id) return Elist_Id is pragma Assert (N <= Nodes.Last); Value : constant Union_Id := Nodes.Table (N).Field2; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist2; function Elist3 (N : Node_Id) return Elist_Id is pragma Assert (N <= Nodes.Last); Value : constant Union_Id := Nodes.Table (N).Field3; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist3; function Elist4 (N : Node_Id) return Elist_Id is pragma Assert (N <= Nodes.Last); Value : constant Union_Id := Nodes.Table (N).Field4; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist4; function Elist5 (N : Node_Id) return Elist_Id is pragma Assert (N <= Nodes.Last); Value : constant Union_Id := Nodes.Table (N).Field5; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist5; function Elist8 (N : Node_Id) return Elist_Id is pragma Assert (Nkind (N) in N_Entity); Value : constant Union_Id := Nodes.Table (N + 1).Field8; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist8; function Elist9 (N : Node_Id) return Elist_Id is pragma Assert (Nkind (N) in N_Entity); Value : constant Union_Id := Nodes.Table (N + 1).Field9; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist9; function Elist10 (N : Node_Id) return Elist_Id is pragma Assert (Nkind (N) in N_Entity); Value : constant Union_Id := Nodes.Table (N + 1).Field10; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist10; function Elist11 (N : Node_Id) return Elist_Id is pragma Assert (Nkind (N) in N_Entity); Value : constant Union_Id := Nodes.Table (N + 1).Field11; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist11; function Elist13 (N : Node_Id) return Elist_Id is pragma Assert (Nkind (N) in N_Entity); Value : constant Union_Id := Nodes.Table (N + 2).Field6; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist13; function Elist15 (N : Node_Id) return Elist_Id is pragma Assert (Nkind (N) in N_Entity); Value : constant Union_Id := Nodes.Table (N + 2).Field8; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist15; function Elist16 (N : Node_Id) return Elist_Id is pragma Assert (Nkind (N) in N_Entity); Value : constant Union_Id := Nodes.Table (N + 2).Field9; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist16; function Elist18 (N : Node_Id) return Elist_Id is pragma Assert (Nkind (N) in N_Entity); Value : constant Union_Id := Nodes.Table (N + 2).Field11; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist18; function Elist21 (N : Node_Id) return Elist_Id is pragma Assert (Nkind (N) in N_Entity); Value : constant Union_Id := Nodes.Table (N + 3).Field8; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist21; function Elist23 (N : Node_Id) return Elist_Id is pragma Assert (Nkind (N) in N_Entity); Value : constant Union_Id := Nodes.Table (N + 3).Field10; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist23; function Elist24 (N : Node_Id) return Elist_Id is pragma Assert (Nkind (N) in N_Entity); Value : constant Union_Id := Nodes.Table (N + 4).Field6; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist24; function Elist25 (N : Node_Id) return Elist_Id is pragma Assert (Nkind (N) in N_Entity); Value : constant Union_Id := Nodes.Table (N + 4).Field7; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist25; function Elist26 (N : Node_Id) return Elist_Id is pragma Assert (Nkind (N) in N_Entity); Value : constant Union_Id := Nodes.Table (N + 4).Field8; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist26; function Elist29 (N : Node_Id) return Elist_Id is pragma Assert (Nkind (N) in N_Entity); Value : constant Union_Id := Nodes.Table (N + 4).Field11; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist29; function Elist36 (N : Node_Id) return Elist_Id is pragma Assert (Nkind (N) in N_Entity); Value : constant Union_Id := Nodes.Table (N + 6).Field6; begin if Value = 0 then return No_Elist; else return Elist_Id (Value); end if; end Elist36; function Name1 (N : Node_Id) return Name_Id is begin pragma Assert (N <= Nodes.Last); return Name_Id (Nodes.Table (N).Field1); end Name1; function Name2 (N : Node_Id) return Name_Id is begin pragma Assert (N <= Nodes.Last); return Name_Id (Nodes.Table (N).Field2); end Name2; function Str3 (N : Node_Id) return String_Id is begin pragma Assert (N <= Nodes.Last); return String_Id (Nodes.Table (N).Field3); end Str3; function Uint2 (N : Node_Id) return Uint is pragma Assert (N <= Nodes.Last); U : constant Union_Id := Nodes.Table (N).Field2; begin if U = 0 then return Uint_0; else return From_Union (U); end if; end Uint2; function Uint3 (N : Node_Id) return Uint is pragma Assert (N <= Nodes.Last); U : constant Union_Id := Nodes.Table (N).Field3; begin if U = 0 then return Uint_0; else return From_Union (U); end if; end Uint3; function Uint4 (N : Node_Id) return Uint is pragma Assert (N <= Nodes.Last); U : constant Union_Id := Nodes.Table (N).Field4; begin if U = 0 then return Uint_0; else return From_Union (U); end if; end Uint4; function Uint5 (N : Node_Id) return Uint is pragma Assert (N <= Nodes.Last); U : constant Union_Id := Nodes.Table (N).Field5; begin if U = 0 then return Uint_0; else return From_Union (U); end if; end Uint5; function Uint8 (N : Node_Id) return Uint is pragma Assert (Nkind (N) in N_Entity); U : constant Union_Id := Nodes.Table (N + 1).Field8; begin if U = 0 then return Uint_0; else return From_Union (U); end if; end Uint8; function Uint9 (N : Node_Id) return Uint is pragma Assert (Nkind (N) in N_Entity); U : constant Union_Id := Nodes.Table (N + 1).Field9; begin if U = 0 then return Uint_0; else return From_Union (U); end if; end Uint9; function Uint10 (N : Node_Id) return Uint is pragma Assert (Nkind (N) in N_Entity); U : constant Union_Id := Nodes.Table (N + 1).Field10; begin if U = 0 then return Uint_0; else return From_Union (U); end if; end Uint10; function Uint11 (N : Node_Id) return Uint is pragma Assert (Nkind (N) in N_Entity); U : constant Union_Id := Nodes.Table (N + 1).Field11; begin if U = 0 then return Uint_0; else return From_Union (U); end if; end Uint11; function Uint12 (N : Node_Id) return Uint is pragma Assert (Nkind (N) in N_Entity); U : constant Union_Id := Nodes.Table (N + 1).Field12; begin if U = 0 then return Uint_0; else return From_Union (U); end if; end Uint12; function Uint13 (N : Node_Id) return Uint is pragma Assert (Nkind (N) in N_Entity); U : constant Union_Id := Nodes.Table (N + 2).Field6; begin if U = 0 then return Uint_0; else return From_Union (U); end if; end Uint13; function Uint14 (N : Node_Id) return Uint is pragma Assert (Nkind (N) in N_Entity); U : constant Union_Id := Nodes.Table (N + 2).Field7; begin if U = 0 then return Uint_0; else return From_Union (U); end if; end Uint14; function Uint15 (N : Node_Id) return Uint is pragma Assert (Nkind (N) in N_Entity); U : constant Union_Id := Nodes.Table (N + 2).Field8; begin if U = 0 then return Uint_0; else return From_Union (U); end if; end Uint15; function Uint16 (N : Node_Id) return Uint is pragma Assert (Nkind (N) in N_Entity); U : constant Union_Id := Nodes.Table (N + 2).Field9; begin if U = 0 then return Uint_0; else return From_Union (U); end if; end Uint16; function Uint17 (N : Node_Id) return Uint is pragma Assert (Nkind (N) in N_Entity); U : constant Union_Id := Nodes.Table (N + 2).Field10; begin if U = 0 then return Uint_0; else return From_Union (U); end if; end Uint17; function Uint22 (N : Node_Id) return Uint is pragma Assert (Nkind (N) in N_Entity); U : constant Union_Id := Nodes.Table (N + 3).Field9; begin if U = 0 then return Uint_0; else return From_Union (U); end if; end Uint22; function Uint24 (N : Node_Id) return Uint is pragma Assert (Nkind (N) in N_Entity); U : constant Union_Id := Nodes.Table (N + 4).Field6; begin if U = 0 then return Uint_0; else return From_Union (U); end if; end Uint24; function Ureal3 (N : Node_Id) return Ureal is begin pragma Assert (N <= Nodes.Last); return From_Union (Nodes.Table (N).Field3); end Ureal3; function Ureal18 (N : Node_Id) return Ureal is begin pragma Assert (Nkind (N) in N_Entity); return From_Union (Nodes.Table (N + 2).Field11); end Ureal18; function Ureal21 (N : Node_Id) return Ureal is begin pragma Assert (Nkind (N) in N_Entity); return From_Union (Nodes.Table (N + 3).Field8); end Ureal21; function Flag0 (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Flags.Table (N).Flag0; end Flag0; function Flag1 (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Flags.Table (N).Flag1; end Flag1; function Flag2 (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Flags.Table (N).Flag2; end Flag2; function Flag3 (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Flags.Table (N).Flag3; end Flag3; function Flag4 (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Flag4; end Flag4; function Flag5 (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Flag5; end Flag5; function Flag6 (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Flag6; end Flag6; function Flag7 (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Flag7; end Flag7; function Flag8 (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Flag8; end Flag8; function Flag9 (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Flag9; end Flag9; function Flag10 (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Flag10; end Flag10; function Flag11 (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Flag11; end Flag11; function Flag12 (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Flag12; end Flag12; function Flag13 (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Flag13; end Flag13; function Flag14 (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Flag14; end Flag14; function Flag15 (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Flag15; end Flag15; function Flag16 (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Flag16; end Flag16; function Flag17 (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Flag17; end Flag17; function Flag18 (N : Node_Id) return Boolean is begin pragma Assert (N <= Nodes.Last); return Nodes.Table (N).Flag18; end Flag18; function Flag19 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).In_List; end Flag19; function Flag20 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Has_Aspects; end Flag20; function Flag21 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Rewrite_Ins; end Flag21; function Flag22 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Analyzed; end Flag22; function Flag23 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Comes_From_Source; end Flag23; function Flag24 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Error_Posted; end Flag24; function Flag25 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Flag4; end Flag25; function Flag26 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Flag5; end Flag26; function Flag27 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Flag6; end Flag27; function Flag28 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Flag7; end Flag28; function Flag29 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Flag8; end Flag29; function Flag30 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Flag9; end Flag30; function Flag31 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Flag10; end Flag31; function Flag32 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Flag11; end Flag32; function Flag33 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Flag12; end Flag33; function Flag34 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Flag13; end Flag34; function Flag35 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Flag14; end Flag35; function Flag36 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Flag15; end Flag36; function Flag37 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Flag16; end Flag37; function Flag38 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Flag17; end Flag38; function Flag39 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Flag18; end Flag39; function Flag40 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).In_List; end Flag40; function Flag41 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Has_Aspects; end Flag41; function Flag42 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Rewrite_Ins; end Flag42; function Flag43 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Analyzed; end Flag43; function Flag44 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Comes_From_Source; end Flag44; function Flag45 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Error_Posted; end Flag45; function Flag46 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Flag4; end Flag46; function Flag47 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Flag5; end Flag47; function Flag48 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Flag6; end Flag48; function Flag49 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Flag7; end Flag49; function Flag50 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Flag8; end Flag50; function Flag51 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Flag9; end Flag51; function Flag52 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Flag10; end Flag52; function Flag53 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Flag11; end Flag53; function Flag54 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Flag12; end Flag54; function Flag55 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Flag13; end Flag55; function Flag56 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Flag14; end Flag56; function Flag57 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Flag15; end Flag57; function Flag58 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Flag16; end Flag58; function Flag59 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Flag17; end Flag59; function Flag60 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Flag18; end Flag60; function Flag61 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Pflag1; end Flag61; function Flag62 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 1).Pflag2; end Flag62; function Flag63 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Pflag1; end Flag63; function Flag64 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 2).Pflag2; end Flag64; function Flag65 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte (Nodes.Table (N + 2).Nkind).Flag65; end Flag65; function Flag66 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte (Nodes.Table (N + 2).Nkind).Flag66; end Flag66; function Flag67 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte (Nodes.Table (N + 2).Nkind).Flag67; end Flag67; function Flag68 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte (Nodes.Table (N + 2).Nkind).Flag68; end Flag68; function Flag69 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte (Nodes.Table (N + 2).Nkind).Flag69; end Flag69; function Flag70 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte (Nodes.Table (N + 2).Nkind).Flag70; end Flag70; function Flag71 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte (Nodes.Table (N + 2).Nkind).Flag71; end Flag71; function Flag72 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte (Nodes.Table (N + 2).Nkind).Flag72; end Flag72; function Flag73 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag73; end Flag73; function Flag74 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag74; end Flag74; function Flag75 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag75; end Flag75; function Flag76 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag76; end Flag76; function Flag77 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag77; end Flag77; function Flag78 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag78; end Flag78; function Flag79 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag79; end Flag79; function Flag80 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag80; end Flag80; function Flag81 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag81; end Flag81; function Flag82 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag82; end Flag82; function Flag83 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag83; end Flag83; function Flag84 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag84; end Flag84; function Flag85 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag85; end Flag85; function Flag86 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag86; end Flag86; function Flag87 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag87; end Flag87; function Flag88 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag88; end Flag88; function Flag89 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag89; end Flag89; function Flag90 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag90; end Flag90; function Flag91 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag91; end Flag91; function Flag92 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag92; end Flag92; function Flag93 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag93; end Flag93; function Flag94 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag94; end Flag94; function Flag95 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag95; end Flag95; function Flag96 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word (Nodes.Table (N + 2).Field12).Flag96; end Flag96; function Flag97 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag97; end Flag97; function Flag98 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag98; end Flag98; function Flag99 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag99; end Flag99; function Flag100 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag100; end Flag100; function Flag101 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag101; end Flag101; function Flag102 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag102; end Flag102; function Flag103 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag103; end Flag103; function Flag104 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag104; end Flag104; function Flag105 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag105; end Flag105; function Flag106 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag106; end Flag106; function Flag107 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag107; end Flag107; function Flag108 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag108; end Flag108; function Flag109 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag109; end Flag109; function Flag110 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag110; end Flag110; function Flag111 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag111; end Flag111; function Flag112 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag112; end Flag112; function Flag113 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag113; end Flag113; function Flag114 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag114; end Flag114; function Flag115 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag115; end Flag115; function Flag116 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag116; end Flag116; function Flag117 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag117; end Flag117; function Flag118 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag118; end Flag118; function Flag119 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag119; end Flag119; function Flag120 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag120; end Flag120; function Flag121 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag121; end Flag121; function Flag122 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag122; end Flag122; function Flag123 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag123; end Flag123; function Flag124 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag124; end Flag124; function Flag125 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag125; end Flag125; function Flag126 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag126; end Flag126; function Flag127 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag127; end Flag127; function Flag128 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word2 (Nodes.Table (N + 3).Field12).Flag128; end Flag128; function Flag129 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).In_List; end Flag129; function Flag130 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Has_Aspects; end Flag130; function Flag131 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Rewrite_Ins; end Flag131; function Flag132 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Analyzed; end Flag132; function Flag133 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Comes_From_Source; end Flag133; function Flag134 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Error_Posted; end Flag134; function Flag135 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Flag4; end Flag135; function Flag136 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Flag5; end Flag136; function Flag137 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Flag6; end Flag137; function Flag138 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Flag7; end Flag138; function Flag139 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Flag8; end Flag139; function Flag140 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Flag9; end Flag140; function Flag141 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Flag10; end Flag141; function Flag142 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Flag11; end Flag142; function Flag143 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Flag12; end Flag143; function Flag144 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Flag13; end Flag144; function Flag145 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Flag14; end Flag145; function Flag146 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Flag15; end Flag146; function Flag147 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Flag16; end Flag147; function Flag148 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Flag17; end Flag148; function Flag149 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Flag18; end Flag149; function Flag150 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Pflag1; end Flag150; function Flag151 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 3).Pflag2; end Flag151; function Flag152 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag152; end Flag152; function Flag153 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag153; end Flag153; function Flag154 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag154; end Flag154; function Flag155 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag155; end Flag155; function Flag156 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag156; end Flag156; function Flag157 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag157; end Flag157; function Flag158 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag158; end Flag158; function Flag159 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag159; end Flag159; function Flag160 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag160; end Flag160; function Flag161 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag161; end Flag161; function Flag162 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag162; end Flag162; function Flag163 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag163; end Flag163; function Flag164 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag164; end Flag164; function Flag165 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag165; end Flag165; function Flag166 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag166; end Flag166; function Flag167 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag167; end Flag167; function Flag168 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag168; end Flag168; function Flag169 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag169; end Flag169; function Flag170 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag170; end Flag170; function Flag171 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag171; end Flag171; function Flag172 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag172; end Flag172; function Flag173 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag173; end Flag173; function Flag174 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag174; end Flag174; function Flag175 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag175; end Flag175; function Flag176 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag176; end Flag176; function Flag177 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag177; end Flag177; function Flag178 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag178; end Flag178; function Flag179 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag179; end Flag179; function Flag180 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag180; end Flag180; function Flag181 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag181; end Flag181; function Flag182 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag182; end Flag182; function Flag183 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word3 (Nodes.Table (N + 3).Field11).Flag183; end Flag183; function Flag184 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag184; end Flag184; function Flag185 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag185; end Flag185; function Flag186 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag186; end Flag186; function Flag187 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag187; end Flag187; function Flag188 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag188; end Flag188; function Flag189 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag189; end Flag189; function Flag190 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag190; end Flag190; function Flag191 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag191; end Flag191; function Flag192 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag192; end Flag192; function Flag193 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag193; end Flag193; function Flag194 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag194; end Flag194; function Flag195 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag195; end Flag195; function Flag196 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag196; end Flag196; function Flag197 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag197; end Flag197; function Flag198 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag198; end Flag198; function Flag199 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag199; end Flag199; function Flag200 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag200; end Flag200; function Flag201 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag201; end Flag201; function Flag202 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag202; end Flag202; function Flag203 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag203; end Flag203; function Flag204 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag204; end Flag204; function Flag205 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag205; end Flag205; function Flag206 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag206; end Flag206; function Flag207 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag207; end Flag207; function Flag208 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag208; end Flag208; function Flag209 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag209; end Flag209; function Flag210 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag210; end Flag210; function Flag211 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag211; end Flag211; function Flag212 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag212; end Flag212; function Flag213 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag213; end Flag213; function Flag214 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag214; end Flag214; function Flag215 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word4 (Nodes.Table (N + 4).Field12).Flag215; end Flag215; function Flag216 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).In_List; end Flag216; function Flag217 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Has_Aspects; end Flag217; function Flag218 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Rewrite_Ins; end Flag218; function Flag219 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Analyzed; end Flag219; function Flag220 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Comes_From_Source; end Flag220; function Flag221 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Error_Posted; end Flag221; function Flag222 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Flag4; end Flag222; function Flag223 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Flag5; end Flag223; function Flag224 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Flag6; end Flag224; function Flag225 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Flag7; end Flag225; function Flag226 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Flag8; end Flag226; function Flag227 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Flag9; end Flag227; function Flag228 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Flag10; end Flag228; function Flag229 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Flag11; end Flag229; function Flag230 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Flag12; end Flag230; function Flag231 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Flag13; end Flag231; function Flag232 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Flag14; end Flag232; function Flag233 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Flag15; end Flag233; function Flag234 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Flag16; end Flag234; function Flag235 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Flag17; end Flag235; function Flag236 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Flag18; end Flag236; function Flag237 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Pflag1; end Flag237; function Flag238 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 4).Pflag2; end Flag238; function Flag239 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte2 (Nodes.Table (N + 3).Nkind).Flag239; end Flag239; function Flag240 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte2 (Nodes.Table (N + 3).Nkind).Flag240; end Flag240; function Flag241 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte2 (Nodes.Table (N + 3).Nkind).Flag241; end Flag241; function Flag242 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte2 (Nodes.Table (N + 3).Nkind).Flag242; end Flag242; function Flag243 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte2 (Nodes.Table (N + 3).Nkind).Flag243; end Flag243; function Flag244 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte2 (Nodes.Table (N + 3).Nkind).Flag244; end Flag244; function Flag245 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte2 (Nodes.Table (N + 3).Nkind).Flag245; end Flag245; function Flag246 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte2 (Nodes.Table (N + 3).Nkind).Flag246; end Flag246; function Flag247 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte3 (Nodes.Table (N + 4).Nkind).Flag247; end Flag247; function Flag248 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte3 (Nodes.Table (N + 4).Nkind).Flag248; end Flag248; function Flag249 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte3 (Nodes.Table (N + 4).Nkind).Flag249; end Flag249; function Flag250 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte3 (Nodes.Table (N + 4).Nkind).Flag250; end Flag250; function Flag251 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte3 (Nodes.Table (N + 4).Nkind).Flag251; end Flag251; function Flag252 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte3 (Nodes.Table (N + 4).Nkind).Flag252; end Flag252; function Flag253 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte3 (Nodes.Table (N + 4).Nkind).Flag253; end Flag253; function Flag254 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte3 (Nodes.Table (N + 4).Nkind).Flag254; end Flag254; function Flag255 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag255; end Flag255; function Flag256 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag256; end Flag256; function Flag257 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag257; end Flag257; function Flag258 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag258; end Flag258; function Flag259 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag259; end Flag259; function Flag260 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag260; end Flag260; function Flag261 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag261; end Flag261; function Flag262 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag262; end Flag262; function Flag263 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag263; end Flag263; function Flag264 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag264; end Flag264; function Flag265 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag265; end Flag265; function Flag266 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag266; end Flag266; function Flag267 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag267; end Flag267; function Flag268 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag268; end Flag268; function Flag269 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag269; end Flag269; function Flag270 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag270; end Flag270; function Flag271 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag271; end Flag271; function Flag272 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag272; end Flag272; function Flag273 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag273; end Flag273; function Flag274 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag274; end Flag274; function Flag275 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag275; end Flag275; function Flag276 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag276; end Flag276; function Flag277 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag277; end Flag277; function Flag278 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag278; end Flag278; function Flag279 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag279; end Flag279; function Flag280 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag280; end Flag280; function Flag281 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag281; end Flag281; function Flag282 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag282; end Flag282; function Flag283 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag283; end Flag283; function Flag284 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag284; end Flag284; function Flag285 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag285; end Flag285; function Flag286 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Word5 (Nodes.Table (N + 5).Field12).Flag286; end Flag286; function Flag287 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).In_List; end Flag287; function Flag288 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Has_Aspects; end Flag288; function Flag289 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Rewrite_Ins; end Flag289; function Flag290 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Analyzed; end Flag290; function Flag291 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Comes_From_Source; end Flag291; function Flag292 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Error_Posted; end Flag292; function Flag293 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Flag4; end Flag293; function Flag294 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Flag5; end Flag294; function Flag295 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Flag6; end Flag295; function Flag296 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Flag7; end Flag296; function Flag297 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Flag8; end Flag297; function Flag298 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Flag9; end Flag298; function Flag299 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Flag10; end Flag299; function Flag300 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Flag11; end Flag300; function Flag301 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Flag12; end Flag301; function Flag302 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Flag13; end Flag302; function Flag303 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Flag14; end Flag303; function Flag304 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Flag15; end Flag304; function Flag305 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Flag16; end Flag305; function Flag306 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Flag17; end Flag306; function Flag307 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Flag18; end Flag307; function Flag308 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Pflag1; end Flag308; function Flag309 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return Nodes.Table (N + 5).Pflag2; end Flag309; function Flag310 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte4 (Nodes.Table (N + 5).Nkind).Flag310; end Flag310; function Flag311 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte4 (Nodes.Table (N + 5).Nkind).Flag311; end Flag311; function Flag312 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte4 (Nodes.Table (N + 5).Nkind).Flag312; end Flag312; function Flag313 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte4 (Nodes.Table (N + 5).Nkind).Flag313; end Flag313; function Flag314 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte4 (Nodes.Table (N + 5).Nkind).Flag314; end Flag314; function Flag315 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte4 (Nodes.Table (N + 5).Nkind).Flag315; end Flag315; function Flag316 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte4 (Nodes.Table (N + 5).Nkind).Flag316; end Flag316; function Flag317 (N : Node_Id) return Boolean is begin pragma Assert (Nkind (N) in N_Entity); return To_Flag_Byte4 (Nodes.Table (N + 5).Nkind).Flag317; end Flag317; procedure Set_Nkind (N : Node_Id; Val : Node_Kind) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Nkind := Val; end Set_Nkind; procedure Set_Field1 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field1 := Val; end Set_Field1; procedure Set_Field2 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field2 := Val; end Set_Field2; procedure Set_Field3 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field3 := Val; end Set_Field3; procedure Set_Field4 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field4 := Val; end Set_Field4; procedure Set_Field5 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field5 := Val; end Set_Field5; procedure Set_Field6 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field6 := Val; end Set_Field6; procedure Set_Field7 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field7 := Val; end Set_Field7; procedure Set_Field8 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field8 := Val; end Set_Field8; procedure Set_Field9 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field9 := Val; end Set_Field9; procedure Set_Field10 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field10 := Val; end Set_Field10; procedure Set_Field11 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field11 := Val; end Set_Field11; procedure Set_Field12 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field12 := Val; end Set_Field12; procedure Set_Field13 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field6 := Val; end Set_Field13; procedure Set_Field14 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field7 := Val; end Set_Field14; procedure Set_Field15 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field8 := Val; end Set_Field15; procedure Set_Field16 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field9 := Val; end Set_Field16; procedure Set_Field17 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field10 := Val; end Set_Field17; procedure Set_Field18 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field11 := Val; end Set_Field18; procedure Set_Field19 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Field6 := Val; end Set_Field19; procedure Set_Field20 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Field7 := Val; end Set_Field20; procedure Set_Field21 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Field8 := Val; end Set_Field21; procedure Set_Field22 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Field9 := Val; end Set_Field22; procedure Set_Field23 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Field10 := Val; end Set_Field23; procedure Set_Field24 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Field6 := Val; end Set_Field24; procedure Set_Field25 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Field7 := Val; end Set_Field25; procedure Set_Field26 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Field8 := Val; end Set_Field26; procedure Set_Field27 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Field9 := Val; end Set_Field27; procedure Set_Field28 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Field10 := Val; end Set_Field28; procedure Set_Field29 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Field11 := Val; end Set_Field29; procedure Set_Field30 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Field6 := Val; end Set_Field30; procedure Set_Field31 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Field7 := Val; end Set_Field31; procedure Set_Field32 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Field8 := Val; end Set_Field32; procedure Set_Field33 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Field9 := Val; end Set_Field33; procedure Set_Field34 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Field10 := Val; end Set_Field34; procedure Set_Field35 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Field11 := Val; end Set_Field35; procedure Set_Field36 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 6).Field6 := Val; end Set_Field36; procedure Set_Field37 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 6).Field7 := Val; end Set_Field37; procedure Set_Field38 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 6).Field8 := Val; end Set_Field38; procedure Set_Field39 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 6).Field9 := Val; end Set_Field39; procedure Set_Field40 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 6).Field10 := Val; end Set_Field40; procedure Set_Field41 (N : Node_Id; Val : Union_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 6).Field11 := Val; end Set_Field41; procedure Set_Node1 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field1 := Union_Id (Val); end Set_Node1; procedure Set_Node2 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field2 := Union_Id (Val); end Set_Node2; procedure Set_Node3 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field3 := Union_Id (Val); end Set_Node3; procedure Set_Node4 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field4 := Union_Id (Val); end Set_Node4; procedure Set_Node5 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field5 := Union_Id (Val); end Set_Node5; procedure Set_Node6 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field6 := Union_Id (Val); end Set_Node6; procedure Set_Node7 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field7 := Union_Id (Val); end Set_Node7; procedure Set_Node8 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field8 := Union_Id (Val); end Set_Node8; procedure Set_Node9 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field9 := Union_Id (Val); end Set_Node9; procedure Set_Node10 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field10 := Union_Id (Val); end Set_Node10; procedure Set_Node11 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field11 := Union_Id (Val); end Set_Node11; procedure Set_Node12 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field12 := Union_Id (Val); end Set_Node12; procedure Set_Node13 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field6 := Union_Id (Val); end Set_Node13; procedure Set_Node14 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field7 := Union_Id (Val); end Set_Node14; procedure Set_Node15 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field8 := Union_Id (Val); end Set_Node15; procedure Set_Node16 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field9 := Union_Id (Val); end Set_Node16; procedure Set_Node17 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field10 := Union_Id (Val); end Set_Node17; procedure Set_Node18 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field11 := Union_Id (Val); end Set_Node18; procedure Set_Node19 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Field6 := Union_Id (Val); end Set_Node19; procedure Set_Node20 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Field7 := Union_Id (Val); end Set_Node20; procedure Set_Node21 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Field8 := Union_Id (Val); end Set_Node21; procedure Set_Node22 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Field9 := Union_Id (Val); end Set_Node22; procedure Set_Node23 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Field10 := Union_Id (Val); end Set_Node23; procedure Set_Node24 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Field6 := Union_Id (Val); end Set_Node24; procedure Set_Node25 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Field7 := Union_Id (Val); end Set_Node25; procedure Set_Node26 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Field8 := Union_Id (Val); end Set_Node26; procedure Set_Node27 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Field9 := Union_Id (Val); end Set_Node27; procedure Set_Node28 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Field10 := Union_Id (Val); end Set_Node28; procedure Set_Node29 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Field11 := Union_Id (Val); end Set_Node29; procedure Set_Node30 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Field6 := Union_Id (Val); end Set_Node30; procedure Set_Node31 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Field7 := Union_Id (Val); end Set_Node31; procedure Set_Node32 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Field8 := Union_Id (Val); end Set_Node32; procedure Set_Node33 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Field9 := Union_Id (Val); end Set_Node33; procedure Set_Node34 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Field10 := Union_Id (Val); end Set_Node34; procedure Set_Node35 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Field11 := Union_Id (Val); end Set_Node35; procedure Set_Node36 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 6).Field6 := Union_Id (Val); end Set_Node36; procedure Set_Node37 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 6).Field7 := Union_Id (Val); end Set_Node37; procedure Set_Node38 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 6).Field8 := Union_Id (Val); end Set_Node38; procedure Set_Node39 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 6).Field9 := Union_Id (Val); end Set_Node39; procedure Set_Node40 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 6).Field10 := Union_Id (Val); end Set_Node40; procedure Set_Node41 (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 6).Field11 := Union_Id (Val); end Set_Node41; procedure Set_List1 (N : Node_Id; Val : List_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field1 := Union_Id (Val); end Set_List1; procedure Set_List2 (N : Node_Id; Val : List_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field2 := Union_Id (Val); end Set_List2; procedure Set_List3 (N : Node_Id; Val : List_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field3 := Union_Id (Val); end Set_List3; procedure Set_List4 (N : Node_Id; Val : List_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field4 := Union_Id (Val); end Set_List4; procedure Set_List5 (N : Node_Id; Val : List_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field5 := Union_Id (Val); end Set_List5; procedure Set_List10 (N : Node_Id; Val : List_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field10 := Union_Id (Val); end Set_List10; procedure Set_List14 (N : Node_Id; Val : List_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field7 := Union_Id (Val); end Set_List14; procedure Set_List25 (N : Node_Id; Val : List_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Field7 := Union_Id (Val); end Set_List25; procedure Set_List38 (N : Node_Id; Val : List_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 6).Field8 := Union_Id (Val); end Set_List38; procedure Set_List39 (N : Node_Id; Val : List_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 6).Field9 := Union_Id (Val); end Set_List39; procedure Set_Elist1 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); Nodes.Table (N).Field1 := Union_Id (Val); end Set_Elist1; procedure Set_Elist2 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); Nodes.Table (N).Field2 := Union_Id (Val); end Set_Elist2; procedure Set_Elist3 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); Nodes.Table (N).Field3 := Union_Id (Val); end Set_Elist3; procedure Set_Elist4 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); Nodes.Table (N).Field4 := Union_Id (Val); end Set_Elist4; procedure Set_Elist5 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); Nodes.Table (N).Field5 := Union_Id (Val); end Set_Elist5; procedure Set_Elist8 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field8 := Union_Id (Val); end Set_Elist8; procedure Set_Elist9 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field9 := Union_Id (Val); end Set_Elist9; procedure Set_Elist10 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field10 := Union_Id (Val); end Set_Elist10; procedure Set_Elist11 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field11 := Union_Id (Val); end Set_Elist11; procedure Set_Elist13 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field6 := Union_Id (Val); end Set_Elist13; procedure Set_Elist15 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field8 := Union_Id (Val); end Set_Elist15; procedure Set_Elist16 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field9 := Union_Id (Val); end Set_Elist16; procedure Set_Elist18 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field11 := Union_Id (Val); end Set_Elist18; procedure Set_Elist21 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Field8 := Union_Id (Val); end Set_Elist21; procedure Set_Elist23 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Field10 := Union_Id (Val); end Set_Elist23; procedure Set_Elist24 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Field6 := Union_Id (Val); end Set_Elist24; procedure Set_Elist25 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Field7 := Union_Id (Val); end Set_Elist25; procedure Set_Elist26 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Field8 := Union_Id (Val); end Set_Elist26; procedure Set_Elist29 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Field11 := Union_Id (Val); end Set_Elist29; procedure Set_Elist36 (N : Node_Id; Val : Elist_Id) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 6).Field6 := Union_Id (Val); end Set_Elist36; procedure Set_Name1 (N : Node_Id; Val : Name_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field1 := Union_Id (Val); end Set_Name1; procedure Set_Name2 (N : Node_Id; Val : Name_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field2 := Union_Id (Val); end Set_Name2; procedure Set_Str3 (N : Node_Id; Val : String_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field3 := Union_Id (Val); end Set_Str3; procedure Set_Uint2 (N : Node_Id; Val : Uint) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field2 := To_Union (Val); end Set_Uint2; procedure Set_Uint3 (N : Node_Id; Val : Uint) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field3 := To_Union (Val); end Set_Uint3; procedure Set_Uint4 (N : Node_Id; Val : Uint) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field4 := To_Union (Val); end Set_Uint4; procedure Set_Uint5 (N : Node_Id; Val : Uint) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field5 := To_Union (Val); end Set_Uint5; procedure Set_Uint8 (N : Node_Id; Val : Uint) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field8 := To_Union (Val); end Set_Uint8; procedure Set_Uint9 (N : Node_Id; Val : Uint) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field9 := To_Union (Val); end Set_Uint9; procedure Set_Uint10 (N : Node_Id; Val : Uint) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field10 := To_Union (Val); end Set_Uint10; procedure Set_Uint11 (N : Node_Id; Val : Uint) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field11 := To_Union (Val); end Set_Uint11; procedure Set_Uint12 (N : Node_Id; Val : Uint) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Field12 := To_Union (Val); end Set_Uint12; procedure Set_Uint13 (N : Node_Id; Val : Uint) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field6 := To_Union (Val); end Set_Uint13; procedure Set_Uint14 (N : Node_Id; Val : Uint) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field7 := To_Union (Val); end Set_Uint14; procedure Set_Uint15 (N : Node_Id; Val : Uint) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field8 := To_Union (Val); end Set_Uint15; procedure Set_Uint16 (N : Node_Id; Val : Uint) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field9 := To_Union (Val); end Set_Uint16; procedure Set_Uint17 (N : Node_Id; Val : Uint) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field10 := To_Union (Val); end Set_Uint17; procedure Set_Uint22 (N : Node_Id; Val : Uint) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Field9 := To_Union (Val); end Set_Uint22; procedure Set_Uint24 (N : Node_Id; Val : Uint) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Field6 := To_Union (Val); end Set_Uint24; procedure Set_Ureal3 (N : Node_Id; Val : Ureal) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Field3 := To_Union (Val); end Set_Ureal3; procedure Set_Ureal18 (N : Node_Id; Val : Ureal) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Field11 := To_Union (Val); end Set_Ureal18; procedure Set_Ureal21 (N : Node_Id; Val : Ureal) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Field8 := To_Union (Val); end Set_Ureal21; procedure Set_Flag0 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Flags.Table (N).Flag0 := Val; end Set_Flag0; procedure Set_Flag1 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Flags.Table (N).Flag1 := Val; end Set_Flag1; procedure Set_Flag2 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Flags.Table (N).Flag2 := Val; end Set_Flag2; procedure Set_Flag3 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Flags.Table (N).Flag3 := Val; end Set_Flag3; procedure Set_Flag4 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Flag4 := Val; end Set_Flag4; procedure Set_Flag5 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Flag5 := Val; end Set_Flag5; procedure Set_Flag6 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Flag6 := Val; end Set_Flag6; procedure Set_Flag7 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Flag7 := Val; end Set_Flag7; procedure Set_Flag8 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Flag8 := Val; end Set_Flag8; procedure Set_Flag9 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Flag9 := Val; end Set_Flag9; procedure Set_Flag10 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Flag10 := Val; end Set_Flag10; procedure Set_Flag11 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Flag11 := Val; end Set_Flag11; procedure Set_Flag12 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Flag12 := Val; end Set_Flag12; procedure Set_Flag13 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Flag13 := Val; end Set_Flag13; procedure Set_Flag14 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Flag14 := Val; end Set_Flag14; procedure Set_Flag15 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Flag15 := Val; end Set_Flag15; procedure Set_Flag16 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Flag16 := Val; end Set_Flag16; procedure Set_Flag17 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Flag17 := Val; end Set_Flag17; procedure Set_Flag18 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); Nodes.Table (N).Flag18 := Val; end Set_Flag18; procedure Set_Flag19 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).In_List := Val; end Set_Flag19; procedure Set_Flag20 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Has_Aspects := Val; end Set_Flag20; procedure Set_Flag21 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Rewrite_Ins := Val; end Set_Flag21; procedure Set_Flag22 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Analyzed := Val; end Set_Flag22; procedure Set_Flag23 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Comes_From_Source := Val; end Set_Flag23; procedure Set_Flag24 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Error_Posted := Val; end Set_Flag24; procedure Set_Flag25 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Flag4 := Val; end Set_Flag25; procedure Set_Flag26 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Flag5 := Val; end Set_Flag26; procedure Set_Flag27 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Flag6 := Val; end Set_Flag27; procedure Set_Flag28 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Flag7 := Val; end Set_Flag28; procedure Set_Flag29 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Flag8 := Val; end Set_Flag29; procedure Set_Flag30 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Flag9 := Val; end Set_Flag30; procedure Set_Flag31 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Flag10 := Val; end Set_Flag31; procedure Set_Flag32 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Flag11 := Val; end Set_Flag32; procedure Set_Flag33 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Flag12 := Val; end Set_Flag33; procedure Set_Flag34 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Flag13 := Val; end Set_Flag34; procedure Set_Flag35 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Flag14 := Val; end Set_Flag35; procedure Set_Flag36 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Flag15 := Val; end Set_Flag36; procedure Set_Flag37 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Flag16 := Val; end Set_Flag37; procedure Set_Flag38 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Flag17 := Val; end Set_Flag38; procedure Set_Flag39 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Flag18 := Val; end Set_Flag39; procedure Set_Flag40 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).In_List := Val; end Set_Flag40; procedure Set_Flag41 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Has_Aspects := Val; end Set_Flag41; procedure Set_Flag42 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Rewrite_Ins := Val; end Set_Flag42; procedure Set_Flag43 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Analyzed := Val; end Set_Flag43; procedure Set_Flag44 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Comes_From_Source := Val; end Set_Flag44; procedure Set_Flag45 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Error_Posted := Val; end Set_Flag45; procedure Set_Flag46 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Flag4 := Val; end Set_Flag46; procedure Set_Flag47 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Flag5 := Val; end Set_Flag47; procedure Set_Flag48 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Flag6 := Val; end Set_Flag48; procedure Set_Flag49 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Flag7 := Val; end Set_Flag49; procedure Set_Flag50 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Flag8 := Val; end Set_Flag50; procedure Set_Flag51 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Flag9 := Val; end Set_Flag51; procedure Set_Flag52 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Flag10 := Val; end Set_Flag52; procedure Set_Flag53 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Flag11 := Val; end Set_Flag53; procedure Set_Flag54 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Flag12 := Val; end Set_Flag54; procedure Set_Flag55 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Flag13 := Val; end Set_Flag55; procedure Set_Flag56 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Flag14 := Val; end Set_Flag56; procedure Set_Flag57 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Flag15 := Val; end Set_Flag57; procedure Set_Flag58 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Flag16 := Val; end Set_Flag58; procedure Set_Flag59 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Flag17 := Val; end Set_Flag59; procedure Set_Flag60 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Flag18 := Val; end Set_Flag60; procedure Set_Flag61 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Pflag1 := Val; end Set_Flag61; procedure Set_Flag62 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 1).Pflag2 := Val; end Set_Flag62; procedure Set_Flag63 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Pflag1 := Val; end Set_Flag63; procedure Set_Flag64 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 2).Pflag2 := Val; end Set_Flag64; procedure Set_Flag65 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 2).Nkind'Unrestricted_Access)).Flag65 := Val; end Set_Flag65; procedure Set_Flag66 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 2).Nkind'Unrestricted_Access)).Flag66 := Val; end Set_Flag66; procedure Set_Flag67 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 2).Nkind'Unrestricted_Access)).Flag67 := Val; end Set_Flag67; procedure Set_Flag68 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 2).Nkind'Unrestricted_Access)).Flag68 := Val; end Set_Flag68; procedure Set_Flag69 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 2).Nkind'Unrestricted_Access)).Flag69 := Val; end Set_Flag69; procedure Set_Flag70 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 2).Nkind'Unrestricted_Access)).Flag70 := Val; end Set_Flag70; procedure Set_Flag71 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 2).Nkind'Unrestricted_Access)).Flag71 := Val; end Set_Flag71; procedure Set_Flag72 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 2).Nkind'Unrestricted_Access)).Flag72 := Val; end Set_Flag72; procedure Set_Flag73 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag73 := Val; end Set_Flag73; procedure Set_Flag74 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag74 := Val; end Set_Flag74; procedure Set_Flag75 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag75 := Val; end Set_Flag75; procedure Set_Flag76 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag76 := Val; end Set_Flag76; procedure Set_Flag77 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag77 := Val; end Set_Flag77; procedure Set_Flag78 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag78 := Val; end Set_Flag78; procedure Set_Flag79 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag79 := Val; end Set_Flag79; procedure Set_Flag80 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag80 := Val; end Set_Flag80; procedure Set_Flag81 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag81 := Val; end Set_Flag81; procedure Set_Flag82 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag82 := Val; end Set_Flag82; procedure Set_Flag83 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag83 := Val; end Set_Flag83; procedure Set_Flag84 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag84 := Val; end Set_Flag84; procedure Set_Flag85 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag85 := Val; end Set_Flag85; procedure Set_Flag86 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag86 := Val; end Set_Flag86; procedure Set_Flag87 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag87 := Val; end Set_Flag87; procedure Set_Flag88 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag88 := Val; end Set_Flag88; procedure Set_Flag89 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag89 := Val; end Set_Flag89; procedure Set_Flag90 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag90 := Val; end Set_Flag90; procedure Set_Flag91 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag91 := Val; end Set_Flag91; procedure Set_Flag92 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag92 := Val; end Set_Flag92; procedure Set_Flag93 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag93 := Val; end Set_Flag93; procedure Set_Flag94 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag94 := Val; end Set_Flag94; procedure Set_Flag95 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag95 := Val; end Set_Flag95; procedure Set_Flag96 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word_Ptr (Union_Id_Ptr' (Nodes.Table (N + 2).Field12'Unrestricted_Access)).Flag96 := Val; end Set_Flag96; procedure Set_Flag97 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag97 := Val; end Set_Flag97; procedure Set_Flag98 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag98 := Val; end Set_Flag98; procedure Set_Flag99 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag99 := Val; end Set_Flag99; procedure Set_Flag100 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag100 := Val; end Set_Flag100; procedure Set_Flag101 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag101 := Val; end Set_Flag101; procedure Set_Flag102 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag102 := Val; end Set_Flag102; procedure Set_Flag103 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag103 := Val; end Set_Flag103; procedure Set_Flag104 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag104 := Val; end Set_Flag104; procedure Set_Flag105 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag105 := Val; end Set_Flag105; procedure Set_Flag106 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag106 := Val; end Set_Flag106; procedure Set_Flag107 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag107 := Val; end Set_Flag107; procedure Set_Flag108 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag108 := Val; end Set_Flag108; procedure Set_Flag109 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag109 := Val; end Set_Flag109; procedure Set_Flag110 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag110 := Val; end Set_Flag110; procedure Set_Flag111 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag111 := Val; end Set_Flag111; procedure Set_Flag112 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag112 := Val; end Set_Flag112; procedure Set_Flag113 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag113 := Val; end Set_Flag113; procedure Set_Flag114 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag114 := Val; end Set_Flag114; procedure Set_Flag115 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag115 := Val; end Set_Flag115; procedure Set_Flag116 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag116 := Val; end Set_Flag116; procedure Set_Flag117 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag117 := Val; end Set_Flag117; procedure Set_Flag118 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag118 := Val; end Set_Flag118; procedure Set_Flag119 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag119 := Val; end Set_Flag119; procedure Set_Flag120 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag120 := Val; end Set_Flag120; procedure Set_Flag121 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag121 := Val; end Set_Flag121; procedure Set_Flag122 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag122 := Val; end Set_Flag122; procedure Set_Flag123 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag123 := Val; end Set_Flag123; procedure Set_Flag124 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag124 := Val; end Set_Flag124; procedure Set_Flag125 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag125 := Val; end Set_Flag125; procedure Set_Flag126 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag126 := Val; end Set_Flag126; procedure Set_Flag127 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag127 := Val; end Set_Flag127; procedure Set_Flag128 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word2_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field12'Unrestricted_Access)).Flag128 := Val; end Set_Flag128; procedure Set_Flag129 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).In_List := Val; end Set_Flag129; procedure Set_Flag130 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Has_Aspects := Val; end Set_Flag130; procedure Set_Flag131 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Rewrite_Ins := Val; end Set_Flag131; procedure Set_Flag132 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Analyzed := Val; end Set_Flag132; procedure Set_Flag133 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Comes_From_Source := Val; end Set_Flag133; procedure Set_Flag134 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Error_Posted := Val; end Set_Flag134; procedure Set_Flag135 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Flag4 := Val; end Set_Flag135; procedure Set_Flag136 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Flag5 := Val; end Set_Flag136; procedure Set_Flag137 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Flag6 := Val; end Set_Flag137; procedure Set_Flag138 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Flag7 := Val; end Set_Flag138; procedure Set_Flag139 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Flag8 := Val; end Set_Flag139; procedure Set_Flag140 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Flag9 := Val; end Set_Flag140; procedure Set_Flag141 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Flag10 := Val; end Set_Flag141; procedure Set_Flag142 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Flag11 := Val; end Set_Flag142; procedure Set_Flag143 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Flag12 := Val; end Set_Flag143; procedure Set_Flag144 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Flag13 := Val; end Set_Flag144; procedure Set_Flag145 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Flag14 := Val; end Set_Flag145; procedure Set_Flag146 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Flag15 := Val; end Set_Flag146; procedure Set_Flag147 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Flag16 := Val; end Set_Flag147; procedure Set_Flag148 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Flag17 := Val; end Set_Flag148; procedure Set_Flag149 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Flag18 := Val; end Set_Flag149; procedure Set_Flag150 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Pflag1 := Val; end Set_Flag150; procedure Set_Flag151 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 3).Pflag2 := Val; end Set_Flag151; procedure Set_Flag152 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag152 := Val; end Set_Flag152; procedure Set_Flag153 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag153 := Val; end Set_Flag153; procedure Set_Flag154 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag154 := Val; end Set_Flag154; procedure Set_Flag155 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag155 := Val; end Set_Flag155; procedure Set_Flag156 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag156 := Val; end Set_Flag156; procedure Set_Flag157 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag157 := Val; end Set_Flag157; procedure Set_Flag158 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag158 := Val; end Set_Flag158; procedure Set_Flag159 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag159 := Val; end Set_Flag159; procedure Set_Flag160 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag160 := Val; end Set_Flag160; procedure Set_Flag161 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag161 := Val; end Set_Flag161; procedure Set_Flag162 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag162 := Val; end Set_Flag162; procedure Set_Flag163 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag163 := Val; end Set_Flag163; procedure Set_Flag164 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag164 := Val; end Set_Flag164; procedure Set_Flag165 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag165 := Val; end Set_Flag165; procedure Set_Flag166 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag166 := Val; end Set_Flag166; procedure Set_Flag167 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag167 := Val; end Set_Flag167; procedure Set_Flag168 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag168 := Val; end Set_Flag168; procedure Set_Flag169 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag169 := Val; end Set_Flag169; procedure Set_Flag170 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag170 := Val; end Set_Flag170; procedure Set_Flag171 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag171 := Val; end Set_Flag171; procedure Set_Flag172 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag172 := Val; end Set_Flag172; procedure Set_Flag173 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag173 := Val; end Set_Flag173; procedure Set_Flag174 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag174 := Val; end Set_Flag174; procedure Set_Flag175 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag175 := Val; end Set_Flag175; procedure Set_Flag176 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag176 := Val; end Set_Flag176; procedure Set_Flag177 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag177 := Val; end Set_Flag177; procedure Set_Flag178 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag178 := Val; end Set_Flag178; procedure Set_Flag179 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag179 := Val; end Set_Flag179; procedure Set_Flag180 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag180 := Val; end Set_Flag180; procedure Set_Flag181 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag181 := Val; end Set_Flag181; procedure Set_Flag182 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag182 := Val; end Set_Flag182; procedure Set_Flag183 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word3_Ptr (Union_Id_Ptr' (Nodes.Table (N + 3).Field11'Unrestricted_Access)).Flag183 := Val; end Set_Flag183; procedure Set_Flag184 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag184 := Val; end Set_Flag184; procedure Set_Flag185 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag185 := Val; end Set_Flag185; procedure Set_Flag186 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag186 := Val; end Set_Flag186; procedure Set_Flag187 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag187 := Val; end Set_Flag187; procedure Set_Flag188 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag188 := Val; end Set_Flag188; procedure Set_Flag189 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag189 := Val; end Set_Flag189; procedure Set_Flag190 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag190 := Val; end Set_Flag190; procedure Set_Flag191 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag191 := Val; end Set_Flag191; procedure Set_Flag192 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag192 := Val; end Set_Flag192; procedure Set_Flag193 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag193 := Val; end Set_Flag193; procedure Set_Flag194 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag194 := Val; end Set_Flag194; procedure Set_Flag195 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag195 := Val; end Set_Flag195; procedure Set_Flag196 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag196 := Val; end Set_Flag196; procedure Set_Flag197 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag197 := Val; end Set_Flag197; procedure Set_Flag198 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag198 := Val; end Set_Flag198; procedure Set_Flag199 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag199 := Val; end Set_Flag199; procedure Set_Flag200 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag200 := Val; end Set_Flag200; procedure Set_Flag201 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag201 := Val; end Set_Flag201; procedure Set_Flag202 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag202 := Val; end Set_Flag202; procedure Set_Flag203 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag203 := Val; end Set_Flag203; procedure Set_Flag204 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag204 := Val; end Set_Flag204; procedure Set_Flag205 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag205 := Val; end Set_Flag205; procedure Set_Flag206 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag206 := Val; end Set_Flag206; procedure Set_Flag207 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag207 := Val; end Set_Flag207; procedure Set_Flag208 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag208 := Val; end Set_Flag208; procedure Set_Flag209 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag209 := Val; end Set_Flag209; procedure Set_Flag210 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag210 := Val; end Set_Flag210; procedure Set_Flag211 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag211 := Val; end Set_Flag211; procedure Set_Flag212 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag212 := Val; end Set_Flag212; procedure Set_Flag213 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag213 := Val; end Set_Flag213; procedure Set_Flag214 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag214 := Val; end Set_Flag214; procedure Set_Flag215 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word4_Ptr (Union_Id_Ptr' (Nodes.Table (N + 4).Field12'Unrestricted_Access)).Flag215 := Val; end Set_Flag215; procedure Set_Flag216 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).In_List := Val; end Set_Flag216; procedure Set_Flag217 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Has_Aspects := Val; end Set_Flag217; procedure Set_Flag218 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Rewrite_Ins := Val; end Set_Flag218; procedure Set_Flag219 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Analyzed := Val; end Set_Flag219; procedure Set_Flag220 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Comes_From_Source := Val; end Set_Flag220; procedure Set_Flag221 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Error_Posted := Val; end Set_Flag221; procedure Set_Flag222 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Flag4 := Val; end Set_Flag222; procedure Set_Flag223 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Flag5 := Val; end Set_Flag223; procedure Set_Flag224 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Flag6 := Val; end Set_Flag224; procedure Set_Flag225 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Flag7 := Val; end Set_Flag225; procedure Set_Flag226 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Flag8 := Val; end Set_Flag226; procedure Set_Flag227 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Flag9 := Val; end Set_Flag227; procedure Set_Flag228 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Flag10 := Val; end Set_Flag228; procedure Set_Flag229 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Flag11 := Val; end Set_Flag229; procedure Set_Flag230 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Flag12 := Val; end Set_Flag230; procedure Set_Flag231 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Flag13 := Val; end Set_Flag231; procedure Set_Flag232 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Flag14 := Val; end Set_Flag232; procedure Set_Flag233 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Flag15 := Val; end Set_Flag233; procedure Set_Flag234 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Flag16 := Val; end Set_Flag234; procedure Set_Flag235 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Flag17 := Val; end Set_Flag235; procedure Set_Flag236 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Flag18 := Val; end Set_Flag236; procedure Set_Flag237 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Pflag1 := Val; end Set_Flag237; procedure Set_Flag238 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 4).Pflag2 := Val; end Set_Flag238; procedure Set_Flag239 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte2_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 3).Nkind'Unrestricted_Access)).Flag239 := Val; end Set_Flag239; procedure Set_Flag240 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte2_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 3).Nkind'Unrestricted_Access)).Flag240 := Val; end Set_Flag240; procedure Set_Flag241 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte2_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 3).Nkind'Unrestricted_Access)).Flag241 := Val; end Set_Flag241; procedure Set_Flag242 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte2_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 3).Nkind'Unrestricted_Access)).Flag242 := Val; end Set_Flag242; procedure Set_Flag243 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte2_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 3).Nkind'Unrestricted_Access)).Flag243 := Val; end Set_Flag243; procedure Set_Flag244 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte2_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 3).Nkind'Unrestricted_Access)).Flag244 := Val; end Set_Flag244; procedure Set_Flag245 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte2_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 3).Nkind'Unrestricted_Access)).Flag245 := Val; end Set_Flag245; procedure Set_Flag246 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte2_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 3).Nkind'Unrestricted_Access)).Flag246 := Val; end Set_Flag246; procedure Set_Flag247 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte3_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 4).Nkind'Unrestricted_Access)).Flag247 := Val; end Set_Flag247; procedure Set_Flag248 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte3_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 4).Nkind'Unrestricted_Access)).Flag248 := Val; end Set_Flag248; procedure Set_Flag249 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte3_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 4).Nkind'Unrestricted_Access)).Flag249 := Val; end Set_Flag249; procedure Set_Flag250 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte3_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 4).Nkind'Unrestricted_Access)).Flag250 := Val; end Set_Flag250; procedure Set_Flag251 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte3_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 4).Nkind'Unrestricted_Access)).Flag251 := Val; end Set_Flag251; procedure Set_Flag252 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte3_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 4).Nkind'Unrestricted_Access)).Flag252 := Val; end Set_Flag252; procedure Set_Flag253 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte3_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 4).Nkind'Unrestricted_Access)).Flag253 := Val; end Set_Flag253; procedure Set_Flag254 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte3_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 4).Nkind'Unrestricted_Access)).Flag254 := Val; end Set_Flag254; procedure Set_Flag255 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag255 := Val; end Set_Flag255; procedure Set_Flag256 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag256 := Val; end Set_Flag256; procedure Set_Flag257 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag257 := Val; end Set_Flag257; procedure Set_Flag258 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag258 := Val; end Set_Flag258; procedure Set_Flag259 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag259 := Val; end Set_Flag259; procedure Set_Flag260 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag260 := Val; end Set_Flag260; procedure Set_Flag261 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag261 := Val; end Set_Flag261; procedure Set_Flag262 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag262 := Val; end Set_Flag262; procedure Set_Flag263 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag263 := Val; end Set_Flag263; procedure Set_Flag264 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag264 := Val; end Set_Flag264; procedure Set_Flag265 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag265 := Val; end Set_Flag265; procedure Set_Flag266 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag266 := Val; end Set_Flag266; procedure Set_Flag267 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag267 := Val; end Set_Flag267; procedure Set_Flag268 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag268 := Val; end Set_Flag268; procedure Set_Flag269 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag269 := Val; end Set_Flag269; procedure Set_Flag270 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag270 := Val; end Set_Flag270; procedure Set_Flag271 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag271 := Val; end Set_Flag271; procedure Set_Flag272 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag272 := Val; end Set_Flag272; procedure Set_Flag273 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag273 := Val; end Set_Flag273; procedure Set_Flag274 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag274 := Val; end Set_Flag274; procedure Set_Flag275 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag275 := Val; end Set_Flag275; procedure Set_Flag276 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag276 := Val; end Set_Flag276; procedure Set_Flag277 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag277 := Val; end Set_Flag277; procedure Set_Flag278 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag278 := Val; end Set_Flag278; procedure Set_Flag279 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag279 := Val; end Set_Flag279; procedure Set_Flag280 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag280 := Val; end Set_Flag280; procedure Set_Flag281 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag281 := Val; end Set_Flag281; procedure Set_Flag282 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag282 := Val; end Set_Flag282; procedure Set_Flag283 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag283 := Val; end Set_Flag283; procedure Set_Flag284 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag284 := Val; end Set_Flag284; procedure Set_Flag285 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag285 := Val; end Set_Flag285; procedure Set_Flag286 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Word5_Ptr (Union_Id_Ptr' (Nodes.Table (N + 5).Field12'Unrestricted_Access)).Flag286 := Val; end Set_Flag286; procedure Set_Flag287 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).In_List := Val; end Set_Flag287; procedure Set_Flag288 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Has_Aspects := Val; end Set_Flag288; procedure Set_Flag289 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Rewrite_Ins := Val; end Set_Flag289; procedure Set_Flag290 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Analyzed := Val; end Set_Flag290; procedure Set_Flag291 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Comes_From_Source := Val; end Set_Flag291; procedure Set_Flag292 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Error_Posted := Val; end Set_Flag292; procedure Set_Flag293 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Flag4 := Val; end Set_Flag293; procedure Set_Flag294 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Flag5 := Val; end Set_Flag294; procedure Set_Flag295 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Flag6 := Val; end Set_Flag295; procedure Set_Flag296 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Flag7 := Val; end Set_Flag296; procedure Set_Flag297 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Flag8 := Val; end Set_Flag297; procedure Set_Flag298 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Flag9 := Val; end Set_Flag298; procedure Set_Flag299 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Flag10 := Val; end Set_Flag299; procedure Set_Flag300 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Flag11 := Val; end Set_Flag300; procedure Set_Flag301 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Flag12 := Val; end Set_Flag301; procedure Set_Flag302 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Flag13 := Val; end Set_Flag302; procedure Set_Flag303 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Flag14 := Val; end Set_Flag303; procedure Set_Flag304 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Flag15 := Val; end Set_Flag304; procedure Set_Flag305 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Flag16 := Val; end Set_Flag305; procedure Set_Flag306 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Flag17 := Val; end Set_Flag306; procedure Set_Flag307 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Flag18 := Val; end Set_Flag307; procedure Set_Flag308 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Pflag1 := Val; end Set_Flag308; procedure Set_Flag309 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); Nodes.Table (N + 5).Pflag2 := Val; end Set_Flag309; procedure Set_Flag310 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte4_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 5).Nkind'Unrestricted_Access)).Flag310 := Val; end Set_Flag310; procedure Set_Flag311 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte4_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 5).Nkind'Unrestricted_Access)).Flag311 := Val; end Set_Flag311; procedure Set_Flag312 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte4_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 5).Nkind'Unrestricted_Access)).Flag312 := Val; end Set_Flag312; procedure Set_Flag313 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte4_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 5).Nkind'Unrestricted_Access)).Flag313 := Val; end Set_Flag313; procedure Set_Flag314 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte4_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 5).Nkind'Unrestricted_Access)).Flag314 := Val; end Set_Flag314; procedure Set_Flag315 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte4_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 5).Nkind'Unrestricted_Access)).Flag315 := Val; end Set_Flag315; procedure Set_Flag316 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte4_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 5).Nkind'Unrestricted_Access)).Flag316 := Val; end Set_Flag316; procedure Set_Flag317 (N : Node_Id; Val : Boolean) is begin pragma Assert (not Locked); pragma Assert (Nkind (N) in N_Entity); To_Flag_Byte4_Ptr (Node_Kind_Ptr' (Nodes.Table (N + 5).Nkind'Unrestricted_Access)).Flag317 := Val; end Set_Flag317; procedure Set_Node1_With_Parent (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); if Val > Error then Set_Parent (N => Val, Val => N); end if; Set_Node1 (N, Val); end Set_Node1_With_Parent; procedure Set_Node2_With_Parent (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); if Val > Error then Set_Parent (N => Val, Val => N); end if; Set_Node2 (N, Val); end Set_Node2_With_Parent; procedure Set_Node3_With_Parent (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); if Val > Error then Set_Parent (N => Val, Val => N); end if; Set_Node3 (N, Val); end Set_Node3_With_Parent; procedure Set_Node4_With_Parent (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); if Val > Error then Set_Parent (N => Val, Val => N); end if; Set_Node4 (N, Val); end Set_Node4_With_Parent; procedure Set_Node5_With_Parent (N : Node_Id; Val : Node_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); if Val > Error then Set_Parent (N => Val, Val => N); end if; Set_Node5 (N, Val); end Set_Node5_With_Parent; procedure Set_List1_With_Parent (N : Node_Id; Val : List_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); if Val /= No_List and then Val /= Error_List then Set_Parent (Val, N); end if; Set_List1 (N, Val); end Set_List1_With_Parent; procedure Set_List2_With_Parent (N : Node_Id; Val : List_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); if Val /= No_List and then Val /= Error_List then Set_Parent (Val, N); end if; Set_List2 (N, Val); end Set_List2_With_Parent; procedure Set_List3_With_Parent (N : Node_Id; Val : List_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); if Val /= No_List and then Val /= Error_List then Set_Parent (Val, N); end if; Set_List3 (N, Val); end Set_List3_With_Parent; procedure Set_List4_With_Parent (N : Node_Id; Val : List_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); if Val /= No_List and then Val /= Error_List then Set_Parent (Val, N); end if; Set_List4 (N, Val); end Set_List4_With_Parent; procedure Set_List5_With_Parent (N : Node_Id; Val : List_Id) is begin pragma Assert (not Locked); pragma Assert (N <= Nodes.Last); if Val /= No_List and then Val /= Error_List then Set_Parent (Val, N); end if; Set_List5 (N, Val); end Set_List5_With_Parent; end Unchecked_Access; ------------ -- Unlock -- ------------ procedure Unlock is begin Nodes.Locked := False; Flags.Locked := False; Orig_Nodes.Locked := False; end Unlock; ------------------ -- Unlock_Nodes -- ------------------ procedure Unlock_Nodes is begin pragma Assert (Locked); Locked := False; end Unlock_Nodes; end Atree;
31.183194
79
0.580679
12faec56fb92dd548ed5f056802c933705519f5f
30,176
ads
Ada
src/mysql/mysql-com.ads
My-Colaborations/ada-ado
cebf1f9b38c0c259c44935e8bca05a5bff12aace
[ "Apache-2.0" ]
null
null
null
src/mysql/mysql-com.ads
My-Colaborations/ada-ado
cebf1f9b38c0c259c44935e8bca05a5bff12aace
[ "Apache-2.0" ]
null
null
null
src/mysql/mysql-com.ads
My-Colaborations/ada-ado
cebf1f9b38c0c259c44935e8bca05a5bff12aace
[ "Apache-2.0" ]
null
null
null
----------------------------------------------------------------------- -- ADO Mysql -- Mysql Interface -- Copyright (C) 2009, 2010 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- 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 Interfaces.C; use Interfaces.C; with System; with Interfaces.C.Strings; package Mysql.Com is pragma Preelaborate; pragma Warnings (Off); pragma Style_Checks ("N"); subtype my_socket is int; -- /usr/include/mysql/mysql.h:66:13 NAME_LEN : constant := 64; -- /usr/include/mysql/mysql_com.h:23 HOSTNAME_LENGTH : constant := 60; -- /usr/include/mysql/mysql_com.h:24 USERNAME_LENGTH : constant := 16; -- /usr/include/mysql/mysql_com.h:25 SERVER_VERSION_LENGTH : constant := 60; -- /usr/include/mysql/mysql_com.h:26 SQLSTATE_LENGTH : constant := 5; -- /usr/include/mysql/mysql_com.h:27 -- unsupported macro: USER_HOST_BUFF_SIZE HOSTNAME_LENGTH + USERNAME_LENGTH + 2 LOCAL_HOST : aliased constant String := "localhost" & ASCII.NUL; -- /usr/include/mysql/mysql_com.h:37 LOCAL_HOST_NAMEDPIPE : aliased constant String := "." & ASCII.NUL; -- /usr/include/mysql/mysql_com.h:38 SCRAMBLE_LENGTH : constant := 20; -- /usr/include/mysql/mysql_com.h:71 SCRAMBLE_LENGTH_323 : constant := 8; -- /usr/include/mysql/mysql_com.h:72 -- unsupported macro: SCRAMBLED_PASSWORD_CHAR_LENGTH (SCRAMBLE_LENGTH*2+1) -- unsupported macro: SCRAMBLED_PASSWORD_CHAR_LENGTH_323 (SCRAMBLE_LENGTH_323*2) NOT_NULL_FLAG : constant := 1; -- /usr/include/mysql/mysql_com.h:78 PRI_KEY_FLAG : constant := 2; -- /usr/include/mysql/mysql_com.h:79 UNIQUE_KEY_FLAG : constant := 4; -- /usr/include/mysql/mysql_com.h:80 MULTIPLE_KEY_FLAG : constant := 8; -- /usr/include/mysql/mysql_com.h:81 BLOB_FLAG : constant := 16; -- /usr/include/mysql/mysql_com.h:82 UNSIGNED_FLAG : constant := 32; -- /usr/include/mysql/mysql_com.h:83 ZEROFILL_FLAG : constant := 64; -- /usr/include/mysql/mysql_com.h:84 BINARY_FLAG : constant := 128; -- /usr/include/mysql/mysql_com.h:85 ENUM_FLAG : constant := 256; -- /usr/include/mysql/mysql_com.h:88 AUTO_INCREMENT_FLAG : constant := 512; -- /usr/include/mysql/mysql_com.h:89 TIMESTAMP_FLAG : constant := 1024; -- /usr/include/mysql/mysql_com.h:90 SET_FLAG : constant := 2048; -- /usr/include/mysql/mysql_com.h:91 NO_DEFAULT_VALUE_FLAG : constant := 4096; -- /usr/include/mysql/mysql_com.h:92 NUM_FLAG : constant := 32768; -- /usr/include/mysql/mysql_com.h:93 PART_KEY_FLAG : constant := 16384; -- /usr/include/mysql/mysql_com.h:94 GROUP_FLAG : constant := 32768; -- /usr/include/mysql/mysql_com.h:95 UNIQUE_FLAG : constant := 65536; -- /usr/include/mysql/mysql_com.h:96 BINCMP_FLAG : constant := 131072; -- /usr/include/mysql/mysql_com.h:97 REFRESH_GRANT : constant := 1; -- /usr/include/mysql/mysql_com.h:99 REFRESH_LOG : constant := 2; -- /usr/include/mysql/mysql_com.h:100 REFRESH_TABLES : constant := 4; -- /usr/include/mysql/mysql_com.h:101 REFRESH_HOSTS : constant := 8; -- /usr/include/mysql/mysql_com.h:102 REFRESH_STATUS : constant := 16; -- /usr/include/mysql/mysql_com.h:103 REFRESH_THREADS : constant := 32; -- /usr/include/mysql/mysql_com.h:104 REFRESH_SLAVE : constant := 64; -- /usr/include/mysql/mysql_com.h:105 REFRESH_MASTER : constant := 128; -- /usr/include/mysql/mysql_com.h:107 REFRESH_READ_LOCK : constant := 16384; -- /usr/include/mysql/mysql_com.h:111 REFRESH_FAST : constant := 32768; -- /usr/include/mysql/mysql_com.h:112 REFRESH_QUERY_CACHE : constant := 65536; -- /usr/include/mysql/mysql_com.h:115 REFRESH_QUERY_CACHE_FREE : constant := 16#20000#; -- /usr/include/mysql/mysql_com.h:116 REFRESH_DES_KEY_FILE : constant := 16#40000#; -- /usr/include/mysql/mysql_com.h:117 REFRESH_USER_RESOURCES : constant := 16#80000#; -- /usr/include/mysql/mysql_com.h:118 CLIENT_LONG_PASSWORD : constant := 1; -- /usr/include/mysql/mysql_com.h:120 CLIENT_FOUND_ROWS : constant := 2; -- /usr/include/mysql/mysql_com.h:121 CLIENT_LONG_FLAG : constant := 4; -- /usr/include/mysql/mysql_com.h:122 CLIENT_CONNECT_WITH_DB : constant := 8; -- /usr/include/mysql/mysql_com.h:123 CLIENT_NO_SCHEMA : constant := 16; -- /usr/include/mysql/mysql_com.h:124 CLIENT_COMPRESS : constant := 32; -- /usr/include/mysql/mysql_com.h:125 CLIENT_ODBC : constant := 64; -- /usr/include/mysql/mysql_com.h:126 CLIENT_LOCAL_FILES : constant := 128; -- /usr/include/mysql/mysql_com.h:127 CLIENT_IGNORE_SPACE : constant := 256; -- /usr/include/mysql/mysql_com.h:128 CLIENT_PROTOCOL_41 : constant := 512; -- /usr/include/mysql/mysql_com.h:129 CLIENT_INTERACTIVE : constant := 1024; -- /usr/include/mysql/mysql_com.h:130 CLIENT_SSL : constant := 2048; -- /usr/include/mysql/mysql_com.h:131 CLIENT_IGNORE_SIGPIPE : constant := 4096; -- /usr/include/mysql/mysql_com.h:132 CLIENT_TRANSACTIONS : constant := 8192; -- /usr/include/mysql/mysql_com.h:133 CLIENT_RESERVED : constant := 16384; -- /usr/include/mysql/mysql_com.h:134 CLIENT_SECURE_CONNECTION : constant := 32768; -- /usr/include/mysql/mysql_com.h:135 CLIENT_MULTI_STATEMENTS : constant := (1 ** 16); -- /usr/include/mysql/mysql_com.h:136 CLIENT_MULTI_RESULTS : constant := (1 ** 17); -- /usr/include/mysql/mysql_com.h:137 CLIENT_SSL_VERIFY_SERVER_CERT : constant := (1 ** 30); -- /usr/include/mysql/mysql_com.h:139 CLIENT_REMEMBER_OPTIONS : constant := (1 ** 31); -- /usr/include/mysql/mysql_com.h:140 SERVER_STATUS_IN_TRANS : constant := 1; -- /usr/include/mysql/mysql_com.h:142 SERVER_STATUS_AUTOCOMMIT : constant := 2; -- /usr/include/mysql/mysql_com.h:143 SERVER_MORE_RESULTS_EXISTS : constant := 8; -- /usr/include/mysql/mysql_com.h:144 SERVER_QUERY_NO_GOOD_INDEX_USED : constant := 16; -- /usr/include/mysql/mysql_com.h:145 SERVER_QUERY_NO_INDEX_USED : constant := 32; -- /usr/include/mysql/mysql_com.h:146 SERVER_STATUS_CURSOR_EXISTS : constant := 64; -- /usr/include/mysql/mysql_com.h:152 SERVER_STATUS_LAST_ROW_SENT : constant := 128; -- /usr/include/mysql/mysql_com.h:157 SERVER_STATUS_DB_DROPPED : constant := 256; -- /usr/include/mysql/mysql_com.h:158 SERVER_STATUS_NO_BACKSLASH_ESCAPES : constant := 512; -- /usr/include/mysql/mysql_com.h:159 MYSQL_ERRMSG_SIZE : constant := 512; -- /usr/include/mysql/mysql_com.h:161 NET_READ_TIMEOUT : constant := 30; -- /usr/include/mysql/mysql_com.h:162 NET_WRITE_TIMEOUT : constant := 60; -- /usr/include/mysql/mysql_com.h:163 -- unsupported macro: NET_WAIT_TIMEOUT 8*60*60 ONLY_KILL_QUERY : constant := 1; -- /usr/include/mysql/mysql_com.h:166 MAX_TINYINT_WIDTH : constant := 3; -- /usr/include/mysql/mysql_com.h:171 MAX_SMALLINT_WIDTH : constant := 5; -- /usr/include/mysql/mysql_com.h:172 MAX_MEDIUMINT_WIDTH : constant := 8; -- /usr/include/mysql/mysql_com.h:173 MAX_INT_WIDTH : constant := 10; -- /usr/include/mysql/mysql_com.h:174 MAX_BIGINT_WIDTH : constant := 20; -- /usr/include/mysql/mysql_com.h:175 MAX_CHAR_WIDTH : constant := 255; -- /usr/include/mysql/mysql_com.h:176 MAX_BLOB_WIDTH : constant := 8192; -- /usr/include/mysql/mysql_com.h:177 -- unsupported macro: packet_error (~(unsigned long) 0) -- unsupported macro: CLIENT_MULTI_QUERIES CLIENT_MULTI_STATEMENTS -- unsupported macro: FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL -- unsupported macro: FIELD_TYPE_NEWDECIMAL MYSQL_TYPE_NEWDECIMAL -- unsupported macro: FIELD_TYPE_TINY MYSQL_TYPE_TINY -- unsupported macro: FIELD_TYPE_SHORT MYSQL_TYPE_SHORT -- unsupported macro: FIELD_TYPE_LONG MYSQL_TYPE_LONG -- unsupported macro: FIELD_TYPE_FLOAT MYSQL_TYPE_FLOAT -- unsupported macro: FIELD_TYPE_DOUBLE MYSQL_TYPE_DOUBLE -- unsupported macro: FIELD_TYPE_NULL MYSQL_TYPE_NULL -- unsupported macro: FIELD_TYPE_TIMESTAMP MYSQL_TYPE_TIMESTAMP -- unsupported macro: FIELD_TYPE_LONGLONG MYSQL_TYPE_LONGLONG -- unsupported macro: FIELD_TYPE_INT24 MYSQL_TYPE_INT24 -- unsupported macro: FIELD_TYPE_DATE MYSQL_TYPE_DATE -- unsupported macro: FIELD_TYPE_TIME MYSQL_TYPE_TIME -- unsupported macro: FIELD_TYPE_DATETIME MYSQL_TYPE_DATETIME -- unsupported macro: FIELD_TYPE_YEAR MYSQL_TYPE_YEAR -- unsupported macro: FIELD_TYPE_NEWDATE MYSQL_TYPE_NEWDATE -- unsupported macro: FIELD_TYPE_ENUM MYSQL_TYPE_ENUM -- unsupported macro: FIELD_TYPE_SET MYSQL_TYPE_SET -- unsupported macro: FIELD_TYPE_TINY_BLOB MYSQL_TYPE_TINY_BLOB -- unsupported macro: FIELD_TYPE_MEDIUM_BLOB MYSQL_TYPE_MEDIUM_BLOB -- unsupported macro: FIELD_TYPE_LONG_BLOB MYSQL_TYPE_LONG_BLOB -- unsupported macro: FIELD_TYPE_BLOB MYSQL_TYPE_BLOB -- unsupported macro: FIELD_TYPE_VAR_STRING MYSQL_TYPE_VAR_STRING -- unsupported macro: FIELD_TYPE_STRING MYSQL_TYPE_STRING -- unsupported macro: FIELD_TYPE_CHAR MYSQL_TYPE_TINY -- unsupported macro: FIELD_TYPE_INTERVAL MYSQL_TYPE_ENUM -- unsupported macro: FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY -- unsupported macro: FIELD_TYPE_BIT MYSQL_TYPE_BIT -- unsupported macro: MYSQL_SHUTDOWN_KILLABLE_CONNECT (unsigned char)(1 << 0) -- unsupported macro: MYSQL_SHUTDOWN_KILLABLE_TRANS (unsigned char)(1 << 1) -- unsupported macro: MYSQL_SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2) -- unsupported macro: MYSQL_SHUTDOWN_KILLABLE_UPDATE (unsigned char)(1 << 3) -- arg-macro: function net_new_transaction (net) -- return (net).pkt_nr:=0; NET_HEADER_SIZE : constant := 4; -- /usr/include/mysql/mysql_com.h:402 COMP_HEADER_SIZE : constant := 3; -- /usr/include/mysql/mysql_com.h:403 -- unsupported macro: NULL_LENGTH ((unsigned long) ~0) MYSQL_STMT_HEADER : constant := 4; -- /usr/include/mysql/mysql_com.h:464 MYSQL_LONG_DATA_HEADER : constant := 6; -- /usr/include/mysql/mysql_com.h:465 -- Copyright (C) 2000 MySQL AB -- 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; version 2 of the License. -- 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, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --** Common definition between mysql server & client -- -- USER_HOST_BUFF_SIZE -- length of string buffer, that is enough to contain -- username and hostname parts of the user identifier with trailing zero in -- MySQL standard format: -- user_name_part@host_name_part\0 -- -- You should add new commands to the end of this list, otherwise old -- servers won't be able to handle them as 'unsupported'. -- subtype enum_server_command is unsigned; COM_SLEEP : constant enum_server_command := 0; COM_QUIT : constant enum_server_command := 1; COM_INIT_DB : constant enum_server_command := 2; COM_QUERY : constant enum_server_command := 3; COM_FIELD_LIST : constant enum_server_command := 4; COM_CREATE_DB : constant enum_server_command := 5; COM_DROP_DB : constant enum_server_command := 6; COM_REFRESH : constant enum_server_command := 7; COM_SHUTDOWN : constant enum_server_command := 8; COM_STATISTICS : constant enum_server_command := 9; COM_PROCESS_INFO : constant enum_server_command := 10; COM_CONNECT : constant enum_server_command := 11; COM_PROCESS_KILL : constant enum_server_command := 12; COM_DEBUG : constant enum_server_command := 13; COM_PING : constant enum_server_command := 14; COM_TIME : constant enum_server_command := 15; COM_DELAYED_INSERT : constant enum_server_command := 16; COM_CHANGE_USER : constant enum_server_command := 17; COM_BINLOG_DUMP : constant enum_server_command := 18; COM_TABLE_DUMP : constant enum_server_command := 19; COM_CONNECT_OUT : constant enum_server_command := 20; COM_REGISTER_SLAVE : constant enum_server_command := 21; COM_STMT_PREPARE : constant enum_server_command := 22; COM_STMT_EXECUTE : constant enum_server_command := 23; COM_STMT_SEND_LONG_DATA : constant enum_server_command := 24; COM_STMT_CLOSE : constant enum_server_command := 25; COM_STMT_RESET : constant enum_server_command := 26; COM_SET_OPTION : constant enum_server_command := 27; COM_STMT_FETCH : constant enum_server_command := 28; COM_END : constant enum_server_command := 29; -- /usr/include/mysql/mysql_com.h:52:1 -- don't forget to update const char *command_name[] in sql_parse.cc -- Must be last -- Length of random string sent by server on handshake; this is also length of -- obfuscated password, recieved from client -- -- length of password stored in the db: new passwords are preceeded with '*' -- The following are only sent to new clients -- The following can't be set with mysql_refresh() -- RESET (remove all queries) from query cache -- The server was able to fulfill the clients request and opened a -- read-only non-scrollable cursor for a query. This flag comes -- in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands. -- -- This flag is sent when a read-only cursor is exhausted, in reply to -- COM_STMT_FETCH command. -- -- Only C -- skipped empty struct st_vio -- skipped empty struct Vio type anon1416_anon1442_array is array (0 .. 511) of aliased char; type anon1416_anon1443_array is array (0 .. 5) of aliased char; type st_net is record the_vio : System.Address; -- /usr/include/mysql/mysql_com.h:181:8 buff : access unsigned_char; -- /usr/include/mysql/mysql_com.h:182:18 buff_end : access unsigned_char; -- /usr/include/mysql/mysql_com.h:182:24 write_pos : access unsigned_char; -- /usr/include/mysql/mysql_com.h:182:34 read_pos : access unsigned_char; -- /usr/include/mysql/mysql_com.h:182:45 fd : aliased my_socket; -- /usr/include/mysql/mysql_com.h:183:13 max_packet : aliased unsigned_long; -- /usr/include/mysql/mysql_com.h:184:17 max_packet_size : aliased unsigned_long; -- /usr/include/mysql/mysql_com.h:184:28 pkt_nr : aliased unsigned; -- /usr/include/mysql/mysql_com.h:185:16 compress_pkt_nr : aliased unsigned; -- /usr/include/mysql/mysql_com.h:185:23 write_timeout : aliased unsigned; -- /usr/include/mysql/mysql_com.h:186:16 read_timeout : aliased unsigned; -- /usr/include/mysql/mysql_com.h:186:31 retry_count : aliased unsigned; -- /usr/include/mysql/mysql_com.h:186:45 fcntl : aliased int; -- /usr/include/mysql/mysql_com.h:187:7 compress : aliased char; -- /usr/include/mysql/mysql_com.h:188:11 remain_in_buf : aliased unsigned_long; -- /usr/include/mysql/mysql_com.h:194:17 length : aliased unsigned_long; -- /usr/include/mysql/mysql_com.h:194:31 buf_length : aliased unsigned_long; -- /usr/include/mysql/mysql_com.h:194:39 where_b : aliased unsigned_long; -- /usr/include/mysql/mysql_com.h:194:51 return_status : access unsigned; -- /usr/include/mysql/mysql_com.h:195:17 reading_or_writing : aliased unsigned_char; -- /usr/include/mysql/mysql_com.h:196:17 save_char : aliased char; -- /usr/include/mysql/mysql_com.h:197:8 no_send_ok : aliased char; -- /usr/include/mysql/mysql_com.h:198:11 no_send_eof : aliased char; -- /usr/include/mysql/mysql_com.h:199:11 no_send_error : aliased char; -- /usr/include/mysql/mysql_com.h:204:11 last_error : aliased anon1416_anon1442_array; -- /usr/include/mysql/mysql_com.h:210:8 sqlstate : aliased anon1416_anon1443_array; -- /usr/include/mysql/mysql_com.h:210:39 last_errno : aliased unsigned; -- /usr/include/mysql/mysql_com.h:211:16 error : aliased unsigned_char; -- /usr/include/mysql/mysql_com.h:212:17 query_cache_query : Interfaces.C.Strings.chars_ptr; -- mysql_mysql_h.gptr; -- /usr/include/mysql/mysql_com.h:218:8 report_error : aliased char; -- /usr/include/mysql/mysql_com.h:220:11 return_errno : aliased char; -- /usr/include/mysql/mysql_com.h:221:11 end record; pragma Convention (C, st_net); -- /usr/include/mysql/mysql_com.h:179:16 -- For Perl DBI/dbd -- The following variable is set if we are doing several queries in one -- command ( as in LOAD TABLE ... FROM MASTER ), -- and do not want to confuse the client with OK at the wrong time -- -- For SPs and other things that do multiple stmts -- For SPs' first version read-only cursors -- Set if OK packet is already sent, and we do not need to send error -- messages -- -- Pointer to query object in query cache, do not equal NULL (0) for -- queries in cache that have not stored its results yet -- -- 'query_cache_query' should be accessed only via query cache -- functions and methods to maintain proper locking. -- -- We should report error (we have unreported error) subtype NET is st_net; subtype enum_field_types is unsigned; MYSQL_TYPE_DECIMAL : constant enum_field_types := 0; MYSQL_TYPE_TINY : constant enum_field_types := 1; MYSQL_TYPE_SHORT : constant enum_field_types := 2; MYSQL_TYPE_LONG : constant enum_field_types := 3; MYSQL_TYPE_FLOAT : constant enum_field_types := 4; MYSQL_TYPE_DOUBLE : constant enum_field_types := 5; MYSQL_TYPE_NULL : constant enum_field_types := 6; MYSQL_TYPE_TIMESTAMP : constant enum_field_types := 7; MYSQL_TYPE_LONGLONG : constant enum_field_types := 8; MYSQL_TYPE_INT24 : constant enum_field_types := 9; MYSQL_TYPE_DATE : constant enum_field_types := 10; MYSQL_TYPE_TIME : constant enum_field_types := 11; MYSQL_TYPE_DATETIME : constant enum_field_types := 12; MYSQL_TYPE_YEAR : constant enum_field_types := 13; MYSQL_TYPE_NEWDATE : constant enum_field_types := 14; MYSQL_TYPE_VARCHAR : constant enum_field_types := 15; MYSQL_TYPE_BIT : constant enum_field_types := 16; MYSQL_TYPE_NEWDECIMAL : constant enum_field_types := 246; MYSQL_TYPE_ENUM : constant enum_field_types := 247; MYSQL_TYPE_SET : constant enum_field_types := 248; MYSQL_TYPE_TINY_BLOB : constant enum_field_types := 249; MYSQL_TYPE_MEDIUM_BLOB : constant enum_field_types := 250; MYSQL_TYPE_LONG_BLOB : constant enum_field_types := 251; MYSQL_TYPE_BLOB : constant enum_field_types := 252; MYSQL_TYPE_VAR_STRING : constant enum_field_types := 253; MYSQL_TYPE_STRING : constant enum_field_types := 254; MYSQL_TYPE_GEOMETRY : constant enum_field_types := 255; -- /usr/include/mysql/mysql_com.h:226:6 -- For backward compatibility -- Shutdown/kill enums and constants -- Bits for THD::killable. subtype mysql_enum_shutdown_level is unsigned; SHUTDOWN_DEFAULT : constant mysql_enum_shutdown_level := 0; SHUTDOWN_WAIT_CONNECTIONS : constant mysql_enum_shutdown_level := 1; SHUTDOWN_WAIT_TRANSACTIONS : constant mysql_enum_shutdown_level := 2; SHUTDOWN_WAIT_UPDATES : constant mysql_enum_shutdown_level := 8; SHUTDOWN_WAIT_ALL_BUFFERS : constant mysql_enum_shutdown_level := 16; SHUTDOWN_WAIT_CRITICAL_BUFFERS : constant mysql_enum_shutdown_level := 17; KILL_QUERY : constant mysql_enum_shutdown_level := 254; KILL_CONNECTION : constant mysql_enum_shutdown_level := 255; -- /usr/include/mysql/mysql_com.h:288:6 -- We want levels to be in growing order of hardness (because we use number -- comparisons). Note that DEFAULT does not respect the growing property, but -- it's ok. -- -- wait for existing connections to finish -- wait for existing trans to finish -- wait for existing updates to finish (=> no partial MyISAM update) -- flush InnoDB buffers and other storage engines' buffers -- don't flush InnoDB buffers, flush other storage engines' buffers -- Now the 2 levels of the KILL command subtype enum_cursor_type is unsigned; CURSOR_TYPE_NO_CURSOR : constant enum_cursor_type := 0; CURSOR_TYPE_READ_ONLY : constant enum_cursor_type := 1; CURSOR_TYPE_FOR_UPDATE : constant enum_cursor_type := 2; CURSOR_TYPE_SCROLLABLE : constant enum_cursor_type := 4; -- /usr/include/mysql/mysql_com.h:314:1 -- options for mysql_set_option subtype enum_mysql_set_option is unsigned; MYSQL_OPTION_MULTI_STATEMENTS_ON : constant enum_mysql_set_option := 0; MYSQL_OPTION_MULTI_STATEMENTS_OFF : constant enum_mysql_set_option := 1; -- /usr/include/mysql/mysql_com.h:324:1 function my_net_init (arg1 : access st_net; arg2 : System.Address) return char; -- /usr/include/mysql/mysql_com.h:335:9 pragma Import (C, my_net_init, "my_net_init"); procedure my_net_local_init (arg1 : access st_net); -- /usr/include/mysql/mysql_com.h:336:6 pragma Import (C, my_net_local_init, "my_net_local_init"); procedure net_end (arg1 : access st_net); -- /usr/include/mysql/mysql_com.h:337:6 pragma Import (C, net_end, "net_end"); procedure net_clear (arg1 : access st_net); -- /usr/include/mysql/mysql_com.h:338:6 pragma Import (C, net_clear, "net_clear"); function net_realloc (arg1 : access st_net; arg2 : unsigned_long) return char; -- /usr/include/mysql/mysql_com.h:339:9 pragma Import (C, net_realloc, "net_realloc"); function net_flush (arg1 : access st_net) return char; -- /usr/include/mysql/mysql_com.h:340:9 pragma Import (C, net_flush, "net_flush"); function my_net_write (arg1 : access st_net; arg2 : Interfaces.C.Strings.chars_ptr; arg3 : unsigned_long) return char; -- /usr/include/mysql/mysql_com.h:341:9 pragma Import (C, my_net_write, "my_net_write"); function net_write_command (arg1 : access st_net; arg2 : unsigned_char; arg3 : Interfaces.C.Strings.chars_ptr; arg4 : unsigned_long; arg5 : Interfaces.C.Strings.chars_ptr; arg6 : unsigned_long) return char; -- /usr/include/mysql/mysql_com.h:342:9 pragma Import (C, net_write_command, "net_write_command"); function net_real_write (arg1 : access st_net; arg2 : Interfaces.C.Strings.chars_ptr; arg3 : unsigned_long) return int; -- /usr/include/mysql/mysql_com.h:345:5 pragma Import (C, net_real_write, "net_real_write"); function my_net_read (arg1 : access st_net) return unsigned_long; -- /usr/include/mysql/mysql_com.h:346:15 pragma Import (C, my_net_read, "my_net_read"); -- The following function is not meant for normal usage -- Currently it's used internally by manager.c -- -- skipped empty struct sockaddr function my_connect (arg1 : my_socket; arg2 : System.Address; arg3 : unsigned; arg4 : unsigned) return int; -- /usr/include/mysql/mysql_com.h:358:5 pragma Import (C, my_connect, "my_connect"); type rand_struct is record seed1 : aliased unsigned_long; seed2 : aliased unsigned_long; max_value : aliased unsigned_long; max_value_dbl : aliased double; end record; pragma Convention (C, rand_struct); -- The following is for user defined functions subtype Item_result is unsigned; STRING_RESULT : constant Item_result := 0; REAL_RESULT : constant Item_result := 1; INT_RESULT : constant Item_result := 2; ROW_RESULT : constant Item_result := 3; DECIMAL_RESULT : constant Item_result := 4; -- Number of arguments type st_udf_args is record arg_count : aliased unsigned; arg_type : access Item_result; args : System.Address; lengths : access unsigned_long; maybe_null : Interfaces.C.Strings.chars_ptr; attributes : System.Address; attribute_lengths : access unsigned_long; end record; pragma Convention (C, st_udf_args); -- Pointer to item_results -- Pointer to argument -- Length of string arguments -- Set to 1 for all maybe_null args -- Pointer to attribute name -- Length of attribute arguments subtype UDF_ARGS is st_udf_args; -- This holds information about the result -- 1 if function can return NULL type st_udf_init is record maybe_null : aliased char; decimals : aliased unsigned; max_length : aliased unsigned_long; ptr : Interfaces.C.Strings.chars_ptr; const_item : aliased char; end record; pragma Convention (C, st_udf_init); -- for real functions -- For string functions -- free pointer for function data -- 1 if function always returns the same value subtype UDF_INIT is st_udf_init; -- -- TODO: add a notion for determinism of the UDF. -- See Item_udf_func::update_used_tables () -- -- Constants when using compression -- Prototypes to password functions -- These functions are used for authentication by client and server and -- implemented in sql/password.c -- procedure randominit (arg1 : access rand_struct; arg2 : unsigned_long; arg3 : unsigned_long); pragma Import (C, randominit, "randominit"); function my_rnd (arg1 : access rand_struct) return double; pragma Import (C, my_rnd, "my_rnd"); procedure create_random_string (arg1 : Interfaces.C.Strings.chars_ptr; arg2 : unsigned; arg3 : access rand_struct); pragma Import (C, create_random_string, "create_random_string"); procedure hash_password (arg1 : access unsigned_long; arg2 : Interfaces.C.Strings.chars_ptr; arg3 : unsigned); pragma Import (C, hash_password, "hash_password"); procedure Make_Scrambled_Password_323 (Arg1 : Interfaces.C.Strings.chars_ptr; arg2 : Interfaces.C.Strings.chars_ptr); pragma Import (C, make_scrambled_password_323, "make_scrambled_password_323"); procedure scramble_323 (arg1 : Interfaces.C.Strings.chars_ptr; arg2 : Interfaces.C.Strings.chars_ptr; arg3 : Interfaces.C.Strings.chars_ptr); pragma Import (C, scramble_323, "scramble_323"); function check_scramble_323 (arg1 : Interfaces.C.Strings.chars_ptr; arg2 : Interfaces.C.Strings.chars_ptr; arg3 : access unsigned_long) return char; pragma Import (C, check_scramble_323, "check_scramble_323"); procedure Get_Salt_From_Password_323 (Arg1 : access Unsigned_Long; arg2 : Interfaces.C.Strings.chars_ptr); pragma Import (C, get_salt_from_password_323, "get_salt_from_password_323"); procedure Make_Password_From_Salt_323 (Arg1 : Interfaces.C.Strings.chars_ptr; arg2 : access unsigned_long); pragma Import (C, make_password_from_salt_323, "make_password_from_salt_323"); procedure Make_Scrambled_Password (Arg1 : Interfaces.C.Strings.chars_ptr; arg2 : Interfaces.C.Strings.chars_ptr); pragma Import (C, make_scrambled_password, "make_scrambled_password"); procedure scramble (arg1 : Interfaces.C.Strings.chars_ptr; arg2 : Interfaces.C.Strings.chars_ptr; arg3 : Interfaces.C.Strings.chars_ptr); pragma Import (C, scramble, "scramble"); function check_scramble (arg1 : Interfaces.C.Strings.chars_ptr; arg2 : Interfaces.C.Strings.chars_ptr; arg3 : access unsigned_char) return char; pragma Import (C, check_scramble, "check_scramble"); procedure Get_Salt_From_Password (Arg1 : access Unsigned_Char; arg2 : Interfaces.C.Strings.chars_ptr); pragma Import (C, get_salt_from_password, "get_salt_from_password"); procedure Make_Password_From_Salt (Arg1 : Interfaces.C.Strings.chars_ptr; arg2 : access unsigned_char); pragma Import (C, make_password_from_salt, "make_password_from_salt"); function octet2hex (arg1 : Interfaces.C.Strings.chars_ptr; arg2 : Interfaces.C.Strings.chars_ptr; arg3 : unsigned) return Interfaces.C.Strings.chars_ptr; pragma Import (C, octet2hex, "octet2hex"); -- end of password.c function Get_Tty_Password (Arg1 : Interfaces.C.Strings.chars_ptr) return Interfaces.C.Strings.chars_ptr; pragma Import (C, get_tty_password, "get_tty_password"); function mysql_errno_to_sqlstate (arg1 : unsigned) return Interfaces.C.Strings.chars_ptr; pragma Import (C, mysql_errno_to_sqlstate, "mysql_errno_to_sqlstate"); -- Some other useful functions function my_init return char; pragma Import (C, my_init, "my_init"); function modify_defaults_file (arg1 : Interfaces.C.Strings.chars_ptr; arg2 : Interfaces.C.Strings.chars_ptr; arg3 : Interfaces.C.Strings.chars_ptr; arg4 : Interfaces.C.Strings.chars_ptr; arg5 : int) return int; pragma Import (C, modify_defaults_file, "modify_defaults_file"); function load_defaults (arg1 : Interfaces.C.Strings.chars_ptr; arg2 : System.Address; arg3 : access int; arg4 : System.Address) return int; pragma Import (C, load_defaults, "load_defaults"); function my_thread_init return char; pragma Import (C, my_thread_init, "my_thread_init"); procedure my_thread_end; pragma Import (C, my_thread_end, "my_thread_end"); end Mysql.Com ;
49.468852
123
0.710664
06156844768b15351a95330b280816d497b85fd3
565
ads
Ada
source/image/required/s-wchwts.ads
ytomino/drake
4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2
[ "MIT" ]
33
2015-04-04T09:19:36.000Z
2021-11-10T05:33:34.000Z
source/image/required/s-wchwts.ads
ytomino/drake
4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2
[ "MIT" ]
8
2017-11-14T13:05:07.000Z
2018-08-09T15:28:49.000Z
source/image/required/s-wchwts.ads
ytomino/drake
4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2
[ "MIT" ]
9
2015-02-03T17:09:53.000Z
2021-11-12T01:16:05.000Z
pragma License (Unrestricted); -- implementation unit required by compiler package System.WCh_WtS is pragma Pure; -- (s-wchcon.ads) type WC_Encoding_Method is range 1 .. 6; -- required for T'Wide_Value by compiler (s-wchwts.ads) function Wide_String_To_String ( S : Wide_String; EM : WC_Encoding_Method) return String; -- required for T'Wide_Wide_Value by compiler (s-wchwts.ads) function Wide_Wide_String_To_String ( S : Wide_Wide_String; EM : WC_Encoding_Method) return String; end System.WCh_WtS;
25.681818
64
0.699115
506a3aa26931cbcfba930e4736a63b5da70599f6
20,570
adb
Ada
regtests/are-generator-ada2012-tests.adb
stcarrez/resource-embedder
b1134306db459f87506703ba0a266c0b5e0045b9
[ "Apache-2.0" ]
7
2021-06-04T16:58:59.000Z
2021-06-14T08:51:11.000Z
regtests/are-generator-ada2012-tests.adb
stcarrez/resource-embedder
b1134306db459f87506703ba0a266c0b5e0045b9
[ "Apache-2.0" ]
2
2021-07-20T15:25:33.000Z
2021-08-20T18:39:58.000Z
regtests/are-generator-ada2012-tests.adb
stcarrez/resource-embedder
b1134306db459f87506703ba0a266c0b5e0045b9
[ "Apache-2.0" ]
null
null
null
----------------------------------------------------------------------- -- are-generator-ada2012-tests -- Tests for Ada generator -- Copyright (C) 2021 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- 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 Ada.Directories; with Util.Test_Caller; package body Are.Generator.Ada2012.Tests is Expect_Dir : constant String := "regtests/expect/ada/"; function Tool return String; package Caller is new Util.Test_Caller (Test, "Are.Generator.Ada"); function Tool return String is begin return "bin/are" & Are.Testsuite.EXE; end Tool; procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test Are.To_Ada_Name", Test_Ada_Names'Access); Caller.Add_Test (Suite, "Test Are.Generate_Ada1", Test_Generate_Ada1'Access); Caller.Add_Test (Suite, "Test Are.Generate_Ada2", Test_Generate_Ada2'Access); Caller.Add_Test (Suite, "Test Are.Generate_Ada3", Test_Generate_Ada3'Access); Caller.Add_Test (Suite, "Test Are.Generate_Ada4", Test_Generate_Ada4'Access); Caller.Add_Test (Suite, "Test Are.Generate_Ada5", Test_Generate_Ada5'Access); Caller.Add_Test (Suite, "Test Are.Generate_Ada6", Test_Generate_Ada6'Access); Caller.Add_Test (Suite, "Test Are.Generate_Ada7", Test_Generate_Ada7'Access); Caller.Add_Test (Suite, "Test Are.Generate_Ada8", Test_Generate_Ada8'Access); Caller.Add_Test (Suite, "Test Are.Generate_Merge", Test_Generate_Merge'Access); Caller.Add_Test (Suite, "Test Are.Generate_Concat", Test_Generate_Concat'Access); Caller.Add_Test (Suite, "Test Are.Generate_Bundle", Test_Generate_Bundle'Access); Caller.Add_Test (Suite, "Test Are.Generate_Lines", Test_Generate_Lines'Access); end Add_Tests; procedure Test_Generate_Ada1 (T : in out Test) is Dir : constant String := Util.Tests.Get_Test_Path (""); Web : constant String := "regtests/files/test-ada-1/web"; Result : Ada.Strings.Unbounded.Unbounded_String; begin -- Generate the resources.ad[bs] files T.Execute (Tool & " -o " & Dir & " --name-access --content-only --resource=Resources1 --fileset '**/*' " & Web, Result); T.Assert (Ada.Directories.Exists (Ada.Directories.Compose (Dir, "resources1.ads")), "Resource file 'resources1.ads' not generated"); T.Assert (Ada.Directories.Exists (Ada.Directories.Compose (Dir, "resources1.adb")), "Resource file 'resources1.adb' not generated"); -- Build the test program. T.Execute ("gprbuild -Pregtests/files/test-ada-1/test1.gpr", Result); T.Assert (Ada.Directories.Exists ("bin/test1" & Are.Testsuite.EXE), "Binary file 'bin/test1' not created"); T.Execute ("bin/test1" & Are.Testsuite.EXE, Result); Util.Tests.Assert_Matches (T, "PASS: body { background: #eee; }" & "p { color: #2a2a2a; }", Result, "Invalid generation"); end Test_Generate_Ada1; procedure Test_Generate_Ada2 (T : in out Test) is Dir : constant String := Util.Tests.Get_Test_Path (""); Web : constant String := "regtests/files/test-ada-2"; Rule : constant String := "regtests/files/test-ada-2/package.xml"; Result : Ada.Strings.Unbounded.Unbounded_String; begin -- Generate the resources.ad[bs] files T.Execute (Tool & " -o " & Dir & " --name-access --content-only --rule=" & Rule & " " & Web, Result); T.Assert (Ada.Directories.Exists (Ada.Directories.Compose (Dir, "resources2.ads")), "Resource file 'resources2.ads' not generated"); T.Assert (Ada.Directories.Exists (Ada.Directories.Compose (Dir, "resources2.adb")), "Resource file 'resources2.adb' not generated"); -- Build the test program. T.Execute ("gprbuild -Pregtests/files/test-ada-2/test2.gpr", Result); T.Assert (Ada.Directories.Exists ("bin/test2" & Are.Testsuite.EXE), "Binary file 'bin/test2' not created"); T.Execute ("bin/test2" & Are.Testsuite.EXE, Result); Util.Tests.Assert_Matches (T, "PASS", Result, "Invalid generation"); end Test_Generate_Ada2; procedure Test_Generate_Ada3 (T : in out Test) is Dir : constant String := Util.Tests.Get_Test_Path (""); Web : constant String := "regtests/files/test-ada-3"; Rule : constant String := "regtests/files/test-ada-3/package.xml"; Result : Ada.Strings.Unbounded.Unbounded_String; begin -- Generate the resources.ad[bs] files T.Execute (Tool & " -o " & Dir & " --no-type-declaration --content-only --name-access --rule=" & Rule & " " & Web, Result); T.Assert (Ada.Directories.Exists (Ada.Directories.Compose (Dir, "resource-web.ads")), "Resource file 'resource-web.ads' not generated"); T.Assert (Ada.Directories.Exists (Ada.Directories.Compose (Dir, "resource-web.adb")), "Resource file 'resource-web.adb' not generated"); T.Assert (Ada.Directories.Exists (Ada.Directories.Compose (Dir, "resource-config.ads")), "Resource file 'resource-config.ads' not generated"); T.Assert (Ada.Directories.Exists (Ada.Directories.Compose (Dir, "resource-config.adb")), "Resource file 'resource-config.adb' not generated"); -- Build the test program. T.Execute ("gprbuild -Pregtests/files/test-ada-3/test3.gpr", Result); T.Assert (Ada.Directories.Exists ("bin/test3" & Are.Testsuite.EXE), "Binary file 'bin/test3' not created"); T.Execute ("bin/test3" & Are.Testsuite.EXE, Result); Util.Tests.Assert_Matches (T, "PASS: <config></config>", Result, "Invalid generation"); end Test_Generate_Ada3; procedure Test_Generate_Ada4 (T : in out Test) is Dir : constant String := Util.Tests.Get_Test_Path (""); Web : constant String := "regtests/files/test-ada-4"; Rule : constant String := "regtests/files/test-ada-4/package.xml"; Result : Ada.Strings.Unbounded.Unbounded_String; begin -- Generate the resources.ad[bs] files T.Execute (Tool & " -o " & Dir & " --name-access --content-only --rule=" & Rule & " " & Web, Result); T.Assert (Ada.Directories.Exists (Ada.Directories.Compose (Dir, "resource4.ads")), "Resource file 'resource4.ads' not generated"); T.Assert (Ada.Directories.Exists (Ada.Directories.Compose (Dir, "resource4.adb")), "Resource file 'resource4.adb' not generated"); -- Build the test program. T.Execute ("gprbuild -Pregtests/files/test-ada-4/test4.gpr", Result); T.Assert (Ada.Directories.Exists ("bin/test4" & Are.Testsuite.EXE), "Binary file 'bin/test4' not created"); T.Execute ("bin/test4" & Are.Testsuite.EXE, Result); Util.Tests.Assert_Matches (T, "PASS: <config>test4</config>", Result, "Invalid generation"); end Test_Generate_Ada4; procedure Test_Generate_Ada5 (T : in out Test) is Dir : constant String := Util.Tests.Get_Test_Path (""); Web : constant String := "regtests/files/test-ada-5/web"; Result : Ada.Strings.Unbounded.Unbounded_String; begin -- Generate the resources.ad[bs] files T.Execute (Tool & " -o " & Dir & " --name-access --content-only --var-prefix Id_" & " --resource=Resources5 --fileset '**/*' " & Web, Result); T.Assert (Ada.Directories.Exists (Ada.Directories.Compose (Dir, "resources5.ads")), "Resource file 'resources5.ads' not generated"); T.Assert (Ada.Directories.Exists (Ada.Directories.Compose (Dir, "resources5.adb")), "Resource file 'resources5.adb' not generated"); -- Build the test program. T.Execute ("gprbuild -Pregtests/files/test-ada-5/test5.gpr", Result); T.Assert (Ada.Directories.Exists ("bin/test5" & Are.Testsuite.EXE), "Binary file 'bin/test5' not created"); T.Execute ("bin/test5" & Are.Testsuite.EXE, Result); Util.Tests.Assert_Matches (T, "PASS: body { background: #eee; }p" & " { color: #2a2a2a; }", Result, "Invalid generation"); end Test_Generate_Ada5; procedure Test_Generate_Ada6 (T : in out Test) is Dir : constant String := Util.Tests.Get_Test_Path (""); Web : constant String := "regtests/files/test-ada-6/web"; Result : Ada.Strings.Unbounded.Unbounded_String; begin -- Generate the resources.ad[bs] files T.Execute (Tool & " -o " & Dir & " --content-only --var-prefix Id_ --resource=Resources6 --fileset '**/*' " & Web, Result); T.Assert (Ada.Directories.Exists (Ada.Directories.Compose (Dir, "resources6.ads")), "Resource file 'resources6.ads' not generated"); T.Assert (not Ada.Directories.Exists (Ada.Directories.Compose (Dir, "resources6.adb")), "Resource file 'resources6.adb' was generated (expecting no body)"); -- Build the test program. T.Execute ("gprbuild -Pregtests/files/test-ada-6/test6.gpr", Result); T.Assert (Ada.Directories.Exists ("bin/test6" & Are.Testsuite.EXE), "Binary file 'bin/test6' not created"); T.Execute ("bin/test6" & Are.Testsuite.EXE, Result); Util.Tests.Assert_Matches (T, "PASS: body { background: #eee; }p " & "{ color: #2a2a2a; }", Result, "Invalid generation"); end Test_Generate_Ada6; procedure Test_Generate_Ada7 (T : in out Test) is Dir : constant String := Util.Tests.Get_Test_Path (""); Web : constant String := "regtests/files/test-ada-7"; Rule : constant String := "regtests/files/test-ada-7/package.xml"; Result : Ada.Strings.Unbounded.Unbounded_String; begin -- Generate the resources.ad[bs] files T.Execute (Tool & " -o " & Dir & " --ignore-case --name-access --content-only --rule=" & Rule & " " & Web, Result); T.Assert (Ada.Directories.Exists (Ada.Directories.Compose (Dir, "resources7.ads")), "Resource file 'resources7.ads' not generated"); T.Assert (Ada.Directories.Exists (Ada.Directories.Compose (Dir, "resources7.adb")), "Resource file 'resources7.adb' not generated"); -- Build the test program. T.Execute ("gprbuild -Pregtests/files/test-ada-7/test7.gpr", Result); T.Assert (Ada.Directories.Exists ("bin/test7" & Are.Testsuite.EXE), "Binary file 'bin/test7' not created"); T.Execute ("bin/test7" & Are.Testsuite.EXE, Result); Util.Tests.Assert_Matches (T, "PASS: <config>test7</config>", Result, "Invalid generation"); end Test_Generate_Ada7; procedure Test_Generate_Ada8 (T : in out Test) is Dir : constant String := Util.Tests.Get_Test_Path (""); Web : constant String := "regtests/files/test-ada-8"; Rule : constant String := "regtests/files/test-ada-8/package.xml"; Result : Ada.Strings.Unbounded.Unbounded_String; begin -- Generate the resources.ad[bs] files T.Execute (Tool & " -o " & Dir & " --ignore-case --name-access --content-only --rule=" & Rule & " " & Web, Result); T.Assert (Ada.Directories.Exists (Ada.Directories.Compose (Dir, "resources8.ads")), "Resource file 'resources8.ads' not generated"); T.Assert (Ada.Directories.Exists (Ada.Directories.Compose (Dir, "resources8.adb")), "Resource file 'resources78.adb' not generated"); -- Build the test program. T.Execute ("gprbuild -Pregtests/files/test-ada-8/test8.gpr", Result); T.Assert (Ada.Directories.Exists ("bin/test8" & Are.Testsuite.EXE), "Binary file 'bin/test8' not created"); T.Execute ("bin/test8" & Are.Testsuite.EXE, Result); Util.Tests.Assert_Matches (T, "PASS: " & ASCII.HT & "<config>.*", Result, "Invalid generation"); Util.Tests.Assert_Matches (T, ".*éèà@.*", Result, "Invalid generation"); end Test_Generate_Ada8; procedure Test_Generate_Merge (T : in out Test) is Dir : constant String := Util.Tests.Get_Test_Path (""); Web : constant String := "examples/c-web"; Rule : constant String := "examples/c-web/package.xml"; Web_Ads : constant String := Ada.Directories.Compose (Dir, "web.ads"); Web_Adb : constant String := Ada.Directories.Compose (Dir, "web.adb"); Result : Ada.Strings.Unbounded.Unbounded_String; begin -- Generate the web.ad[bs] files T.Execute (Tool & " -o " & Dir & " --content-only --name-access --rule=" & Rule & " " & Web, Result); T.Assert (Ada.Directories.Exists (Web_Ads), "Resource file 'web.ads' not generated"); T.Assert (Ada.Directories.Exists (Web_Adb), "Resource file 'web.adb' not generated"); Util.Tests.Assert_Equal_Files (T => T, Expect => Util.Tests.Get_Path (Expect_Dir & "web.ads"), Test => Web_Ads, Message => "Invalid Ada spec generation"); Util.Tests.Assert_Equal_Files (T => T, Expect => Util.Tests.Get_Path (Expect_Dir & "web.adb"), Test => Web_Adb, Message => "Invalid Ada body generation"); end Test_Generate_Merge; procedure Test_Generate_Concat (T : in out Test) is Dir : constant String := Util.Tests.Get_Test_Path (""); Rule : constant String := "regtests/files/package-concat.xml"; Concat_Ads : constant String := Ada.Directories.Compose (Dir, "concat.ads"); Concat_Adb : constant String := Ada.Directories.Compose (Dir, "concat.adb"); Result : Ada.Strings.Unbounded.Unbounded_String; begin -- Generate the concat.ad[bs] files T.Execute (Tool & " -o " & Dir & " --content-only --name-access --rule=" & Rule & " " & " regtests/files/test-ada-2 regtests/files/test-ada-3" & " regtests/files/test-ada-4 regtests/files/test-c-1", Result); T.Assert (Ada.Directories.Exists (Concat_Ads), "Resource file 'concat.ads' not generated"); T.Assert (Ada.Directories.Exists (Concat_Adb), "Resource file 'concat.adb' not generated"); Util.Tests.Assert_Equal_Files (T => T, Expect => Util.Tests.Get_Path (Expect_Dir & "concat.ads"), Test => Concat_Ads, Message => "Invalid Ada spec generation"); Util.Tests.Assert_Equal_Files (T => T, Expect => Util.Tests.Get_Path (Expect_Dir & "concat.adb"), Test => Concat_Adb, Message => "Invalid Ada body generation"); end Test_Generate_Concat; procedure Test_Generate_Bundle (T : in out Test) is Dir : constant String := Util.Tests.Get_Test_Path (""); Web : constant String := "examples/ada-bundles"; Rule : constant String := "examples/ada-bundles/package.xml"; Bundle_Ads : constant String := Ada.Directories.Compose (Dir, "bundle.ads"); Bundle_Adb : constant String := Ada.Directories.Compose (Dir, "bundle.adb"); Result : Ada.Strings.Unbounded.Unbounded_String; begin -- Generate the bundle.ad[bs] files T.Execute (Tool & " -o " & Dir & " --content-only --name-access --rule=" & Rule & " " & Web, Result); T.Assert (Ada.Directories.Exists (Bundle_Ads), "Resource file 'bundle.ads' not generated"); T.Assert (Ada.Directories.Exists (Bundle_Adb), "Resource file 'bundle.adb' not generated"); Util.Tests.Assert_Equal_Files (T => T, Expect => Util.Tests.Get_Path (Expect_Dir & "bundle.ads"), Test => Bundle_Ads, Message => "Invalid Ada spec generation"); Util.Tests.Assert_Equal_Files (T => T, Expect => Util.Tests.Get_Path (Expect_Dir & "bundle.adb"), Test => Bundle_Adb, Message => "Invalid Ada body generation"); end Test_Generate_Bundle; procedure Test_Generate_Lines (T : in out Test) is Dir : constant String := Util.Tests.Get_Test_Path (""); Rule : constant String := "regtests/files/package-lines.xml"; Files : constant String := "regtests/files"; Lines_Ads : constant String := Ada.Directories.Compose (Dir, "lines.ads"); Result : Ada.Strings.Unbounded.Unbounded_String; begin -- Generate the lines.ads files T.Execute (Tool & " -o " & Dir & " --content-only --var-prefix Id_ --rule=" & Rule & " " & Files & "/lines-empty", Result); T.Assert (Ada.Directories.Exists (Lines_Ads), "Resource file 'lines.ads' not generated"); Util.Tests.Assert_Equal_Files (T => T, Expect => Util.Tests.Get_Path (Expect_Dir & "lines-empty.ads"), Test => Lines_Ads, Message => "Invalid Ada spec generation"); Ada.Directories.Delete_File (Lines_Ads); T.Execute (Tool & " -o " & Dir & " --content-only --var-prefix Id_ --rule=" & Rule & " " & Files & "/lines-single", Result); T.Assert (Ada.Directories.Exists (Lines_Ads), "Resource file 'lines.ads' not generated"); Util.Tests.Assert_Equal_Files (T => T, Expect => Util.Tests.Get_Path (Expect_Dir & "lines-single.ads"), Test => Lines_Ads, Message => "Invalid Ada spec generation"); Ada.Directories.Delete_File (Lines_Ads); T.Execute (Tool & " -o " & Dir & " --content-only --var-prefix Id_ --rule=" & Rule & " " & Files & "/lines-multiple", Result); T.Assert (Ada.Directories.Exists (Lines_Ads), "Resource file 'lines.ads' not generated"); Util.Tests.Assert_Equal_Files (T => T, Expect => Util.Tests.Get_Path (Expect_Dir & "lines-multiple.ads"), Test => Lines_Ads, Message => "Invalid Ada spec generation"); end Test_Generate_Lines; procedure Test_Ada_Names (T : in out Test) is begin Util.Tests.Assert_Equals (T, "Id_file_c", To_Ada_Name ("Id_", "file.c"), "Bad conversion"); Util.Tests.Assert_Equals (T, "Id_file_name_h", To_Ada_Name ("Id_", "file-name.h"), "Bad conversion"); Util.Tests.Assert_Equals (T, "Plop_File_Dat", To_Ada_Name ("Plop_", "File.Dat"), "Bad conversion"); Util.Tests.Assert_Equals (T, "Id_File23_Dat", To_Ada_Name ("Id_", "File 23 .Dat"), "Bad conversion"); end Test_Ada_Names; end Are.Generator.Ada2012.Tests;
48.060748
94
0.58352
3d17dbcb48151e43e265e6989aa7f9a25ad30804
56
ads
Ada
tests/src/spawn_manager-tests.ads
persan/spawn-manager
9df1a2cda3a4f07ba594ead071fecb50546de650
[ "BSD-3-Clause" ]
1
2018-03-19T19:54:41.000Z
2018-03-19T19:54:41.000Z
tests/src/spawn_manager-tests.ads
persan/spawn-manager
9df1a2cda3a4f07ba594ead071fecb50546de650
[ "BSD-3-Clause" ]
null
null
null
tests/src/spawn_manager-tests.ads
persan/spawn-manager
9df1a2cda3a4f07ba594ead071fecb50546de650
[ "BSD-3-Clause" ]
null
null
null
package Spawn_Manager.Tests is end Spawn_Manager.Tests;
18.666667
30
0.857143
575617c087886e74daee502cbf3c8536560cf54e
110
adb
Ada
Util/llvm/test/FrontendAda/asm.adb
ianloic/unladen-swallow
28148f4ddbb3d519042de1f9fc9f1356fdd31e31
[ "PSF-2.0" ]
5
2020-06-30T05:06:40.000Z
2021-05-24T08:38:33.000Z
vm/external_libs/llvm/test/FrontendAda/asm.adb
gustin/rubinius
6c452c49973a6f3b4c3a323a413416cd3f8499c8
[ "BSD-3-Clause" ]
null
null
null
vm/external_libs/llvm/test/FrontendAda/asm.adb
gustin/rubinius
6c452c49973a6f3b4c3a323a413416cd3f8499c8
[ "BSD-3-Clause" ]
2
2015-10-01T18:28:20.000Z
2020-09-09T16:25:27.000Z
-- RUN: %llvmgcc -c %s with System.Machine_Code; procedure Asm is begin System.Machine_Code.Asm (""); end;
15.714286
32
0.7
3d82541b10378a199bffd38b953c20056270e3d5
6,106
ads
Ada
demo/src/stm32f429_discovery.ads
e3l6/SSMDev
2929757aab3842aefd84debb2d7c3e8b28c2b340
[ "MIT" ]
null
null
null
demo/src/stm32f429_discovery.ads
e3l6/SSMDev
2929757aab3842aefd84debb2d7c3e8b28c2b340
[ "MIT" ]
null
null
null
demo/src/stm32f429_discovery.ads
e3l6/SSMDev
2929757aab3842aefd84debb2d7c3e8b28c2b340
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT EXAMPLE -- -- -- -- Copyright (C) 2014, 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. -- -- -- ------------------------------------------------------------------------------ -- This file provides declarations for STM32F429xx boards manufactured by -- from ST Microelectronics. For example: the STM32F429I Discovery kit. with System; use System; with STM32F4.GPIO; use STM32F4.GPIO; with STM32F4.DMA; use STM32F4.DMA; -- with STM32F4.USARTs; use STM32F4.USARTs; with STM32F4.I2C; use STM32F4.I2C; with STM32F4.SPI; use STM32F4.SPI; use STM32F4; -- for base addresses package STM32F429_Discovery is pragma Elaborate_Body; subtype User_LED is GPIO_Pin; Green : User_LED renames Pin_13; Red : User_LED renames Pin_14; LED3 : User_LED renames Green; LED4 : User_LED renames Red; procedure Initialize_LEDs; -- MUST be called prior to any use of the LEDs procedure On (This : User_LED) with Inline; procedure Off (This : User_LED) with Inline; procedure Toggle (This : User_LED) with Inline; procedure All_LEDs_Off with Inline; procedure All_LEDs_On with Inline; GPIO_A : aliased GPIO_Port with Volatile, Address => System'To_Address (GPIOA_Base); GPIO_B : aliased GPIO_Port with Volatile, Address => System'To_Address (GPIOB_Base); GPIO_C : aliased GPIO_Port with Volatile, Address => System'To_Address (GPIOC_Base); GPIO_D : aliased GPIO_Port with Volatile, Address => System'To_Address (GPIOD_Base); GPIO_E : aliased GPIO_Port with Volatile, Address => System'To_Address (GPIOE_Base); GPIO_F : aliased GPIO_Port with Volatile, Address => System'To_Address (GPIOF_Base); GPIO_G : aliased GPIO_Port with Volatile, Address => System'To_Address (GPIOG_Base); GPIO_H : aliased GPIO_Port with Volatile, Address => System'To_Address (GPIOH_Base); GPIO_I : aliased GPIO_Port with Volatile, Address => System'To_Address (GPIOI_Base); GPIO_J : aliased GPIO_Port with Volatile, Address => System'To_Address (GPIOJ_Base); GPIO_K : aliased GPIO_Port with Volatile, Address => System'To_Address (GPIOK_Base); procedure Enable_Clock (This : aliased in out GPIO_Port); -- USART_1 : aliased USART with Volatile, Address => System'To_Address (USART1_Base); -- USART_2 : aliased USART with Volatile, Address => System'To_Address (USART2_Base); -- USART_3 : aliased USART with Volatile, Address => System'To_Address (USART3_Base); -- UART_4 : aliased UART with Volatile, Address => System'To_Address (UART4_Base); -- UART_5 : aliased UART with Volatile, Address => System'To_Address (UART5_Base); -- USART_6 : aliased USART with Volatile, Address => System'To_Address (USART6_Base); -- UART_7 : aliased UART with Volatile, Address => System'To_Address (UART7_Base); -- UART_8 : aliased UART with Volatile, Address => System'To_Address (UART8_Base); -- procedure Enable_Clock (This : aliased in out USART); DMA_1 : aliased DMA_Controller with Volatile, Address => System'To_Address (DMA1_BASE); DMA_2 : aliased DMA_Controller with Volatile, Address => System'To_Address (DMA2_BASE); procedure Enable_Clock (This : aliased in out DMA_Controller); I2C_1 : aliased I2C_Port with Volatile, Address => System'To_Address (I2C1_Base); I2C_2 : aliased I2C_Port with Volatile, Address => System'To_Address (I2C2_Base); I2C_3 : aliased I2C_Port with Volatile, Address => System'To_Address (I2C3_Base); procedure Enable_Clock (This : aliased in out I2C_Port); procedure Reset (This : in out I2C_Port); SPI_1 : aliased SPI_Port with Volatile, Address => System'To_Address (SPI1_Base); SPI_2 : aliased SPI_Port with Volatile, Address => System'To_Address (SPI2_Base); SPI_3 : aliased SPI_Port with Volatile, Address => System'To_Address (SPI3_Base); SPI_4 : aliased SPI_Port with Volatile, Address => System'To_Address (SPI4_Base); SPI_5 : aliased SPI_Port with Volatile, Address => System'To_Address (SPI5_Base); SPI_6 : aliased SPI_Port with Volatile, Address => System'To_Address (SPI6_Base); procedure Enable_Clock (This : aliased in out SPI_Port); procedure Reset (This : in out SPI_Port); end STM32F429_Discovery;
51.745763
90
0.623321
3dea894fca33d724a617e02ea5d8a23f40889660
12,487
ads
Ada
software/hal/hpl/STM32/svd/stm32f429x/stm32_svd-dcmi.ads
TUM-EI-RCS/StratoX
5fdd04e01a25efef6052376f43ce85b5bc973392
[ "BSD-3-Clause" ]
12
2017-06-08T14:19:57.000Z
2022-03-09T02:48:59.000Z
software/hal/hpl/STM32/svd/stm32f429x/stm32_svd-dcmi.ads
TUM-EI-RCS/StratoX
5fdd04e01a25efef6052376f43ce85b5bc973392
[ "BSD-3-Clause" ]
6
2017-06-08T13:13:50.000Z
2020-05-15T09:32:43.000Z
software/hal/hpl/STM32/svd/stm32f429x/stm32_svd-dcmi.ads
TUM-EI-RCS/StratoX
5fdd04e01a25efef6052376f43ce85b5bc973392
[ "BSD-3-Clause" ]
3
2017-06-30T14:05:06.000Z
2022-02-17T12:20:45.000Z
-- This spec has been automatically generated from STM32F429x.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; with HAL; with System; package STM32_SVD.DCMI is pragma Preelaborate; --------------- -- Registers -- --------------- ----------------- -- CR_Register -- ----------------- subtype CR_FCRC_Field is HAL.UInt2; subtype CR_EDM_Field is HAL.UInt2; -- control register 1 type CR_Register is record -- Capture enable CAPTURE : Boolean := False; -- Capture mode CM : Boolean := False; -- Crop feature CROP : Boolean := False; -- JPEG format JPEG : Boolean := False; -- Embedded synchronization select ESS : Boolean := False; -- Pixel clock polarity PCKPOL : Boolean := False; -- Horizontal synchronization polarity HSPOL : Boolean := False; -- Vertical synchronization polarity VSPOL : Boolean := False; -- Frame capture rate control FCRC : CR_FCRC_Field := 16#0#; -- Extended data mode EDM : CR_EDM_Field := 16#0#; -- unspecified Reserved_12_13 : HAL.UInt2 := 16#0#; -- DCMI enable ENABLE : Boolean := False; -- unspecified Reserved_15_31 : HAL.UInt17 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR_Register use record CAPTURE at 0 range 0 .. 0; CM at 0 range 1 .. 1; CROP at 0 range 2 .. 2; JPEG at 0 range 3 .. 3; ESS at 0 range 4 .. 4; PCKPOL at 0 range 5 .. 5; HSPOL at 0 range 6 .. 6; VSPOL at 0 range 7 .. 7; FCRC at 0 range 8 .. 9; EDM at 0 range 10 .. 11; Reserved_12_13 at 0 range 12 .. 13; ENABLE at 0 range 14 .. 14; Reserved_15_31 at 0 range 15 .. 31; end record; ----------------- -- SR_Register -- ----------------- -- status register type SR_Register is record -- Read-only. HSYNC HSYNC : Boolean; -- Read-only. VSYNC VSYNC : Boolean; -- Read-only. FIFO not empty FNE : Boolean; -- unspecified Reserved_3_31 : HAL.UInt29; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SR_Register use record HSYNC at 0 range 0 .. 0; VSYNC at 0 range 1 .. 1; FNE at 0 range 2 .. 2; Reserved_3_31 at 0 range 3 .. 31; end record; ------------------ -- RIS_Register -- ------------------ -- raw interrupt status register type RIS_Register is record -- Read-only. Capture complete raw interrupt status FRAME_RIS : Boolean; -- Read-only. Overrun raw interrupt status OVR_RIS : Boolean; -- Read-only. Synchronization error raw interrupt status ERR_RIS : Boolean; -- Read-only. VSYNC raw interrupt status VSYNC_RIS : Boolean; -- Read-only. Line raw interrupt status LINE_RIS : Boolean; -- unspecified Reserved_5_31 : HAL.UInt27; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for RIS_Register use record FRAME_RIS at 0 range 0 .. 0; OVR_RIS at 0 range 1 .. 1; ERR_RIS at 0 range 2 .. 2; VSYNC_RIS at 0 range 3 .. 3; LINE_RIS at 0 range 4 .. 4; Reserved_5_31 at 0 range 5 .. 31; end record; ------------------ -- IER_Register -- ------------------ -- interrupt enable register type IER_Register is record -- Capture complete interrupt enable FRAME_IE : Boolean := False; -- Overrun interrupt enable OVR_IE : Boolean := False; -- Synchronization error interrupt enable ERR_IE : Boolean := False; -- VSYNC interrupt enable VSYNC_IE : Boolean := False; -- Line interrupt enable LINE_IE : Boolean := False; -- unspecified Reserved_5_31 : HAL.UInt27 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for IER_Register use record FRAME_IE at 0 range 0 .. 0; OVR_IE at 0 range 1 .. 1; ERR_IE at 0 range 2 .. 2; VSYNC_IE at 0 range 3 .. 3; LINE_IE at 0 range 4 .. 4; Reserved_5_31 at 0 range 5 .. 31; end record; ------------------ -- MIS_Register -- ------------------ -- masked interrupt status register type MIS_Register is record -- Read-only. Capture complete masked interrupt status FRAME_MIS : Boolean; -- Read-only. Overrun masked interrupt status OVR_MIS : Boolean; -- Read-only. Synchronization error masked interrupt status ERR_MIS : Boolean; -- Read-only. VSYNC masked interrupt status VSYNC_MIS : Boolean; -- Read-only. Line masked interrupt status LINE_MIS : Boolean; -- unspecified Reserved_5_31 : HAL.UInt27; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MIS_Register use record FRAME_MIS at 0 range 0 .. 0; OVR_MIS at 0 range 1 .. 1; ERR_MIS at 0 range 2 .. 2; VSYNC_MIS at 0 range 3 .. 3; LINE_MIS at 0 range 4 .. 4; Reserved_5_31 at 0 range 5 .. 31; end record; ------------------ -- ICR_Register -- ------------------ -- interrupt clear register type ICR_Register is record -- Write-only. Capture complete interrupt status clear FRAME_ISC : Boolean := False; -- Write-only. Overrun interrupt status clear OVR_ISC : Boolean := False; -- Write-only. Synchronization error interrupt status clear ERR_ISC : Boolean := False; -- Write-only. Vertical synch interrupt status clear VSYNC_ISC : Boolean := False; -- Write-only. line interrupt status clear LINE_ISC : Boolean := False; -- unspecified Reserved_5_31 : HAL.UInt27 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ICR_Register use record FRAME_ISC at 0 range 0 .. 0; OVR_ISC at 0 range 1 .. 1; ERR_ISC at 0 range 2 .. 2; VSYNC_ISC at 0 range 3 .. 3; LINE_ISC at 0 range 4 .. 4; Reserved_5_31 at 0 range 5 .. 31; end record; ------------------- -- ESCR_Register -- ------------------- subtype ESCR_FSC_Field is HAL.Byte; subtype ESCR_LSC_Field is HAL.Byte; subtype ESCR_LEC_Field is HAL.Byte; subtype ESCR_FEC_Field is HAL.Byte; -- embedded synchronization code register type ESCR_Register is record -- Frame start delimiter code FSC : ESCR_FSC_Field := 16#0#; -- Line start delimiter code LSC : ESCR_LSC_Field := 16#0#; -- Line end delimiter code LEC : ESCR_LEC_Field := 16#0#; -- Frame end delimiter code FEC : ESCR_FEC_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ESCR_Register use record FSC at 0 range 0 .. 7; LSC at 0 range 8 .. 15; LEC at 0 range 16 .. 23; FEC at 0 range 24 .. 31; end record; ------------------- -- ESUR_Register -- ------------------- subtype ESUR_FSU_Field is HAL.Byte; subtype ESUR_LSU_Field is HAL.Byte; subtype ESUR_LEU_Field is HAL.Byte; subtype ESUR_FEU_Field is HAL.Byte; -- embedded synchronization unmask register type ESUR_Register is record -- Frame start delimiter unmask FSU : ESUR_FSU_Field := 16#0#; -- Line start delimiter unmask LSU : ESUR_LSU_Field := 16#0#; -- Line end delimiter unmask LEU : ESUR_LEU_Field := 16#0#; -- Frame end delimiter unmask FEU : ESUR_FEU_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ESUR_Register use record FSU at 0 range 0 .. 7; LSU at 0 range 8 .. 15; LEU at 0 range 16 .. 23; FEU at 0 range 24 .. 31; end record; --------------------- -- CWSTRT_Register -- --------------------- subtype CWSTRT_HOFFCNT_Field is HAL.UInt14; subtype CWSTRT_VST_Field is HAL.UInt13; -- crop window start type CWSTRT_Register is record -- Horizontal offset count HOFFCNT : CWSTRT_HOFFCNT_Field := 16#0#; -- unspecified Reserved_14_15 : HAL.UInt2 := 16#0#; -- Vertical start line count VST : CWSTRT_VST_Field := 16#0#; -- unspecified Reserved_29_31 : HAL.UInt3 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CWSTRT_Register use record HOFFCNT at 0 range 0 .. 13; Reserved_14_15 at 0 range 14 .. 15; VST at 0 range 16 .. 28; Reserved_29_31 at 0 range 29 .. 31; end record; --------------------- -- CWSIZE_Register -- --------------------- subtype CWSIZE_CAPCNT_Field is HAL.UInt14; subtype CWSIZE_VLINE_Field is HAL.UInt14; -- crop window size type CWSIZE_Register is record -- Capture count CAPCNT : CWSIZE_CAPCNT_Field := 16#0#; -- unspecified Reserved_14_15 : HAL.UInt2 := 16#0#; -- Vertical line count VLINE : CWSIZE_VLINE_Field := 16#0#; -- unspecified Reserved_30_31 : HAL.UInt2 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CWSIZE_Register use record CAPCNT at 0 range 0 .. 13; Reserved_14_15 at 0 range 14 .. 15; VLINE at 0 range 16 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; ----------------- -- DR_Register -- ----------------- -- DR_Byte array element subtype DR_Byte_Element is HAL.Byte; -- DR_Byte array type DR_Byte_Field_Array is array (0 .. 3) of DR_Byte_Element with Component_Size => 8, Size => 32; -- data register type DR_Register (As_Array : Boolean := False) is record case As_Array is when False => -- Byte as a value Val : HAL.Word; when True => -- Byte as an array Arr : DR_Byte_Field_Array; end case; end record with Unchecked_Union, Size => 32, Volatile_Full_Access, Bit_Order => System.Low_Order_First; for DR_Register use record Val at 0 range 0 .. 31; Arr at 0 range 0 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Digital camera interface type DCMI_Peripheral is record -- control register 1 CR : CR_Register; -- status register SR : SR_Register; -- raw interrupt status register RIS : RIS_Register; -- interrupt enable register IER : IER_Register; -- masked interrupt status register MIS : MIS_Register; -- interrupt clear register ICR : ICR_Register; -- embedded synchronization code register ESCR : ESCR_Register; -- embedded synchronization unmask register ESUR : ESUR_Register; -- crop window start CWSTRT : CWSTRT_Register; -- crop window size CWSIZE : CWSIZE_Register; -- data register DR : DR_Register; end record with Volatile; for DCMI_Peripheral use record CR at 0 range 0 .. 31; SR at 4 range 0 .. 31; RIS at 8 range 0 .. 31; IER at 12 range 0 .. 31; MIS at 16 range 0 .. 31; ICR at 20 range 0 .. 31; ESCR at 24 range 0 .. 31; ESUR at 28 range 0 .. 31; CWSTRT at 32 range 0 .. 31; CWSIZE at 36 range 0 .. 31; DR at 40 range 0 .. 31; end record; -- Digital camera interface DCMI_Periph : aliased DCMI_Peripheral with Import, Address => DCMI_Base; end STM32_SVD.DCMI;
29.873206
66
0.555217
411371dec0eebb1baacf12c08e1a9c5913296ccb
2,483
ads
Ada
gcc-gcc-7_3_0-release/gcc/ada/a-extiti.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/ada/a-extiti.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/ada/a-extiti.ads
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 . E X E C U T I O N _ T I M E . T I M E R S -- -- -- -- S p e c -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. In accordance with the copyright of that document, you can freely -- -- copy and modify this specification, provided that if you redistribute a -- -- modified version, any changes that you have made are clearly indicated. -- -- -- ------------------------------------------------------------------------------ -- This unit is not implemented in typical GNAT implementations that lie on -- top of operating systems, because it is infeasible to implement in such -- environments. -- If a target environment provides appropriate support for this package, -- then the Unimplemented_Unit pragma should be removed from this spec and -- an appropriate body provided. with System; package Ada.Execution_Time.Timers is pragma Preelaborate; pragma Unimplemented_Unit; type Timer (T : not null access constant Ada.Task_Identification.Task_Id) is tagged limited private; type Timer_Handler is access protected procedure (TM : in out Timer); Min_Handler_Ceiling : constant System.Any_Priority := System.Priority'Last; procedure Set_Handler (TM : in out Timer; In_Time : Ada.Real_Time.Time_Span; Handler : Timer_Handler); procedure Set_Handler (TM : in out Timer; At_Time : CPU_Time; Handler : Timer_Handler); function Current_Handler (TM : Timer) return Timer_Handler; procedure Cancel_Handler (TM : in out Timer; Cancelled : out Boolean); function Time_Remaining (TM : Timer) return Ada.Real_Time.Time_Span; Timer_Resource_Error : exception; private type Timer (T : access Ada.Task_Identification.Task_Id) is tagged limited null record; end Ada.Execution_Time.Timers;
40.048387
79
0.517922
a176e754df289a11c47a9398b9ed731f5a2b84fa
11,474
ads
Ada
include/ftsystem.ads
docandrew/troodon
9240611708f92ffb5491fa677bffb6ecac58a51e
[ "MIT" ]
5
2021-11-03T04:34:16.000Z
2021-11-10T23:06:30.000Z
include/ftsystem.ads
docandrew/troodon
9240611708f92ffb5491fa677bffb6ecac58a51e
[ "MIT" ]
null
null
null
include/ftsystem.ads
docandrew/troodon
9240611708f92ffb5491fa677bffb6ecac58a51e
[ "MIT" ]
null
null
null
pragma Ada_2012; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; with System; package ftsystem is --*************************************************************************** -- * -- * ftsystem.h -- * -- * FreeType low-level system interface definition (specification). -- * -- * Copyright (C) 1996-2020 by -- * David Turner, Robert Wilhelm, and Werner Lemberg. -- * -- * This file is part of the FreeType project, and may only be used, -- * modified, and distributed under the terms of the FreeType project -- * license, LICENSE.TXT. By continuing to use, modify, or distribute -- * this file you indicate that you have read the license and -- * understand and accept it fully. -- * -- --************************************************************************* -- * -- * @section: -- * system_interface -- * -- * @title: -- * System Interface -- * -- * @abstract: -- * How FreeType manages memory and i/o. -- * -- * @description: -- * This section contains various definitions related to memory management -- * and i/o access. You need to understand this information if you want to -- * use a custom memory manager or you own i/o streams. -- * -- --************************************************************************* -- * -- * M E M O R Y M A N A G E M E N T -- * -- --************************************************************************* -- * -- * @type: -- * FT_Memory -- * -- * @description: -- * A handle to a given memory manager object, defined with an -- * @FT_MemoryRec structure. -- * -- type FT_MemoryRec_u; type FT_Memory is access all FT_MemoryRec_u; -- /usr/include/freetype2/freetype/ftsystem.h:64 --************************************************************************* -- * -- * @functype: -- * FT_Alloc_Func -- * -- * @description: -- * A function used to allocate `size` bytes from `memory`. -- * -- * @input: -- * memory :: -- * A handle to the source memory manager. -- * -- * size :: -- * The size in bytes to allocate. -- * -- * @return: -- * Address of new memory block. 0~in case of failure. -- * -- type FT_Alloc_Func is access function (arg1 : FT_Memory; arg2 : long) return System.Address with Convention => C; -- /usr/include/freetype2/freetype/ftsystem.h:87 --************************************************************************* -- * -- * @functype: -- * FT_Free_Func -- * -- * @description: -- * A function used to release a given block of memory. -- * -- * @input: -- * memory :: -- * A handle to the source memory manager. -- * -- * block :: -- * The address of the target memory block. -- * -- type FT_Free_Func is access procedure (arg1 : FT_Memory; arg2 : System.Address) with Convention => C; -- /usr/include/freetype2/freetype/ftsystem.h:108 --************************************************************************* -- * -- * @functype: -- * FT_Realloc_Func -- * -- * @description: -- * A function used to re-allocate a given block of memory. -- * -- * @input: -- * memory :: -- * A handle to the source memory manager. -- * -- * cur_size :: -- * The block's current size in bytes. -- * -- * new_size :: -- * The block's requested new size. -- * -- * block :: -- * The block's current address. -- * -- * @return: -- * New block address. 0~in case of memory shortage. -- * -- * @note: -- * In case of error, the old block must still be available. -- * -- type FT_Realloc_Func is access function (arg1 : FT_Memory; arg2 : long; arg3 : long; arg4 : System.Address) return System.Address with Convention => C; -- /usr/include/freetype2/freetype/ftsystem.h:141 --************************************************************************* -- * -- * @struct: -- * FT_MemoryRec -- * -- * @description: -- * A structure used to describe a given memory manager to FreeType~2. -- * -- * @fields: -- * user :: -- * A generic typeless pointer for user data. -- * -- * alloc :: -- * A pointer type to an allocation function. -- * -- * free :: -- * A pointer type to an memory freeing function. -- * -- * realloc :: -- * A pointer type to a reallocation function. -- * -- type FT_MemoryRec_u is record user : System.Address; -- /usr/include/freetype2/freetype/ftsystem.h:171 alloc : FT_Alloc_Func; -- /usr/include/freetype2/freetype/ftsystem.h:172 free : FT_Free_Func; -- /usr/include/freetype2/freetype/ftsystem.h:173 realloc : FT_Realloc_Func; -- /usr/include/freetype2/freetype/ftsystem.h:174 end record with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/ftsystem.h:169 --************************************************************************* -- * -- * I / O M A N A G E M E N T -- * -- --************************************************************************* -- * -- * @type: -- * FT_Stream -- * -- * @description: -- * A handle to an input stream. -- * -- * @also: -- * See @FT_StreamRec for the publicly accessible fields of a given stream -- * object. -- * -- type FT_StreamRec_u; type FT_Stream is access all FT_StreamRec_u; -- /usr/include/freetype2/freetype/ftsystem.h:198 --************************************************************************* -- * -- * @struct: -- * FT_StreamDesc -- * -- * @description: -- * A union type used to store either a long or a pointer. This is used -- * to store a file descriptor or a `FILE*` in an input stream. -- * -- type FT_StreamDesc_u (discr : unsigned := 0) is record case discr is when 0 => value : aliased long; -- /usr/include/freetype2/freetype/ftsystem.h:213 when others => pointer : System.Address; -- /usr/include/freetype2/freetype/ftsystem.h:214 end case; end record with Convention => C_Pass_By_Copy, Unchecked_Union => True; -- /usr/include/freetype2/freetype/ftsystem.h:211 subtype FT_StreamDesc is FT_StreamDesc_u; -- /usr/include/freetype2/freetype/ftsystem.h:216 --************************************************************************* -- * -- * @functype: -- * FT_Stream_IoFunc -- * -- * @description: -- * A function used to seek and read data from a given input stream. -- * -- * @input: -- * stream :: -- * A handle to the source stream. -- * -- * offset :: -- * The offset of read in stream (always from start). -- * -- * buffer :: -- * The address of the read buffer. -- * -- * count :: -- * The number of bytes to read from the stream. -- * -- * @return: -- * The number of bytes effectively read by the stream. -- * -- * @note: -- * This function might be called to perform a seek or skip operation with -- * a `count` of~0. A non-zero return value then indicates an error. -- * -- type FT_Stream_IoFunc is access function (arg1 : FT_Stream; arg2 : unsigned_long; arg3 : access unsigned_char; arg4 : unsigned_long) return unsigned_long with Convention => C; -- /usr/include/freetype2/freetype/ftsystem.h:249 --************************************************************************* -- * -- * @functype: -- * FT_Stream_CloseFunc -- * -- * @description: -- * A function used to close a given input stream. -- * -- * @input: -- * stream :: -- * A handle to the target stream. -- * -- type FT_Stream_CloseFunc is access procedure (arg1 : FT_Stream) with Convention => C; -- /usr/include/freetype2/freetype/ftsystem.h:269 --************************************************************************* -- * -- * @struct: -- * FT_StreamRec -- * -- * @description: -- * A structure used to describe an input stream. -- * -- * @input: -- * base :: -- * For memory-based streams, this is the address of the first stream -- * byte in memory. This field should always be set to `NULL` for -- * disk-based streams. -- * -- * size :: -- * The stream size in bytes. -- * -- * In case of compressed streams where the size is unknown before -- * actually doing the decompression, the value is set to 0x7FFFFFFF. -- * (Note that this size value can occur for normal streams also; it is -- * thus just a hint.) -- * -- * pos :: -- * The current position within the stream. -- * -- * descriptor :: -- * This field is a union that can hold an integer or a pointer. It is -- * used by stream implementations to store file descriptors or `FILE*` -- * pointers. -- * -- * pathname :: -- * This field is completely ignored by FreeType. However, it is often -- * useful during debugging to use it to store the stream's filename -- * (where available). -- * -- * read :: -- * The stream's input function. -- * -- * close :: -- * The stream's close function. -- * -- * memory :: -- * The memory manager to use to preload frames. This is set internally -- * by FreeType and shouldn't be touched by stream implementations. -- * -- * cursor :: -- * This field is set and used internally by FreeType when parsing -- * frames. In particular, the `FT_GET_XXX` macros use this instead of -- * the `pos` field. -- * -- * limit :: -- * This field is set and used internally by FreeType when parsing -- * frames. -- * -- type FT_StreamRec_u is record base : access unsigned_char; -- /usr/include/freetype2/freetype/ftsystem.h:329 size : aliased unsigned_long; -- /usr/include/freetype2/freetype/ftsystem.h:330 pos : aliased unsigned_long; -- /usr/include/freetype2/freetype/ftsystem.h:331 descriptor : aliased FT_StreamDesc; -- /usr/include/freetype2/freetype/ftsystem.h:333 pathname : aliased FT_StreamDesc; -- /usr/include/freetype2/freetype/ftsystem.h:334 read : FT_Stream_IoFunc; -- /usr/include/freetype2/freetype/ftsystem.h:335 close : FT_Stream_CloseFunc; -- /usr/include/freetype2/freetype/ftsystem.h:336 memory : FT_Memory; -- /usr/include/freetype2/freetype/ftsystem.h:338 cursor : access unsigned_char; -- /usr/include/freetype2/freetype/ftsystem.h:339 limit : access unsigned_char; -- /usr/include/freetype2/freetype/ftsystem.h:340 end record with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/ftsystem.h:327 subtype FT_StreamRec is FT_StreamRec_u; -- /usr/include/freetype2/freetype/ftsystem.h:342 -- -- END end ftsystem;
32.782857
98
0.510981
18b2b81e86c32fb528d200b0ec1e46dbd6bfbe6a
14,261
ads
Ada
gyak/gyak1-2/b__powerof.ads
balintsoos/LearnAda
9d2fc76209f6e15b4fa91b4b39107ae6cc7e7114
[ "MIT" ]
null
null
null
gyak/gyak1-2/b__powerof.ads
balintsoos/LearnAda
9d2fc76209f6e15b4fa91b4b39107ae6cc7e7114
[ "MIT" ]
null
null
null
gyak/gyak1-2/b__powerof.ads
balintsoos/LearnAda
9d2fc76209f6e15b4fa91b4b39107ae6cc7e7114
[ "MIT" ]
1
2021-07-16T16:15:11.000Z
2021-07-16T16:15:11.000Z
pragma Ada_95; with System; package ada_main is pragma Warnings (Off); gnat_argc : Integer; gnat_argv : System.Address; gnat_envp : System.Address; pragma Import (C, gnat_argc); pragma Import (C, gnat_argv); pragma Import (C, gnat_envp); gnat_exit_status : Integer; pragma Import (C, gnat_exit_status); GNAT_Version : constant String := "GNAT Version: GPL 2015 (20150428-49)" & ASCII.NUL; pragma Export (C, GNAT_Version, "__gnat_version"); Ada_Main_Program_Name : constant String := "_ada_powerof" & ASCII.NUL; pragma Export (C, Ada_Main_Program_Name, "__gnat_ada_main_program_name"); procedure adainit; pragma Export (C, adainit, "adainit"); procedure adafinal; pragma Export (C, adafinal, "adafinal"); function main (argc : Integer; argv : System.Address; envp : System.Address) return Integer; pragma Export (C, main, "main"); type Version_32 is mod 2 ** 32; u00001 : constant Version_32 := 16#653b25e8#; pragma Export (C, u00001, "powerofB"); u00002 : constant Version_32 := 16#fbff4c67#; pragma Export (C, u00002, "system__standard_libraryB"); u00003 : constant Version_32 := 16#f72f352b#; pragma Export (C, u00003, "system__standard_libraryS"); u00004 : constant Version_32 := 16#3ffc8e18#; pragma Export (C, u00004, "adaS"); u00005 : constant Version_32 := 16#f64b89a4#; pragma Export (C, u00005, "ada__integer_text_ioB"); u00006 : constant Version_32 := 16#f1daf268#; pragma Export (C, u00006, "ada__integer_text_ioS"); u00007 : constant Version_32 := 16#b612ca65#; pragma Export (C, u00007, "ada__exceptionsB"); u00008 : constant Version_32 := 16#1d190453#; pragma Export (C, u00008, "ada__exceptionsS"); u00009 : constant Version_32 := 16#a46739c0#; pragma Export (C, u00009, "ada__exceptions__last_chance_handlerB"); u00010 : constant Version_32 := 16#3aac8c92#; pragma Export (C, u00010, "ada__exceptions__last_chance_handlerS"); u00011 : constant Version_32 := 16#f4ce8c3a#; pragma Export (C, u00011, "systemS"); u00012 : constant Version_32 := 16#a207fefe#; pragma Export (C, u00012, "system__soft_linksB"); u00013 : constant Version_32 := 16#af945ded#; pragma Export (C, u00013, "system__soft_linksS"); u00014 : constant Version_32 := 16#b01dad17#; pragma Export (C, u00014, "system__parametersB"); u00015 : constant Version_32 := 16#8ae48145#; pragma Export (C, u00015, "system__parametersS"); u00016 : constant Version_32 := 16#b19b6653#; pragma Export (C, u00016, "system__secondary_stackB"); u00017 : constant Version_32 := 16#5faf4353#; pragma Export (C, u00017, "system__secondary_stackS"); u00018 : constant Version_32 := 16#39a03df9#; pragma Export (C, u00018, "system__storage_elementsB"); u00019 : constant Version_32 := 16#d90dc63e#; pragma Export (C, u00019, "system__storage_elementsS"); u00020 : constant Version_32 := 16#41837d1e#; pragma Export (C, u00020, "system__stack_checkingB"); u00021 : constant Version_32 := 16#7a71e7d2#; pragma Export (C, u00021, "system__stack_checkingS"); u00022 : constant Version_32 := 16#393398c1#; pragma Export (C, u00022, "system__exception_tableB"); u00023 : constant Version_32 := 16#5ad7ea2f#; pragma Export (C, u00023, "system__exception_tableS"); u00024 : constant Version_32 := 16#ce4af020#; pragma Export (C, u00024, "system__exceptionsB"); u00025 : constant Version_32 := 16#9cade1cc#; pragma Export (C, u00025, "system__exceptionsS"); u00026 : constant Version_32 := 16#37d758f1#; pragma Export (C, u00026, "system__exceptions__machineS"); u00027 : constant Version_32 := 16#b895431d#; pragma Export (C, u00027, "system__exceptions_debugB"); u00028 : constant Version_32 := 16#472c9584#; pragma Export (C, u00028, "system__exceptions_debugS"); u00029 : constant Version_32 := 16#570325c8#; pragma Export (C, u00029, "system__img_intB"); u00030 : constant Version_32 := 16#f6156cf8#; pragma Export (C, u00030, "system__img_intS"); u00031 : constant Version_32 := 16#b98c3e16#; pragma Export (C, u00031, "system__tracebackB"); u00032 : constant Version_32 := 16#6af355e1#; pragma Export (C, u00032, "system__tracebackS"); u00033 : constant Version_32 := 16#9ed49525#; pragma Export (C, u00033, "system__traceback_entriesB"); u00034 : constant Version_32 := 16#f4957a4a#; pragma Export (C, u00034, "system__traceback_entriesS"); u00035 : constant Version_32 := 16#8c33a517#; pragma Export (C, u00035, "system__wch_conB"); u00036 : constant Version_32 := 16#efb3aee8#; pragma Export (C, u00036, "system__wch_conS"); u00037 : constant Version_32 := 16#9721e840#; pragma Export (C, u00037, "system__wch_stwB"); u00038 : constant Version_32 := 16#c2a282e9#; pragma Export (C, u00038, "system__wch_stwS"); u00039 : constant Version_32 := 16#92b797cb#; pragma Export (C, u00039, "system__wch_cnvB"); u00040 : constant Version_32 := 16#e004141b#; pragma Export (C, u00040, "system__wch_cnvS"); u00041 : constant Version_32 := 16#6033a23f#; pragma Export (C, u00041, "interfacesS"); u00042 : constant Version_32 := 16#ece6fdb6#; pragma Export (C, u00042, "system__wch_jisB"); u00043 : constant Version_32 := 16#60740d3a#; pragma Export (C, u00043, "system__wch_jisS"); u00044 : constant Version_32 := 16#28f088c2#; pragma Export (C, u00044, "ada__text_ioB"); u00045 : constant Version_32 := 16#1a9b0017#; pragma Export (C, u00045, "ada__text_ioS"); u00046 : constant Version_32 := 16#10558b11#; pragma Export (C, u00046, "ada__streamsB"); u00047 : constant Version_32 := 16#2e6701ab#; pragma Export (C, u00047, "ada__streamsS"); u00048 : constant Version_32 := 16#db5c917c#; pragma Export (C, u00048, "ada__io_exceptionsS"); u00049 : constant Version_32 := 16#12c8cd7d#; pragma Export (C, u00049, "ada__tagsB"); u00050 : constant Version_32 := 16#ce72c228#; pragma Export (C, u00050, "ada__tagsS"); u00051 : constant Version_32 := 16#c3335bfd#; pragma Export (C, u00051, "system__htableB"); u00052 : constant Version_32 := 16#700c3fd0#; pragma Export (C, u00052, "system__htableS"); u00053 : constant Version_32 := 16#089f5cd0#; pragma Export (C, u00053, "system__string_hashB"); u00054 : constant Version_32 := 16#d25254ae#; pragma Export (C, u00054, "system__string_hashS"); u00055 : constant Version_32 := 16#699628fa#; pragma Export (C, u00055, "system__unsigned_typesS"); u00056 : constant Version_32 := 16#b44f9ae7#; pragma Export (C, u00056, "system__val_unsB"); u00057 : constant Version_32 := 16#793ec5c1#; pragma Export (C, u00057, "system__val_unsS"); u00058 : constant Version_32 := 16#27b600b2#; pragma Export (C, u00058, "system__val_utilB"); u00059 : constant Version_32 := 16#586e3ac4#; pragma Export (C, u00059, "system__val_utilS"); u00060 : constant Version_32 := 16#d1060688#; pragma Export (C, u00060, "system__case_utilB"); u00061 : constant Version_32 := 16#d0c7e5ed#; pragma Export (C, u00061, "system__case_utilS"); u00062 : constant Version_32 := 16#84a27f0d#; pragma Export (C, u00062, "interfaces__c_streamsB"); u00063 : constant Version_32 := 16#8bb5f2c0#; pragma Export (C, u00063, "interfaces__c_streamsS"); u00064 : constant Version_32 := 16#845f5a34#; pragma Export (C, u00064, "system__crtlS"); u00065 : constant Version_32 := 16#431faf3c#; pragma Export (C, u00065, "system__file_ioB"); u00066 : constant Version_32 := 16#53bf6d5f#; pragma Export (C, u00066, "system__file_ioS"); u00067 : constant Version_32 := 16#b7ab275c#; pragma Export (C, u00067, "ada__finalizationB"); u00068 : constant Version_32 := 16#19f764ca#; pragma Export (C, u00068, "ada__finalizationS"); u00069 : constant Version_32 := 16#95817ed8#; pragma Export (C, u00069, "system__finalization_rootB"); u00070 : constant Version_32 := 16#bb3cffaa#; pragma Export (C, u00070, "system__finalization_rootS"); u00071 : constant Version_32 := 16#769e25e6#; pragma Export (C, u00071, "interfaces__cB"); u00072 : constant Version_32 := 16#4a38bedb#; pragma Export (C, u00072, "interfaces__cS"); u00073 : constant Version_32 := 16#ee0f26dd#; pragma Export (C, u00073, "system__os_libB"); u00074 : constant Version_32 := 16#d7b69782#; pragma Export (C, u00074, "system__os_libS"); u00075 : constant Version_32 := 16#1a817b8e#; pragma Export (C, u00075, "system__stringsB"); u00076 : constant Version_32 := 16#8a719d5c#; pragma Export (C, u00076, "system__stringsS"); u00077 : constant Version_32 := 16#09511692#; pragma Export (C, u00077, "system__file_control_blockS"); u00078 : constant Version_32 := 16#f6fdca1c#; pragma Export (C, u00078, "ada__text_io__integer_auxB"); u00079 : constant Version_32 := 16#b9793d30#; pragma Export (C, u00079, "ada__text_io__integer_auxS"); u00080 : constant Version_32 := 16#181dc502#; pragma Export (C, u00080, "ada__text_io__generic_auxB"); u00081 : constant Version_32 := 16#a6c327d3#; pragma Export (C, u00081, "ada__text_io__generic_auxS"); u00082 : constant Version_32 := 16#18d57884#; pragma Export (C, u00082, "system__img_biuB"); u00083 : constant Version_32 := 16#afb4a0b7#; pragma Export (C, u00083, "system__img_biuS"); u00084 : constant Version_32 := 16#e7d8734f#; pragma Export (C, u00084, "system__img_llbB"); u00085 : constant Version_32 := 16#ee73b049#; pragma Export (C, u00085, "system__img_llbS"); u00086 : constant Version_32 := 16#9777733a#; pragma Export (C, u00086, "system__img_lliB"); u00087 : constant Version_32 := 16#e581d9eb#; pragma Export (C, u00087, "system__img_lliS"); u00088 : constant Version_32 := 16#0e8808d4#; pragma Export (C, u00088, "system__img_llwB"); u00089 : constant Version_32 := 16#471f93df#; pragma Export (C, u00089, "system__img_llwS"); u00090 : constant Version_32 := 16#428b07f8#; pragma Export (C, u00090, "system__img_wiuB"); u00091 : constant Version_32 := 16#c1f52725#; pragma Export (C, u00091, "system__img_wiuS"); u00092 : constant Version_32 := 16#7ebd8839#; pragma Export (C, u00092, "system__val_intB"); u00093 : constant Version_32 := 16#bc6ba605#; pragma Export (C, u00093, "system__val_intS"); u00094 : constant Version_32 := 16#b3aa7b17#; pragma Export (C, u00094, "system__val_lliB"); u00095 : constant Version_32 := 16#6eea6a9a#; pragma Export (C, u00095, "system__val_lliS"); u00096 : constant Version_32 := 16#06052bd0#; pragma Export (C, u00096, "system__val_lluB"); u00097 : constant Version_32 := 16#13647f88#; pragma Export (C, u00097, "system__val_lluS"); u00098 : constant Version_32 := 16#02d5bdf3#; pragma Export (C, u00098, "matB"); u00099 : constant Version_32 := 16#d1a62465#; pragma Export (C, u00099, "matS"); u00100 : constant Version_32 := 16#2bce1226#; pragma Export (C, u00100, "system__memoryB"); u00101 : constant Version_32 := 16#adb3ea0e#; pragma Export (C, u00101, "system__memoryS"); -- BEGIN ELABORATION ORDER -- ada%s -- interfaces%s -- system%s -- system.case_util%s -- system.case_util%b -- system.htable%s -- system.img_int%s -- system.img_int%b -- system.img_lli%s -- system.img_lli%b -- system.parameters%s -- system.parameters%b -- system.crtl%s -- interfaces.c_streams%s -- interfaces.c_streams%b -- system.standard_library%s -- system.exceptions_debug%s -- system.exceptions_debug%b -- system.storage_elements%s -- system.storage_elements%b -- system.stack_checking%s -- system.stack_checking%b -- system.string_hash%s -- system.string_hash%b -- system.htable%b -- system.strings%s -- system.strings%b -- system.os_lib%s -- system.traceback_entries%s -- system.traceback_entries%b -- ada.exceptions%s -- system.soft_links%s -- system.unsigned_types%s -- system.img_biu%s -- system.img_biu%b -- system.img_llb%s -- system.img_llb%b -- system.img_llw%s -- system.img_llw%b -- system.img_wiu%s -- system.img_wiu%b -- system.val_int%s -- system.val_lli%s -- system.val_llu%s -- system.val_uns%s -- system.val_util%s -- system.val_util%b -- system.val_uns%b -- system.val_llu%b -- system.val_lli%b -- system.val_int%b -- system.wch_con%s -- system.wch_con%b -- system.wch_cnv%s -- system.wch_jis%s -- system.wch_jis%b -- system.wch_cnv%b -- system.wch_stw%s -- system.wch_stw%b -- ada.exceptions.last_chance_handler%s -- ada.exceptions.last_chance_handler%b -- system.exception_table%s -- system.exception_table%b -- ada.io_exceptions%s -- ada.tags%s -- ada.streams%s -- ada.streams%b -- interfaces.c%s -- system.exceptions%s -- system.exceptions%b -- system.exceptions.machine%s -- system.file_control_block%s -- system.file_io%s -- system.finalization_root%s -- system.finalization_root%b -- ada.finalization%s -- ada.finalization%b -- system.memory%s -- system.memory%b -- system.standard_library%b -- system.secondary_stack%s -- system.file_io%b -- interfaces.c%b -- ada.tags%b -- system.soft_links%b -- system.os_lib%b -- system.secondary_stack%b -- system.traceback%s -- ada.exceptions%b -- system.traceback%b -- ada.text_io%s -- ada.text_io%b -- ada.text_io.generic_aux%s -- ada.text_io.generic_aux%b -- ada.text_io.integer_aux%s -- ada.text_io.integer_aux%b -- ada.integer_text_io%s -- ada.integer_text_io%b -- mat%s -- mat%b -- powerof%b -- END ELABORATION ORDER end ada_main;
41.216763
77
0.668256
4131a9f167611f45a762a7f7f4b5d54b35efbed6
42
adb
Ada
test/testdirs/testdir1/subdir1/wholewords.adb
rdburns/pss
587f0f39cdc91b7f6929f9377e94bbcee8761623
[ "Unlicense" ]
202
2015-01-05T13:58:05.000Z
2022-03-07T18:28:42.000Z
test/testdirs/testdir1/subdir1/wholewords.adb
rdburns/pss
587f0f39cdc91b7f6929f9377e94bbcee8761623
[ "Unlicense" ]
29
2015-01-23T03:26:54.000Z
2021-02-23T13:13:25.000Z
test/testdirs/testdir1/subdir1/wholewords.adb
rdburns/pss
587f0f39cdc91b7f6929f9377e94bbcee8761623
[ "Unlicense" ]
40
2015-02-08T20:08:59.000Z
2022-02-05T06:11:50.000Z
here xaxo is a whole word herexaxo isn't
10.5
25
0.761905
df8994d826260011867ce90bb02ca1594742474f
827
adb
Ada
src/tokens.adb
aeszter/lox-spark
3ec66f9620c41884463bb33a1b140d8bd7797bec
[ "MIT" ]
6
2017-02-11T05:57:22.000Z
2021-05-12T22:20:26.000Z
src/tokens.adb
aeszter/lox-spark
3ec66f9620c41884463bb33a1b140d8bd7797bec
[ "MIT" ]
null
null
null
src/tokens.adb
aeszter/lox-spark
3ec66f9620c41884463bb33a1b140d8bd7797bec
[ "MIT" ]
2
2017-02-28T12:04:23.000Z
2017-03-08T19:14:23.000Z
package body Tokens with SPARK_Mode is function New_Token (Kind : Token_Kind; Lexeme : String; Line : Positive) return Token is begin return Token'(Kind => Kind, Lexeme => L_Strings.To_Bounded_String (Lexeme), Line => Line); end New_Token; function To_String (T : Token) return String is begin return To_String (T.Kind) & L_Strings.To_String (T.Lexeme); end To_String; function To_String (T : Token_Kind) return String is Image : constant String := Token_Kind'Image (T); Result : constant String (1 .. Image'Length) := Image; begin if Result'Length < 100 then return Result; else return Result (Result'First .. Result'First + 99); end if; end To_String; end Tokens;
25.84375
67
0.604595
59f60c4a5b299588e5a64a79dd6ee00942ed2fa5
3,540
ada
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/ce/ce3704b.ada
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/ada/acats/tests/ce/ce3704b.ada
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/ce/ce3704b.ada
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
-- CE3704B.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 INTEGER_IO GET RAISES MODE_ERROR FOR FILES OF MODE -- OUT_FILE. -- APPLICABILITY CRITERIA: -- THIS TEST IS ONLY APPLICABLE TO IMPLEMENTATIONS WHICH -- SUPPORT TEXT FILES. -- HISTORY: -- SPS 10/04/82 -- JBG 02/22/84 CHANGED TO .ADA TEST -- RJW 11/04/86 REVISED TEST TO OUTPUT A NON_APPLICABLE -- RESULT WHEN FILES ARE NOT SUPPORTED. -- DWC 09/09/87 CORRECTED EXCEPTION HANDLING. WITH REPORT; USE REPORT; WITH TEXT_IO; USE TEXT_IO; PROCEDURE CE3704B IS INCOMPLETE : EXCEPTION; BEGIN TEST ("CE3704B", "CHECK THAT INTEGER_IO GET RAISES " & "MODE_ERROR FOR FILES OF MODE OUT_FILE"); DECLARE FT : FILE_TYPE; TYPE INT IS NEW INTEGER RANGE 1 .. 10; PACKAGE IIO IS NEW INTEGER_IO (INT); USE IIO; X : INT := 10; BEGIN BEGIN CREATE (FT, OUT_FILE); PUT (FT, '3'); EXCEPTION WHEN USE_ERROR => NOT_APPLICABLE ("USE_ERROR RAISED; TEXT CREATE " & "FOR TEMP FILE WITH OUT_FILE MODE"); RAISE INCOMPLETE; END; BEGIN GET (FT, X); FAILED ("MODE_ERROR NOT RAISED - FILE"); EXCEPTION WHEN MODE_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED - FILE"); END; BEGIN GET (STANDARD_OUTPUT, X); FAILED ("MODE_ERROR NOT RAISED - STANDARD_OUTPUT"); EXCEPTION WHEN MODE_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED - STANDARD_OUTPUT"); END; BEGIN GET (CURRENT_OUTPUT, X); FAILED ("MODE_ERROR NOT RAISED - CURRENT_OUTPUT"); EXCEPTION WHEN MODE_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED - CURRENT_OUTPUT"); END; CLOSE (FT); EXCEPTION WHEN INCOMPLETE => NULL; END; RESULT; END CE3704B;
32.777778
79
0.559322
3d0c69e709cd86c8f59aeb517af5827f871a49ab
129
ads
Ada
4-high/gel/applet/demo/distributed/gel_demo_client.ads
charlie5/lace
e9b7dc751d500ff3f559617a6fc3089ace9dc134
[ "0BSD" ]
20
2015-11-04T09:23:59.000Z
2022-01-14T10:21:42.000Z
4-high/gel/applet/demo/distributed/gel_demo_client.ads
charlie5/lace-alire
9ace9682cf4daac7adb9f980c2868d6225b8111c
[ "0BSD" ]
2
2015-11-04T17:05:56.000Z
2015-12-08T03:16:13.000Z
4-high/gel/applet/demo/distributed/gel_demo_client.ads
charlie5/lace-alire
9ace9682cf4daac7adb9f980c2868d6225b8111c
[ "0BSD" ]
1
2015-12-07T12:53:52.000Z
2015-12-07T12:53:52.000Z
package gel_demo_Client -- -- Provides a client. -- is task Item is entry start; end Item; end gel_demo_Client;
9.923077
23
0.651163
59ce38941275b6db422304f47076e2fdf3725817
16,732
adb
Ada
src/ewok-sched.adb
PThierry/ewok-kernel
e9c23cb3fd0afd8378bc27418778e1117d5e16cc
[ "Apache-2.0" ]
null
null
null
src/ewok-sched.adb
PThierry/ewok-kernel
e9c23cb3fd0afd8378bc27418778e1117d5e16cc
[ "Apache-2.0" ]
null
null
null
src/ewok-sched.adb
PThierry/ewok-kernel
e9c23cb3fd0afd8378bc27418778e1117d5e16cc
[ "Apache-2.0" ]
null
null
null
-- -- Copyright 2018 The wookey project team <[email protected]> -- - Ryad Benadjila -- - Arnauld Michelizza -- - Mathieu Renard -- - Philippe Thierry -- - Philippe Trebuchet -- -- 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.machine_code; with ewok.tasks; use ewok.tasks; with ewok.devices_shared; use ewok.devices_shared; with ewok.sleep; with ewok.devices; with ewok.syscalls.handler; with ewok.mpu; with ewok.layout; with ewok.interrupts; with ewok.debug; with soc.interrupts; with soc.dwt; with m4.scb; with m4.systick; with applications; -- Automatically generated package body ewok.sched with spark_mode => off is package TSK renames ewok.tasks; sched_period : unsigned_32 := 0; current_task_id : t_task_id := ID_KERNEL; current_task_mode : t_task_mode := TASK_MODE_MAINTHREAD; last_main_user_task_id : t_task_id := applications.list'first; ----------------------------------------------- -- SPARK/ghost specific functions & procedures ----------------------------------------------- function current_task_is_valid return boolean is begin return (current_task_id /= ID_UNUSED); end current_task_is_valid; ---------------------------------------------- -- sched functions ---------------------------------------------- function get_current return ewok.tasks_shared.t_task_id is begin return current_task_id; end get_current; procedure request_schedule with spark_mode => off is begin m4.scb.SCB.ICSR.PENDSVSET := 1; end request_schedule; function task_elect return t_task_id with spark_mode => off is elected : t_task_id; begin -- -- Execute pending user ISRs first -- for id in applications.list'range loop if TSK.tasks_list(id).mode = TASK_MODE_ISRTHREAD and then ewok.tasks.get_state (id, TASK_MODE_ISRTHREAD) = TASK_STATE_RUNNABLE and then ewok.tasks.get_state (id, TASK_MODE_MAINTHREAD) /= TASK_STATE_LOCKED then elected := id; goto ok_return; end if; end loop; -- -- Execute tasks in critical sections -- for id in applications.list'range loop if TSK.tasks_list(id).state = TASK_STATE_LOCKED then elected := id; if TSK.tasks_list(id).mode = TASK_MODE_MAINTHREAD then last_main_user_task_id := elected; end if; goto ok_return; end if; end loop; -- -- Updating finished ISRs state -- for id in applications.list'range loop if TSK.tasks_list(id).mode = TASK_MODE_ISRTHREAD and then ewok.tasks.get_state (id, TASK_MODE_ISRTHREAD) = TASK_STATE_ISR_DONE then ewok.tasks.set_state (id, TASK_MODE_ISRTHREAD, TASK_STATE_IDLE); TSK.tasks_list(id).isr_ctx.frame_a := NULL; TSK.tasks_list(id).isr_ctx.device_id := ID_DEV_UNUSED; TSK.tasks_list(id).isr_ctx.sched_policy := ISR_STANDARD; ewok.tasks.set_mode (id, TASK_MODE_MAINTHREAD); -- When a task has just finished its ISR its main thread might -- become runnable if ewok.sleep.is_sleeping (id) then ewok.sleep.try_waking_up (id); elsif TSK.tasks_list(id).state = TASK_STATE_IDLE then ewok.tasks.set_state (id, TASK_MODE_MAINTHREAD, TASK_STATE_RUNNABLE); end if; end if; end loop; -- -- Execute SOFTIRQ if there are some pending ISRs and/or syscalls -- if ewok.tasks.get_state (ID_SOFTIRQ, TASK_MODE_MAINTHREAD) = TASK_STATE_RUNNABLE then elected := ID_SOFTIRQ; goto ok_return; end if; -- -- IPC can force task election to reduce IPC overhead -- for id in applications.list'range loop if TSK.tasks_list(id).state = TASK_STATE_FORCED then ewok.tasks.set_state (id, TASK_MODE_MAINTHREAD, TASK_STATE_RUNNABLE); elected := id; goto ok_return; end if; end loop; #if CONFIG_SCHED_RAND declare random : aliased unsigned_32; id : t_task_id; ok : boolean; pragma unreferenced (ok); begin ewok.rng.random (random'access, ok); id := t_task_id'val ((applications.list'first)'pos + (random mod applications.list'length)); for i in 1 .. applications.list'length loop if ewok.tasks.get_state (id, TASK_MODE_MAINTHREAD) = TASK_STATE_RUNNABLE then elected := id; goto ok_return; end if; if id /= applications.list'last then id := t_task_id'succ (id); else id := applications.list'first; end if; end loop; end; #end if; #if CONFIG_SCHED_RR declare id : t_task_id; begin id := last_main_user_task_id; for i in 1 .. applications.list'length loop if id < applications.list'last then id := t_task_id'succ (id); else id := applications.list'first; end if; if ewok.tasks.get_state (id, TASK_MODE_MAINTHREAD) = TASK_STATE_RUNNABLE then elected := id; last_main_user_task_id := elected; goto ok_return; end if; end loop; end; #end if; #if CONFIG_SCHED_MLQ_RR declare max_prio : unsigned_8 := 0; id : t_task_id; begin -- Max priority for id in applications.list'range loop if TSK.tasks_list(id).prio > max_prio and ewok.tasks.get_state (id, TASK_MODE_MAINTHREAD) = TASK_STATE_RUNNABLE then max_prio := TSK.tasks_list(id).prio; end if; end loop; -- Round Robin election on tasks with the max priority id := last_main_user_task_id; for i in 1 .. applications.list'length loop if id < applications.list'last then id := t_task_id'succ (id); else id := applications.list'first; end if; if TSK.tasks_list(id).prio = max_prio and ewok.tasks.get_state (id, TASK_MODE_MAINTHREAD) = TASK_STATE_RUNNABLE then elected := id; last_main_user_task_id := elected; goto ok_return; end if; end loop; end; #end if; -- Default elected := ID_KERNEL; <<ok_return>> --pragma DEBUG (debug.log (debug.DEBUG, "task " & t_task_id'image (elected) & " elected")); return elected; end task_elect; procedure mpu_switching (id : in t_task_id) with spark_mode => off is new_task : t_task renames ewok.tasks.tasks_list(id); dev_id : t_device_id; ok : boolean; begin -- Release previously dynamically allocated regions (used for mapping -- devices and ISR stack) ewok.mpu.unmap_all; -- Kernel tasks have no access to user regions if new_task.ttype = TASK_TYPE_KERNEL then ewok.mpu.update_subregions (region_number => ewok.mpu.USER_CODE_REGION, subregion_mask => 16#FF#); ewok.mpu.update_subregions (region_number => ewok.mpu.USER_DATA_REGION, subregion_mask => 16#FF#); return; end if; -- -- ISR mode -- if new_task.mode = TASK_MODE_ISRTHREAD then -- Mapping the ISR stack ewok.mpu.map (addr => ewok.layout.STACK_BOTTOM_TASK_ISR, size => 4096, region_type => ewok.mpu.REGION_TYPE_ISR_STACK, subregion_mask => 0, success => ok); if not ok then debug.panic ("mpu_switching(): mapping ISR stack failed!"); end if; -- Mapping the ISR device dev_id := new_task.isr_ctx.device_id; if dev_id /= ID_DEV_UNUSED then ewok.devices.map_device (dev_id, ok); if not ok then debug.panic ("mpu_switching(): mapping device failed!"); end if; end if; -- -- Main thread -- else -- Mapping the user devices -- -- Design note: -- - EXTIs are a special case where an interrupt can trigger a -- user ISR without any device_id associated -- - DMAs are not registered in devices for i in new_task.devices'range loop if new_task.devices(i).device_id /= ID_DEV_UNUSED and then new_task.devices(i).mounted = true then ewok.devices.map_device (new_task.devices(i).device_id, ok); if not ok then debug.panic ("mpu_switching(): mapping device failed!"); end if; end if; end loop; end if; -- ISR or MAIN thread -------------------------------- -- Mapping user code and data -- -------------------------------- declare type t_mask is array (unsigned_8 range 1 .. 8) of bit with pack, size => 8; function to_unsigned_8 is new ada.unchecked_conversion (t_mask, unsigned_8); mask : t_mask := (others => 1); begin for i in 0 .. new_task.num_slots - 1 loop mask(new_task.slot + i) := 0; end loop; ewok.mpu.update_subregions (region_number => ewok.mpu.USER_CODE_REGION, subregion_mask => to_unsigned_8 (mask)); ewok.mpu.update_subregions (region_number => ewok.mpu.USER_DATA_REGION, subregion_mask => to_unsigned_8 (mask)); end; end mpu_switching; function pendsv_handler (frame_a : ewok.t_stack_frame_access) return ewok.t_stack_frame_access with spark_mode => off is old_task_id : constant t_task_id := current_task_id; old_task_mode : constant t_task_mode := current_task_mode; begin -- Keep ISR threads running until they finish if current_task_mode = TASK_MODE_ISRTHREAD and then ewok.tasks.get_state (current_task_id, TASK_MODE_ISRTHREAD) = TASK_STATE_RUNNABLE then return frame_a; end if; -- Save current context #if CONFIG_KERNEL_EXP_REENTRANCY -- This global variable write access is not reentrant, but, by -- construction can't be accedded concurently in a monoprocessor -- system due to processor's IRQ priority. -- Although, we make IRQ locked here for future compatibility -- -- TODO: define a clear denomination for locking/unlocking critical -- sections in kernel instead of directly calling HW primitives m4.cpu.disable_irq; #end if; if current_task_mode = TASK_MODE_ISRTHREAD then TSK.tasks_list(current_task_id).isr_ctx.frame_a := frame_a; else TSK.tasks_list(current_task_id).ctx.frame_a := frame_a; end if; -- Elect a new task and change current_task_id current_task_id := task_elect; current_task_mode := TSK.tasks_list(current_task_id).mode; #if CONFIG_KERNEL_EXP_REENTRANCY -- End of global variables WR access m4.cpu.enable_irq; #end if; -- Apply MPU specific configuration if not (current_task_id = old_task_id and current_task_mode = old_task_mode) then mpu_switching (current_task_id); end if; -- Return the new context if current_task_mode = TASK_MODE_ISRTHREAD then return TSK.tasks_list(current_task_id).isr_ctx.frame_a; else return TSK.tasks_list(current_task_id).ctx.frame_a; end if; end pendsv_handler; function systick_handler (frame_a : ewok.t_stack_frame_access) return ewok.t_stack_frame_access with spark_mode => off is old_task_id : constant t_task_id := current_task_id; old_task_mode : constant t_task_mode := current_task_mode; begin m4.systick.increment; sched_period := sched_period + 1; -- Managing DWT cycle count overflow soc.dwt.ovf_manage; -- FIXME - CONFIG_SCHED_PERIOD must be in milliseconds, -- not in ticks if sched_period /= $CONFIG_SCHED_PERIOD then return frame_a; else sched_period := 0; end if; -- Waking-up sleeping tasks #if CONFIG_KERNEL_EXP_REENTRANCY -- This global variable write access is not reentrant, but, by -- construction can't be accedded concurently in a monoprocessor -- system due to processor's IRQ priority. -- Although, we make IRQ locked here for future compatibility -- Here we lock down to the end of globals usage to avoid to -- many successive disable/enable of IRQs m4.cpu.disable_irq; #end if; ewok.sleep.check_is_awoke; -- Keep ISR threads running until they finish if current_task_mode = TASK_MODE_ISRTHREAD and then ewok.tasks.get_state (current_task_id, TASK_MODE_ISRTHREAD) = TASK_STATE_RUNNABLE then #if CONFIG_KERNEL_EXP_REENTRANCY m4.cpu.enable_irq; #end if; return frame_a; end if; -- Save current context if current_task_mode = TASK_MODE_ISRTHREAD then TSK.tasks_list(current_task_id).isr_ctx.frame_a := frame_a; else TSK.tasks_list(current_task_id).ctx.frame_a := frame_a; end if; -- Elect a new task current_task_id := task_elect; current_task_mode := TSK.tasks_list(current_task_id).mode; #if CONFIG_KERNEL_EXP_REENTRANCY -- End of global variable access m4.cpu.enable_irq; #end if; -- Apply MPU specific configuration if not (current_task_id = old_task_id and current_task_mode = old_task_mode) then mpu_switching (current_task_id); end if; -- Return the new context if current_task_mode = TASK_MODE_ISRTHREAD then return TSK.tasks_list(current_task_id).isr_ctx.frame_a; else return TSK.tasks_list(current_task_id).ctx.frame_a; end if; end systick_handler; procedure init with spark_mode => off is idle_task : t_task renames ewok.tasks.tasks_list(ID_KERNEL); ok : boolean; begin current_task_id := ID_KERNEL; ewok.interrupts.set_task_switching_handler (soc.interrupts.INT_SYSTICK, systick_handler'access, ID_KERNEL, ID_DEV_UNUSED, ok); if not ok then raise program_error; end if; ewok.interrupts.set_task_switching_handler (soc.interrupts.INT_PENDSV, pendsv_handler'access, ID_KERNEL, ID_DEV_UNUSED, ok); if not ok then raise program_error; end if; ewok.interrupts.set_task_switching_handler (soc.interrupts.INT_SVC, ewok.syscalls.handler.svc_handler'access, ID_KERNEL, ID_DEV_UNUSED, ok); if not ok then raise program_error; end if; -- -- Jump to the kernel task -- system.machine_code.asm ("mov r0, %0" & ascii.lf & "msr psp, r0" & ascii.lf & "mov r0, 2" & ascii.lf & "msr control, r0" & ascii.lf & "mov r1, %1" & ascii.lf & "bx r1", inputs => (system_address'asm_input ("r", to_system_address (idle_task.ctx.frame_a)), system_address'asm_input ("r", idle_task.entry_point)), clobber => "r0, r1", volatile => true); end init; end ewok.sched;
28.998267
97
0.58929
5803fc0946af681b6fe1b8d4fb1dcff74182fdac
140
ads
Ada
1-base/math/source/precision/float/pure/float_math-geometry-d3-modeller.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-geometry-d3-modeller.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-geometry-d3-modeller.ads
charlie5/lace-alire
9ace9682cf4daac7adb9f980c2868d6225b8111c
[ "0BSD" ]
1
2015-12-07T12:53:52.000Z
2015-12-07T12:53:52.000Z
with any_Math.any_Geometry.any_d3.any_Modeller; package float_math.Geometry.d3.Modeller is new float_Math.Geometry.d3.any_Modeller;
20
83
0.814286
59e03fb3a4bb5471899d6c9911fdfb18c06a1d94
2,598
ads
Ada
src/natools-web-filters-text_replacement.ads
faelys/natools-web
f7ba99f2ffb6f5a06d1b1e8becbf5f92fd58c750
[ "0BSD" ]
1
2015-04-23T10:48:58.000Z
2015-04-23T10:48:58.000Z
src/natools-web-filters-text_replacement.ads
faelys/natools-web
f7ba99f2ffb6f5a06d1b1e8becbf5f92fd58c750
[ "0BSD" ]
null
null
null
src/natools-web-filters-text_replacement.ads
faelys/natools-web
f7ba99f2ffb6f5a06d1b1e8becbf5f92fd58c750
[ "0BSD" ]
null
null
null
------------------------------------------------------------------------------ -- Copyright (c) 2017, 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. -- ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Natools.Web.Filters.Text_Replacement provides a filter which directly -- -- replaces a piece of text with another. -- -- Note that due to API limitation, patterns which cross block limits are -- -- missed. -- ------------------------------------------------------------------------------ with Natools.S_Expressions.Lockable; package Natools.Web.Filters.Text_Replacement is pragma Preelaborate; type Filter (<>) is new Filters.Filter with private; overriding procedure Apply (Object : in Filter; Output : in out Ada.Streams.Root_Stream_Type'Class; Data : in Ada.Streams.Stream_Element_Array); -- Perform text remplacement on Data function Create (Arguments : in out S_Expressions.Lockable.Descriptor'Class) return Filters.Filter'Class; -- Build a text replacement filter from two atoms, first the pattern -- then the replacement. private type Filter (Pattern_Length, Replacement_Length : Natools.S_Expressions.Count) is new Filters.Filter with record Pattern : Natools.S_Expressions.Atom (1 .. Pattern_Length); Replacement : Natools.S_Expressions.Atom (1 .. Replacement_Length); end record; end Natools.Web.Filters.Text_Replacement;
49.018868
78
0.550808
31998ff30ea22aea26ff09fdee9568ac3d628f33
57
ads
Ada
specs/ada/common/tkmrpc-response-ees.ads
DrenfongWong/tkm-rpc
075d22871cf81d497aac656c7f03a513278b641c
[ "BSD-3-Clause" ]
null
null
null
specs/ada/common/tkmrpc-response-ees.ads
DrenfongWong/tkm-rpc
075d22871cf81d497aac656c7f03a513278b641c
[ "BSD-3-Clause" ]
null
null
null
specs/ada/common/tkmrpc-response-ees.ads
DrenfongWong/tkm-rpc
075d22871cf81d497aac656c7f03a513278b641c
[ "BSD-3-Clause" ]
null
null
null
package Tkmrpc.Response.Ees is end Tkmrpc.Response.Ees;
14.25
30
0.807018
59ed12b8f56c33674b4ce5e6a48e023732e6c842
76,763
adb
Ada
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-comutr.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-comutr.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-comutr.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- A D A . C O N T A I N E R S . M U L T I W A Y _ T R E E S -- -- -- -- B o d y -- -- -- -- Copyright (C) 2004-2019, 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/>. -- -- -- -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ with Ada.Unchecked_Conversion; with Ada.Unchecked_Deallocation; with System; use type System.Address; package body Ada.Containers.Multiway_Trees is pragma Warnings (Off, "variable ""Busy*"" is not referenced"); pragma Warnings (Off, "variable ""Lock*"" is not referenced"); -- See comment in Ada.Containers.Helpers -------------------- -- Root_Iterator -- -------------------- type Root_Iterator is abstract new Limited_Controlled and Tree_Iterator_Interfaces.Forward_Iterator with record Container : Tree_Access; Subtree : Tree_Node_Access; end record with Disable_Controlled => not T_Check; overriding procedure Finalize (Object : in out Root_Iterator); ----------------------- -- Subtree_Iterator -- ----------------------- -- ??? these headers are a bit odd, but for sure they do not substitute -- for documenting things, what *is* a Subtree_Iterator? type Subtree_Iterator is new Root_Iterator with null record; overriding function First (Object : Subtree_Iterator) return Cursor; overriding function Next (Object : Subtree_Iterator; Position : Cursor) return Cursor; --------------------- -- Child_Iterator -- --------------------- type Child_Iterator is new Root_Iterator and Tree_Iterator_Interfaces.Reversible_Iterator with null record with Disable_Controlled => not T_Check; overriding function First (Object : Child_Iterator) return Cursor; overriding function Next (Object : Child_Iterator; Position : Cursor) return Cursor; overriding function Last (Object : Child_Iterator) return Cursor; overriding function Previous (Object : Child_Iterator; Position : Cursor) return Cursor; ----------------------- -- Local Subprograms -- ----------------------- function Root_Node (Container : Tree) return Tree_Node_Access; procedure Deallocate_Node is new Ada.Unchecked_Deallocation (Tree_Node_Type, Tree_Node_Access); procedure Deallocate_Children (Subtree : Tree_Node_Access; Count : in out Count_Type); procedure Deallocate_Subtree (Subtree : in out Tree_Node_Access; Count : in out Count_Type); function Equal_Children (Left_Subtree, Right_Subtree : Tree_Node_Access) return Boolean; function Equal_Subtree (Left_Subtree, Right_Subtree : Tree_Node_Access) return Boolean; procedure Iterate_Children (Container : Tree_Access; Subtree : Tree_Node_Access; Process : not null access procedure (Position : Cursor)); procedure Iterate_Subtree (Container : Tree_Access; Subtree : Tree_Node_Access; Process : not null access procedure (Position : Cursor)); procedure Copy_Children (Source : Children_Type; Parent : Tree_Node_Access; Count : in out Count_Type); procedure Copy_Subtree (Source : Tree_Node_Access; Parent : Tree_Node_Access; Target : out Tree_Node_Access; Count : in out Count_Type); function Find_In_Children (Subtree : Tree_Node_Access; Item : Element_Type) return Tree_Node_Access; function Find_In_Subtree (Subtree : Tree_Node_Access; Item : Element_Type) return Tree_Node_Access; function Child_Count (Children : Children_Type) return Count_Type; function Subtree_Node_Count (Subtree : Tree_Node_Access) return Count_Type; function Is_Reachable (From, To : Tree_Node_Access) return Boolean; procedure Remove_Subtree (Subtree : Tree_Node_Access); procedure Insert_Subtree_Node (Subtree : Tree_Node_Access; Parent : Tree_Node_Access; Before : Tree_Node_Access); procedure Insert_Subtree_List (First : Tree_Node_Access; Last : Tree_Node_Access; Parent : Tree_Node_Access; Before : Tree_Node_Access); procedure Splice_Children (Target_Parent : Tree_Node_Access; Before : Tree_Node_Access; Source_Parent : Tree_Node_Access); --------- -- "=" -- --------- function "=" (Left, Right : Tree) return Boolean is begin return Equal_Children (Root_Node (Left), Root_Node (Right)); end "="; ------------ -- Adjust -- ------------ procedure Adjust (Container : in out Tree) is Source : constant Children_Type := Container.Root.Children; Source_Count : constant Count_Type := Container.Count; Target_Count : Count_Type; begin -- We first restore the target container to its default-initialized -- state, before we attempt any allocation, to ensure that invariants -- are preserved in the event that the allocation fails. Container.Root.Children := Children_Type'(others => null); Zero_Counts (Container.TC); Container.Count := 0; -- Copy_Children returns a count of the number of nodes that it -- allocates, but it works by incrementing the value that is passed -- in. We must therefore initialize the count value before calling -- Copy_Children. Target_Count := 0; -- Now we attempt the allocation of subtrees. The invariants are -- satisfied even if the allocation fails. Copy_Children (Source, Root_Node (Container), Target_Count); pragma Assert (Target_Count = Source_Count); Container.Count := Source_Count; end Adjust; ------------------- -- Ancestor_Find -- ------------------- function Ancestor_Find (Position : Cursor; Item : Element_Type) return Cursor is R, N : Tree_Node_Access; begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; -- Commented-out pending official ruling from ARG. ??? -- if Position.Container /= Container'Unrestricted_Access then -- raise Program_Error with "Position cursor not in container"; -- end if; -- AI-0136 says to raise PE if Position equals the root node. This does -- not seem correct, as this value is just the limiting condition of the -- search. For now we omit this check, pending a ruling from the ARG.??? -- if Checks and then Is_Root (Position) then -- raise Program_Error with "Position cursor designates root"; -- end if; R := Root_Node (Position.Container.all); N := Position.Node; while N /= R loop if N.Element = Item then return Cursor'(Position.Container, N); end if; N := N.Parent; end loop; return No_Element; end Ancestor_Find; ------------------ -- Append_Child -- ------------------ procedure Append_Child (Container : in out Tree; Parent : Cursor; New_Item : Element_Type; Count : Count_Type := 1) is First : Tree_Node_Access; Last : Tree_Node_Access; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; if Count = 0 then return; end if; TC_Check (Container.TC); First := new Tree_Node_Type'(Parent => Parent.Node, Element => New_Item, others => <>); Last := First; for J in Count_Type'(2) .. Count loop -- Reclaim other nodes if Storage_Error. ??? Last.Next := new Tree_Node_Type'(Parent => Parent.Node, Prev => Last, Element => New_Item, others => <>); Last := Last.Next; end loop; Insert_Subtree_List (First => First, Last => Last, Parent => Parent.Node, Before => null); -- null means "insert at end of list" -- In order for operation Node_Count to complete in O(1) time, we cache -- the count value. Here we increment the total count by the number of -- nodes we just inserted. Container.Count := Container.Count + Count; end Append_Child; ------------ -- Assign -- ------------ procedure Assign (Target : in out Tree; Source : Tree) is Source_Count : constant Count_Type := Source.Count; Target_Count : Count_Type; begin if Target'Address = Source'Address then return; end if; Target.Clear; -- checks busy bit -- Copy_Children returns the number of nodes that it allocates, but it -- does this by incrementing the count value passed in, so we must -- initialize the count before calling Copy_Children. Target_Count := 0; -- Note that Copy_Children inserts the newly-allocated children into -- their parent list only after the allocation of all the children has -- succeeded. This preserves invariants even if the allocation fails. Copy_Children (Source.Root.Children, Root_Node (Target), Target_Count); pragma Assert (Target_Count = Source_Count); Target.Count := Source_Count; end Assign; ----------------- -- Child_Count -- ----------------- function Child_Count (Parent : Cursor) return Count_Type is begin return (if Parent = No_Element then 0 else Child_Count (Parent.Node.Children)); end Child_Count; function Child_Count (Children : Children_Type) return Count_Type is Result : Count_Type; Node : Tree_Node_Access; begin Result := 0; Node := Children.First; while Node /= null loop Result := Result + 1; Node := Node.Next; end loop; return Result; end Child_Count; ----------------- -- Child_Depth -- ----------------- function Child_Depth (Parent, Child : Cursor) return Count_Type is Result : Count_Type; N : Tree_Node_Access; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Child = No_Element then raise Constraint_Error with "Child cursor has no element"; end if; if Checks and then Parent.Container /= Child.Container then raise Program_Error with "Parent and Child in different containers"; end if; Result := 0; N := Child.Node; while N /= Parent.Node loop Result := Result + 1; N := N.Parent; if Checks and then N = null then raise Program_Error with "Parent is not ancestor of Child"; end if; end loop; return Result; end Child_Depth; ----------- -- Clear -- ----------- procedure Clear (Container : in out Tree) is Container_Count, Children_Count : Count_Type; begin TC_Check (Container.TC); -- We first set the container count to 0, in order to preserve -- invariants in case the deallocation fails. (This works because -- Deallocate_Children immediately removes the children from their -- parent, and then does the actual deallocation.) Container_Count := Container.Count; Container.Count := 0; -- Deallocate_Children returns the number of nodes that it deallocates, -- but it does this by incrementing the count value that is passed in, -- so we must first initialize the count return value before calling it. Children_Count := 0; -- See comment above. Deallocate_Children immediately removes the -- children list from their parent node (here, the root of the tree), -- and only after that does it attempt the actual deallocation. So even -- if the deallocation fails, the representation invariants for the tree -- are preserved. Deallocate_Children (Root_Node (Container), Children_Count); pragma Assert (Children_Count = Container_Count); end Clear; ------------------------ -- Constant_Reference -- ------------------------ function Constant_Reference (Container : aliased Tree; Position : Cursor) return Constant_Reference_Type is begin if Checks and then Position.Container = null then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong container"; end if; if Checks and then Position.Node = Root_Node (Container) then raise Program_Error with "Position cursor designates root"; end if; -- Implement Vet for multiway tree??? -- pragma Assert (Vet (Position), -- "Position cursor in Constant_Reference is bad"); declare C : Tree renames Position.Container.all; TC : constant Tamper_Counts_Access := C.TC'Unrestricted_Access; begin return R : constant Constant_Reference_Type := (Element => Position.Node.Element'Access, Control => (Controlled with TC)) do Lock (TC.all); end return; end; end Constant_Reference; -------------- -- Contains -- -------------- function Contains (Container : Tree; Item : Element_Type) return Boolean is begin return Find (Container, Item) /= No_Element; end Contains; ---------- -- Copy -- ---------- function Copy (Source : Tree) return Tree is begin return Target : Tree do Copy_Children (Source => Source.Root.Children, Parent => Root_Node (Target), Count => Target.Count); pragma Assert (Target.Count = Source.Count); end return; end Copy; ------------------- -- Copy_Children -- ------------------- procedure Copy_Children (Source : Children_Type; Parent : Tree_Node_Access; Count : in out Count_Type) is pragma Assert (Parent /= null); pragma Assert (Parent.Children.First = null); pragma Assert (Parent.Children.Last = null); CC : Children_Type; C : Tree_Node_Access; begin -- We special-case the first allocation, in order to establish the -- representation invariants for type Children_Type. C := Source.First; if C = null then return; end if; Copy_Subtree (Source => C, Parent => Parent, Target => CC.First, Count => Count); CC.Last := CC.First; -- The representation invariants for the Children_Type list have been -- established, so we can now copy the remaining children of Source. C := C.Next; while C /= null loop Copy_Subtree (Source => C, Parent => Parent, Target => CC.Last.Next, Count => Count); CC.Last.Next.Prev := CC.Last; CC.Last := CC.Last.Next; C := C.Next; end loop; -- Add the newly-allocated children to their parent list only after the -- allocation has succeeded, so as to preserve invariants of the parent. Parent.Children := CC; end Copy_Children; ------------------ -- Copy_Subtree -- ------------------ procedure Copy_Subtree (Target : in out Tree; Parent : Cursor; Before : Cursor; Source : Cursor) is Target_Subtree : Tree_Node_Access; Target_Count : Count_Type; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Target'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Target'Unrestricted_Access then raise Program_Error with "Before cursor not in container"; end if; if Checks and then Before.Node.Parent /= Parent.Node then raise Constraint_Error with "Before cursor not child of Parent"; end if; end if; if Source = No_Element then return; end if; if Checks and then Is_Root (Source) then raise Constraint_Error with "Source cursor designates root"; end if; -- Copy_Subtree returns a count of the number of nodes that it -- allocates, but it works by incrementing the value that is passed -- in. We must therefore initialize the count value before calling -- Copy_Subtree. Target_Count := 0; Copy_Subtree (Source => Source.Node, Parent => Parent.Node, Target => Target_Subtree, Count => Target_Count); pragma Assert (Target_Subtree /= null); pragma Assert (Target_Subtree.Parent = Parent.Node); pragma Assert (Target_Count >= 1); Insert_Subtree_Node (Subtree => Target_Subtree, Parent => Parent.Node, Before => Before.Node); -- In order for operation Node_Count to complete in O(1) time, we cache -- the count value. Here we increment the total count by the number of -- nodes we just inserted. Target.Count := Target.Count + Target_Count; end Copy_Subtree; procedure Copy_Subtree (Source : Tree_Node_Access; Parent : Tree_Node_Access; Target : out Tree_Node_Access; Count : in out Count_Type) is begin Target := new Tree_Node_Type'(Element => Source.Element, Parent => Parent, others => <>); Count := Count + 1; Copy_Children (Source => Source.Children, Parent => Target, Count => Count); end Copy_Subtree; ------------------------- -- Deallocate_Children -- ------------------------- procedure Deallocate_Children (Subtree : Tree_Node_Access; Count : in out Count_Type) is pragma Assert (Subtree /= null); CC : Children_Type := Subtree.Children; C : Tree_Node_Access; begin -- We immediately remove the children from their parent, in order to -- preserve invariants in case the deallocation fails. Subtree.Children := Children_Type'(others => null); while CC.First /= null loop C := CC.First; CC.First := C.Next; Deallocate_Subtree (C, Count); end loop; end Deallocate_Children; ------------------------ -- Deallocate_Subtree -- ------------------------ procedure Deallocate_Subtree (Subtree : in out Tree_Node_Access; Count : in out Count_Type) is begin Deallocate_Children (Subtree, Count); Deallocate_Node (Subtree); Count := Count + 1; end Deallocate_Subtree; --------------------- -- Delete_Children -- --------------------- procedure Delete_Children (Container : in out Tree; Parent : Cursor) is Count : Count_Type; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; TC_Check (Container.TC); -- Deallocate_Children returns a count of the number of nodes that it -- deallocates, but it works by incrementing the value that is passed -- in. We must therefore initialize the count value before calling -- Deallocate_Children. Count := 0; Deallocate_Children (Parent.Node, Count); pragma Assert (Count <= Container.Count); Container.Count := Container.Count - Count; end Delete_Children; ----------------- -- Delete_Leaf -- ----------------- procedure Delete_Leaf (Container : in out Tree; Position : in out Cursor) is X : Tree_Node_Access; begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor not in container"; end if; if Checks and then Is_Root (Position) then raise Program_Error with "Position cursor designates root"; end if; if Checks and then not Is_Leaf (Position) then raise Constraint_Error with "Position cursor does not designate leaf"; end if; TC_Check (Container.TC); X := Position.Node; Position := No_Element; -- Restore represention invariants before attempting the actual -- deallocation. Remove_Subtree (X); Container.Count := Container.Count - 1; -- It is now safe to attempt the deallocation. This leaf node has been -- disassociated from the tree, so even if the deallocation fails, -- representation invariants will remain satisfied. Deallocate_Node (X); end Delete_Leaf; -------------------- -- Delete_Subtree -- -------------------- procedure Delete_Subtree (Container : in out Tree; Position : in out Cursor) is X : Tree_Node_Access; Count : Count_Type; begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor not in container"; end if; if Checks and then Is_Root (Position) then raise Program_Error with "Position cursor designates root"; end if; TC_Check (Container.TC); X := Position.Node; Position := No_Element; -- Here is one case where a deallocation failure can result in the -- violation of a representation invariant. We disassociate the subtree -- from the tree now, but we only decrement the total node count after -- we attempt the deallocation. However, if the deallocation fails, the -- total node count will not get decremented. -- One way around this dilemma is to count the nodes in the subtree -- before attempt to delete the subtree, but that is an O(n) operation, -- so it does not seem worth it. -- Perhaps this is much ado about nothing, since the only way -- deallocation can fail is if Controlled Finalization fails: this -- propagates Program_Error so all bets are off anyway. ??? Remove_Subtree (X); -- Deallocate_Subtree returns a count of the number of nodes that it -- deallocates, but it works by incrementing the value that is passed -- in. We must therefore initialize the count value before calling -- Deallocate_Subtree. Count := 0; Deallocate_Subtree (X, Count); pragma Assert (Count <= Container.Count); -- See comments above. We would prefer to do this sooner, but there's no -- way to satisfy that goal without a potentially severe execution -- penalty. Container.Count := Container.Count - Count; end Delete_Subtree; ----------- -- Depth -- ----------- function Depth (Position : Cursor) return Count_Type is Result : Count_Type; N : Tree_Node_Access; begin Result := 0; N := Position.Node; while N /= null loop N := N.Parent; Result := Result + 1; end loop; return Result; end Depth; ------------- -- Element -- ------------- function Element (Position : Cursor) return Element_Type is begin if Checks and then Position.Container = null then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Node = Root_Node (Position.Container.all) then raise Program_Error with "Position cursor designates root"; end if; return Position.Node.Element; end Element; -------------------- -- Equal_Children -- -------------------- function Equal_Children (Left_Subtree : Tree_Node_Access; Right_Subtree : Tree_Node_Access) return Boolean is Left_Children : Children_Type renames Left_Subtree.Children; Right_Children : Children_Type renames Right_Subtree.Children; L, R : Tree_Node_Access; begin if Child_Count (Left_Children) /= Child_Count (Right_Children) then return False; end if; L := Left_Children.First; R := Right_Children.First; while L /= null loop if not Equal_Subtree (L, R) then return False; end if; L := L.Next; R := R.Next; end loop; return True; end Equal_Children; ------------------- -- Equal_Subtree -- ------------------- function Equal_Subtree (Left_Position : Cursor; Right_Position : Cursor) return Boolean is begin if Checks and then Left_Position = No_Element then raise Constraint_Error with "Left cursor has no element"; end if; if Checks and then Right_Position = No_Element then raise Constraint_Error with "Right cursor has no element"; end if; if Left_Position = Right_Position then return True; end if; if Is_Root (Left_Position) then if not Is_Root (Right_Position) then return False; end if; return Equal_Children (Left_Position.Node, Right_Position.Node); end if; if Is_Root (Right_Position) then return False; end if; return Equal_Subtree (Left_Position.Node, Right_Position.Node); end Equal_Subtree; function Equal_Subtree (Left_Subtree : Tree_Node_Access; Right_Subtree : Tree_Node_Access) return Boolean is begin if Left_Subtree.Element /= Right_Subtree.Element then return False; end if; return Equal_Children (Left_Subtree, Right_Subtree); end Equal_Subtree; -------------- -- Finalize -- -------------- procedure Finalize (Object : in out Root_Iterator) is begin Unbusy (Object.Container.TC); end Finalize; ---------- -- Find -- ---------- function Find (Container : Tree; Item : Element_Type) return Cursor is N : constant Tree_Node_Access := Find_In_Children (Root_Node (Container), Item); begin if N = null then return No_Element; else return Cursor'(Container'Unrestricted_Access, N); end if; end Find; ----------- -- First -- ----------- overriding function First (Object : Subtree_Iterator) return Cursor is begin if Object.Subtree = Root_Node (Object.Container.all) then return First_Child (Root (Object.Container.all)); else return Cursor'(Object.Container, Object.Subtree); end if; end First; overriding function First (Object : Child_Iterator) return Cursor is begin return First_Child (Cursor'(Object.Container, Object.Subtree)); end First; ----------------- -- First_Child -- ----------------- function First_Child (Parent : Cursor) return Cursor is Node : Tree_Node_Access; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; Node := Parent.Node.Children.First; if Node = null then return No_Element; end if; return Cursor'(Parent.Container, Node); end First_Child; ------------------------- -- First_Child_Element -- ------------------------- function First_Child_Element (Parent : Cursor) return Element_Type is begin return Element (First_Child (Parent)); end First_Child_Element; ---------------------- -- Find_In_Children -- ---------------------- function Find_In_Children (Subtree : Tree_Node_Access; Item : Element_Type) return Tree_Node_Access is N, Result : Tree_Node_Access; begin N := Subtree.Children.First; while N /= null loop Result := Find_In_Subtree (N, Item); if Result /= null then return Result; end if; N := N.Next; end loop; return null; end Find_In_Children; --------------------- -- Find_In_Subtree -- --------------------- function Find_In_Subtree (Position : Cursor; Item : Element_Type) return Cursor is Result : Tree_Node_Access; begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; -- Commented out pending official ruling by ARG. ??? -- if Checks and then -- Position.Container /= Container'Unrestricted_Access -- then -- raise Program_Error with "Position cursor not in container"; -- end if; Result := (if Is_Root (Position) then Find_In_Children (Position.Node, Item) else Find_In_Subtree (Position.Node, Item)); if Result = null then return No_Element; end if; return Cursor'(Position.Container, Result); end Find_In_Subtree; function Find_In_Subtree (Subtree : Tree_Node_Access; Item : Element_Type) return Tree_Node_Access is begin if Subtree.Element = Item then return Subtree; end if; return Find_In_Children (Subtree, Item); end Find_In_Subtree; ------------------------ -- Get_Element_Access -- ------------------------ function Get_Element_Access (Position : Cursor) return not null Element_Access is begin return Position.Node.Element'Access; end Get_Element_Access; ----------------- -- Has_Element -- ----------------- function Has_Element (Position : Cursor) return Boolean is begin return (if Position = No_Element then False else Position.Node.Parent /= null); end Has_Element; ------------------ -- Insert_Child -- ------------------ procedure Insert_Child (Container : in out Tree; Parent : Cursor; Before : Cursor; New_Item : Element_Type; Count : Count_Type := 1) is Position : Cursor; pragma Unreferenced (Position); begin Insert_Child (Container, Parent, Before, New_Item, Position, Count); end Insert_Child; procedure Insert_Child (Container : in out Tree; Parent : Cursor; Before : Cursor; New_Item : Element_Type; Position : out Cursor; Count : Count_Type := 1) is First : Tree_Node_Access; Last : Tree_Node_Access; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Container'Unrestricted_Access then raise Program_Error with "Before cursor not in container"; end if; if Checks and then Before.Node.Parent /= Parent.Node then raise Constraint_Error with "Parent cursor not parent of Before"; end if; end if; if Count = 0 then Position := No_Element; -- Need ruling from ARG ??? return; end if; TC_Check (Container.TC); First := new Tree_Node_Type'(Parent => Parent.Node, Element => New_Item, others => <>); Last := First; for J in Count_Type'(2) .. Count loop -- Reclaim other nodes if Storage_Error. ??? Last.Next := new Tree_Node_Type'(Parent => Parent.Node, Prev => Last, Element => New_Item, others => <>); Last := Last.Next; end loop; Insert_Subtree_List (First => First, Last => Last, Parent => Parent.Node, Before => Before.Node); -- In order for operation Node_Count to complete in O(1) time, we cache -- the count value. Here we increment the total count by the number of -- nodes we just inserted. Container.Count := Container.Count + Count; Position := Cursor'(Parent.Container, First); end Insert_Child; procedure Insert_Child (Container : in out Tree; Parent : Cursor; Before : Cursor; Position : out Cursor; Count : Count_Type := 1) is First : Tree_Node_Access; Last : Tree_Node_Access; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Container'Unrestricted_Access then raise Program_Error with "Before cursor not in container"; end if; if Checks and then Before.Node.Parent /= Parent.Node then raise Constraint_Error with "Parent cursor not parent of Before"; end if; end if; if Count = 0 then Position := No_Element; -- Need ruling from ARG ??? return; end if; TC_Check (Container.TC); First := new Tree_Node_Type'(Parent => Parent.Node, Element => <>, others => <>); Last := First; for J in Count_Type'(2) .. Count loop -- Reclaim other nodes if Storage_Error. ??? Last.Next := new Tree_Node_Type'(Parent => Parent.Node, Prev => Last, Element => <>, others => <>); Last := Last.Next; end loop; Insert_Subtree_List (First => First, Last => Last, Parent => Parent.Node, Before => Before.Node); -- In order for operation Node_Count to complete in O(1) time, we cache -- the count value. Here we increment the total count by the number of -- nodes we just inserted. Container.Count := Container.Count + Count; Position := Cursor'(Parent.Container, First); end Insert_Child; ------------------------- -- Insert_Subtree_List -- ------------------------- procedure Insert_Subtree_List (First : Tree_Node_Access; Last : Tree_Node_Access; Parent : Tree_Node_Access; Before : Tree_Node_Access) is pragma Assert (Parent /= null); C : Children_Type renames Parent.Children; begin -- This is a simple utility operation to insert a list of nodes (from -- First..Last) as children of Parent. The Before node specifies where -- the new children should be inserted relative to the existing -- children. if First = null then pragma Assert (Last = null); return; end if; pragma Assert (Last /= null); pragma Assert (Before = null or else Before.Parent = Parent); if C.First = null then C.First := First; C.First.Prev := null; C.Last := Last; C.Last.Next := null; elsif Before = null then -- means "insert after existing nodes" C.Last.Next := First; First.Prev := C.Last; C.Last := Last; C.Last.Next := null; elsif Before = C.First then Last.Next := C.First; C.First.Prev := Last; C.First := First; C.First.Prev := null; else Before.Prev.Next := First; First.Prev := Before.Prev; Last.Next := Before; Before.Prev := Last; end if; end Insert_Subtree_List; ------------------------- -- Insert_Subtree_Node -- ------------------------- procedure Insert_Subtree_Node (Subtree : Tree_Node_Access; Parent : Tree_Node_Access; Before : Tree_Node_Access) is begin -- This is a simple wrapper operation to insert a single child into the -- Parent's children list. Insert_Subtree_List (First => Subtree, Last => Subtree, Parent => Parent, Before => Before); end Insert_Subtree_Node; -------------- -- Is_Empty -- -------------- function Is_Empty (Container : Tree) return Boolean is begin return Container.Root.Children.First = null; end Is_Empty; ------------- -- Is_Leaf -- ------------- function Is_Leaf (Position : Cursor) return Boolean is begin return (if Position = No_Element then False else Position.Node.Children.First = null); end Is_Leaf; ------------------ -- Is_Reachable -- ------------------ function Is_Reachable (From, To : Tree_Node_Access) return Boolean is pragma Assert (From /= null); pragma Assert (To /= null); N : Tree_Node_Access; begin N := From; while N /= null loop if N = To then return True; end if; N := N.Parent; end loop; return False; end Is_Reachable; ------------- -- Is_Root -- ------------- function Is_Root (Position : Cursor) return Boolean is begin return (if Position.Container = null then False else Position = Root (Position.Container.all)); end Is_Root; ------------- -- Iterate -- ------------- procedure Iterate (Container : Tree; Process : not null access procedure (Position : Cursor)) is Busy : With_Busy (Container.TC'Unrestricted_Access); begin Iterate_Children (Container => Container'Unrestricted_Access, Subtree => Root_Node (Container), Process => Process); end Iterate; function Iterate (Container : Tree) return Tree_Iterator_Interfaces.Forward_Iterator'Class is begin return Iterate_Subtree (Root (Container)); end Iterate; ---------------------- -- Iterate_Children -- ---------------------- procedure Iterate_Children (Parent : Cursor; Process : not null access procedure (Position : Cursor)) is C : Tree_Node_Access; Busy : With_Busy (Parent.Container.TC'Unrestricted_Access); begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; C := Parent.Node.Children.First; while C /= null loop Process (Position => Cursor'(Parent.Container, Node => C)); C := C.Next; end loop; end Iterate_Children; procedure Iterate_Children (Container : Tree_Access; Subtree : Tree_Node_Access; Process : not null access procedure (Position : Cursor)) is Node : Tree_Node_Access; begin -- This is a helper function to recursively iterate over all the nodes -- in a subtree, in depth-first fashion. This particular helper just -- visits the children of this subtree, not the root of the subtree node -- itself. This is useful when starting from the ultimate root of the -- entire tree (see Iterate), as that root does not have an element. Node := Subtree.Children.First; while Node /= null loop Iterate_Subtree (Container, Node, Process); Node := Node.Next; end loop; end Iterate_Children; function Iterate_Children (Container : Tree; Parent : Cursor) return Tree_Iterator_Interfaces.Reversible_Iterator'Class is C : constant Tree_Access := Container'Unrestricted_Access; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= C then raise Program_Error with "Parent cursor not in container"; end if; return It : constant Child_Iterator := (Limited_Controlled with Container => C, Subtree => Parent.Node) do Busy (C.TC); end return; end Iterate_Children; --------------------- -- Iterate_Subtree -- --------------------- function Iterate_Subtree (Position : Cursor) return Tree_Iterator_Interfaces.Forward_Iterator'Class is C : constant Tree_Access := Position.Container; begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; -- Implement Vet for multiway trees??? -- pragma Assert (Vet (Position), "bad subtree cursor"); return It : constant Subtree_Iterator := (Limited_Controlled with Container => C, Subtree => Position.Node) do Busy (C.TC); end return; end Iterate_Subtree; procedure Iterate_Subtree (Position : Cursor; Process : not null access procedure (Position : Cursor)) is Busy : With_Busy (Position.Container.TC'Unrestricted_Access); begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; if Is_Root (Position) then Iterate_Children (Position.Container, Position.Node, Process); else Iterate_Subtree (Position.Container, Position.Node, Process); end if; end Iterate_Subtree; procedure Iterate_Subtree (Container : Tree_Access; Subtree : Tree_Node_Access; Process : not null access procedure (Position : Cursor)) is begin -- This is a helper function to recursively iterate over all the nodes -- in a subtree, in depth-first fashion. It first visits the root of the -- subtree, then visits its children. Process (Cursor'(Container, Subtree)); Iterate_Children (Container, Subtree, Process); end Iterate_Subtree; ---------- -- Last -- ---------- overriding function Last (Object : Child_Iterator) return Cursor is begin return Last_Child (Cursor'(Object.Container, Object.Subtree)); end Last; ---------------- -- Last_Child -- ---------------- function Last_Child (Parent : Cursor) return Cursor is Node : Tree_Node_Access; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; Node := Parent.Node.Children.Last; if Node = null then return No_Element; end if; return (Parent.Container, Node); end Last_Child; ------------------------ -- Last_Child_Element -- ------------------------ function Last_Child_Element (Parent : Cursor) return Element_Type is begin return Element (Last_Child (Parent)); end Last_Child_Element; ---------- -- Move -- ---------- procedure Move (Target : in out Tree; Source : in out Tree) is Node : Tree_Node_Access; begin if Target'Address = Source'Address then return; end if; TC_Check (Source.TC); Target.Clear; -- checks busy bit Target.Root.Children := Source.Root.Children; Source.Root.Children := Children_Type'(others => null); Node := Target.Root.Children.First; while Node /= null loop Node.Parent := Root_Node (Target); Node := Node.Next; end loop; Target.Count := Source.Count; Source.Count := 0; end Move; ---------- -- Next -- ---------- function Next (Object : Subtree_Iterator; Position : Cursor) return Cursor is Node : Tree_Node_Access; begin if Position.Container = null then return No_Element; end if; if Checks and then Position.Container /= Object.Container then raise Program_Error with "Position cursor of Next designates wrong tree"; end if; Node := Position.Node; if Node.Children.First /= null then return Cursor'(Object.Container, Node.Children.First); end if; while Node /= Object.Subtree loop if Node.Next /= null then return Cursor'(Object.Container, Node.Next); end if; Node := Node.Parent; end loop; return No_Element; end Next; function Next (Object : Child_Iterator; Position : Cursor) return Cursor is begin if Position.Container = null then return No_Element; end if; if Checks and then Position.Container /= Object.Container then raise Program_Error with "Position cursor of Next designates wrong tree"; end if; return Next_Sibling (Position); end Next; ------------------ -- Next_Sibling -- ------------------ function Next_Sibling (Position : Cursor) return Cursor is begin if Position = No_Element then return No_Element; end if; if Position.Node.Next = null then return No_Element; end if; return Cursor'(Position.Container, Position.Node.Next); end Next_Sibling; procedure Next_Sibling (Position : in out Cursor) is begin Position := Next_Sibling (Position); end Next_Sibling; ---------------- -- Node_Count -- ---------------- function Node_Count (Container : Tree) return Count_Type is begin -- Container.Count is the number of nodes we have actually allocated. We -- cache the value specifically so this Node_Count operation can execute -- in O(1) time, which makes it behave similarly to how the Length -- selector function behaves for other containers. -- The cached node count value only describes the nodes we have -- allocated; the root node itself is not included in that count. The -- Node_Count operation returns a value that includes the root node -- (because the RM says so), so we must add 1 to our cached value. return 1 + Container.Count; end Node_Count; ------------ -- Parent -- ------------ function Parent (Position : Cursor) return Cursor is begin if Position = No_Element then return No_Element; end if; if Position.Node.Parent = null then return No_Element; end if; return Cursor'(Position.Container, Position.Node.Parent); end Parent; ------------------- -- Prepend_Child -- ------------------- procedure Prepend_Child (Container : in out Tree; Parent : Cursor; New_Item : Element_Type; Count : Count_Type := 1) is First, Last : Tree_Node_Access; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; if Count = 0 then return; end if; TC_Check (Container.TC); First := new Tree_Node_Type'(Parent => Parent.Node, Element => New_Item, others => <>); Last := First; for J in Count_Type'(2) .. Count loop -- Reclaim other nodes if Storage_Error??? Last.Next := new Tree_Node_Type'(Parent => Parent.Node, Prev => Last, Element => New_Item, others => <>); Last := Last.Next; end loop; Insert_Subtree_List (First => First, Last => Last, Parent => Parent.Node, Before => Parent.Node.Children.First); -- In order for operation Node_Count to complete in O(1) time, we cache -- the count value. Here we increment the total count by the number of -- nodes we just inserted. Container.Count := Container.Count + Count; end Prepend_Child; -------------- -- Previous -- -------------- overriding function Previous (Object : Child_Iterator; Position : Cursor) return Cursor is begin if Position.Container = null then return No_Element; end if; if Checks and then Position.Container /= Object.Container then raise Program_Error with "Position cursor of Previous designates wrong tree"; end if; return Previous_Sibling (Position); end Previous; ---------------------- -- Previous_Sibling -- ---------------------- function Previous_Sibling (Position : Cursor) return Cursor is begin return (if Position = No_Element then No_Element elsif Position.Node.Prev = null then No_Element else Cursor'(Position.Container, Position.Node.Prev)); end Previous_Sibling; procedure Previous_Sibling (Position : in out Cursor) is begin Position := Previous_Sibling (Position); end Previous_Sibling; ---------------------- -- Pseudo_Reference -- ---------------------- function Pseudo_Reference (Container : aliased Tree'Class) return Reference_Control_Type is TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access; begin return R : constant Reference_Control_Type := (Controlled with TC) do Lock (TC.all); end return; end Pseudo_Reference; ------------------- -- Query_Element -- ------------------- procedure Query_Element (Position : Cursor; Process : not null access procedure (Element : Element_Type)) is T : Tree renames Position.Container.all'Unrestricted_Access.all; Lock : With_Lock (T.TC'Unrestricted_Access); begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Is_Root (Position) then raise Program_Error with "Position cursor designates root"; end if; Process (Position.Node.Element); end Query_Element; ---------- -- Read -- ---------- procedure Read (Stream : not null access Root_Stream_Type'Class; Container : out Tree) is procedure Read_Children (Subtree : Tree_Node_Access); function Read_Subtree (Parent : Tree_Node_Access) return Tree_Node_Access; Total_Count : Count_Type'Base; -- Value read from the stream that says how many elements follow Read_Count : Count_Type'Base; -- Actual number of elements read from the stream ------------------- -- Read_Children -- ------------------- procedure Read_Children (Subtree : Tree_Node_Access) is pragma Assert (Subtree /= null); pragma Assert (Subtree.Children.First = null); pragma Assert (Subtree.Children.Last = null); Count : Count_Type'Base; -- Number of child subtrees C : Children_Type; begin Count_Type'Read (Stream, Count); if Checks and then Count < 0 then raise Program_Error with "attempt to read from corrupt stream"; end if; if Count = 0 then return; end if; C.First := Read_Subtree (Parent => Subtree); C.Last := C.First; for J in Count_Type'(2) .. Count loop C.Last.Next := Read_Subtree (Parent => Subtree); C.Last.Next.Prev := C.Last; C.Last := C.Last.Next; end loop; -- Now that the allocation and reads have completed successfully, it -- is safe to link the children to their parent. Subtree.Children := C; end Read_Children; ------------------ -- Read_Subtree -- ------------------ function Read_Subtree (Parent : Tree_Node_Access) return Tree_Node_Access is Subtree : constant Tree_Node_Access := new Tree_Node_Type' (Parent => Parent, Element => Element_Type'Input (Stream), others => <>); begin Read_Count := Read_Count + 1; Read_Children (Subtree); return Subtree; end Read_Subtree; -- Start of processing for Read begin Container.Clear; -- checks busy bit Count_Type'Read (Stream, Total_Count); if Checks and then Total_Count < 0 then raise Program_Error with "attempt to read from corrupt stream"; end if; if Total_Count = 0 then return; end if; Read_Count := 0; Read_Children (Root_Node (Container)); if Checks and then Read_Count /= Total_Count then raise Program_Error with "attempt to read from corrupt stream"; end if; Container.Count := Total_Count; end Read; procedure Read (Stream : not null access Root_Stream_Type'Class; Position : out Cursor) is begin raise Program_Error with "attempt to read tree cursor from stream"; end Read; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Read; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Constant_Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Read; --------------- -- Reference -- --------------- function Reference (Container : aliased in out Tree; Position : Cursor) return Reference_Type is begin if Checks and then Position.Container = null then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor designates wrong container"; end if; if Checks and then Position.Node = Root_Node (Container) then raise Program_Error with "Position cursor designates root"; end if; -- Implement Vet for multiway tree??? -- pragma Assert (Vet (Position), -- "Position cursor in Constant_Reference is bad"); declare C : Tree renames Position.Container.all; TC : constant Tamper_Counts_Access := C.TC'Unrestricted_Access; begin return R : constant Reference_Type := (Element => Position.Node.Element'Access, Control => (Controlled with TC)) do Lock (TC.all); end return; end; end Reference; -------------------- -- Remove_Subtree -- -------------------- procedure Remove_Subtree (Subtree : Tree_Node_Access) is C : Children_Type renames Subtree.Parent.Children; begin -- This is a utility operation to remove a subtree node from its -- parent's list of children. if C.First = Subtree then pragma Assert (Subtree.Prev = null); if C.Last = Subtree then pragma Assert (Subtree.Next = null); C.First := null; C.Last := null; else C.First := Subtree.Next; C.First.Prev := null; end if; elsif C.Last = Subtree then pragma Assert (Subtree.Next = null); C.Last := Subtree.Prev; C.Last.Next := null; else Subtree.Prev.Next := Subtree.Next; Subtree.Next.Prev := Subtree.Prev; end if; end Remove_Subtree; ---------------------- -- Replace_Element -- ---------------------- procedure Replace_Element (Container : in out Tree; Position : Cursor; New_Item : Element_Type) is begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor not in container"; end if; if Checks and then Is_Root (Position) then raise Program_Error with "Position cursor designates root"; end if; TE_Check (Container.TC); Position.Node.Element := New_Item; end Replace_Element; ------------------------------ -- Reverse_Iterate_Children -- ------------------------------ procedure Reverse_Iterate_Children (Parent : Cursor; Process : not null access procedure (Position : Cursor)) is C : Tree_Node_Access; Busy : With_Busy (Parent.Container.TC'Unrestricted_Access); begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; C := Parent.Node.Children.Last; while C /= null loop Process (Position => Cursor'(Parent.Container, Node => C)); C := C.Prev; end loop; end Reverse_Iterate_Children; ---------- -- Root -- ---------- function Root (Container : Tree) return Cursor is begin return (Container'Unrestricted_Access, Root_Node (Container)); end Root; --------------- -- Root_Node -- --------------- function Root_Node (Container : Tree) return Tree_Node_Access is type Root_Node_Access is access all Root_Node_Type; for Root_Node_Access'Storage_Size use 0; pragma Convention (C, Root_Node_Access); function To_Tree_Node_Access is new Ada.Unchecked_Conversion (Root_Node_Access, Tree_Node_Access); -- Start of processing for Root_Node begin -- This is a utility function for converting from an access type that -- designates the distinguished root node to an access type designating -- a non-root node. The representation of a root node does not have an -- element, but is otherwise identical to a non-root node, so the -- conversion itself is safe. return To_Tree_Node_Access (Container.Root'Unrestricted_Access); end Root_Node; --------------------- -- Splice_Children -- --------------------- procedure Splice_Children (Target : in out Tree; Target_Parent : Cursor; Before : Cursor; Source : in out Tree; Source_Parent : Cursor) is Count : Count_Type; begin if Checks and then Target_Parent = No_Element then raise Constraint_Error with "Target_Parent cursor has no element"; end if; if Checks and then Target_Parent.Container /= Target'Unrestricted_Access then raise Program_Error with "Target_Parent cursor not in Target container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Target'Unrestricted_Access then raise Program_Error with "Before cursor not in Target container"; end if; if Checks and then Before.Node.Parent /= Target_Parent.Node then raise Constraint_Error with "Before cursor not child of Target_Parent"; end if; end if; if Checks and then Source_Parent = No_Element then raise Constraint_Error with "Source_Parent cursor has no element"; end if; if Checks and then Source_Parent.Container /= Source'Unrestricted_Access then raise Program_Error with "Source_Parent cursor not in Source container"; end if; if Target'Address = Source'Address then if Target_Parent = Source_Parent then return; end if; TC_Check (Target.TC); if Checks and then Is_Reachable (From => Target_Parent.Node, To => Source_Parent.Node) then raise Constraint_Error with "Source_Parent is ancestor of Target_Parent"; end if; Splice_Children (Target_Parent => Target_Parent.Node, Before => Before.Node, Source_Parent => Source_Parent.Node); return; end if; TC_Check (Target.TC); TC_Check (Source.TC); -- We cache the count of the nodes we have allocated, so that operation -- Node_Count can execute in O(1) time. But that means we must count the -- nodes in the subtree we remove from Source and insert into Target, in -- order to keep the count accurate. Count := Subtree_Node_Count (Source_Parent.Node); pragma Assert (Count >= 1); Count := Count - 1; -- because Source_Parent node does not move Splice_Children (Target_Parent => Target_Parent.Node, Before => Before.Node, Source_Parent => Source_Parent.Node); Source.Count := Source.Count - Count; Target.Count := Target.Count + Count; end Splice_Children; procedure Splice_Children (Container : in out Tree; Target_Parent : Cursor; Before : Cursor; Source_Parent : Cursor) is begin if Checks and then Target_Parent = No_Element then raise Constraint_Error with "Target_Parent cursor has no element"; end if; if Checks and then Target_Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Target_Parent cursor not in container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Container'Unrestricted_Access then raise Program_Error with "Before cursor not in container"; end if; if Checks and then Before.Node.Parent /= Target_Parent.Node then raise Constraint_Error with "Before cursor not child of Target_Parent"; end if; end if; if Checks and then Source_Parent = No_Element then raise Constraint_Error with "Source_Parent cursor has no element"; end if; if Checks and then Source_Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Source_Parent cursor not in container"; end if; if Target_Parent = Source_Parent then return; end if; TC_Check (Container.TC); if Checks and then Is_Reachable (From => Target_Parent.Node, To => Source_Parent.Node) then raise Constraint_Error with "Source_Parent is ancestor of Target_Parent"; end if; Splice_Children (Target_Parent => Target_Parent.Node, Before => Before.Node, Source_Parent => Source_Parent.Node); end Splice_Children; procedure Splice_Children (Target_Parent : Tree_Node_Access; Before : Tree_Node_Access; Source_Parent : Tree_Node_Access) is CC : constant Children_Type := Source_Parent.Children; C : Tree_Node_Access; begin -- This is a utility operation to remove the children from -- Source parent and insert them into Target parent. Source_Parent.Children := Children_Type'(others => null); -- Fix up the Parent pointers of each child to designate -- its new Target parent. C := CC.First; while C /= null loop C.Parent := Target_Parent; C := C.Next; end loop; Insert_Subtree_List (First => CC.First, Last => CC.Last, Parent => Target_Parent, Before => Before); end Splice_Children; -------------------- -- Splice_Subtree -- -------------------- procedure Splice_Subtree (Target : in out Tree; Parent : Cursor; Before : Cursor; Source : in out Tree; Position : in out Cursor) is Subtree_Count : Count_Type; begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Target'Unrestricted_Access then raise Program_Error with "Parent cursor not in Target container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Target'Unrestricted_Access then raise Program_Error with "Before cursor not in Target container"; end if; if Checks and then Before.Node.Parent /= Parent.Node then raise Constraint_Error with "Before cursor not child of Parent"; end if; end if; if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Source'Unrestricted_Access then raise Program_Error with "Position cursor not in Source container"; end if; if Checks and then Is_Root (Position) then raise Program_Error with "Position cursor designates root"; end if; if Target'Address = Source'Address then if Position.Node.Parent = Parent.Node then if Position.Node = Before.Node then return; end if; if Position.Node.Next = Before.Node then return; end if; end if; TC_Check (Target.TC); if Checks and then Is_Reachable (From => Parent.Node, To => Position.Node) then raise Constraint_Error with "Position is ancestor of Parent"; end if; Remove_Subtree (Position.Node); Position.Node.Parent := Parent.Node; Insert_Subtree_Node (Position.Node, Parent.Node, Before.Node); return; end if; TC_Check (Target.TC); TC_Check (Source.TC); -- This is an unfortunate feature of this API: we must count the nodes -- in the subtree that we remove from the source tree, which is an O(n) -- operation. It would have been better if the Tree container did not -- have a Node_Count selector; a user that wants the number of nodes in -- the tree could simply call Subtree_Node_Count, with the understanding -- that such an operation is O(n). -- Of course, we could choose to implement the Node_Count selector as an -- O(n) operation, which would turn this splice operation into an O(1) -- operation. ??? Subtree_Count := Subtree_Node_Count (Position.Node); pragma Assert (Subtree_Count <= Source.Count); Remove_Subtree (Position.Node); Source.Count := Source.Count - Subtree_Count; Position.Node.Parent := Parent.Node; Insert_Subtree_Node (Position.Node, Parent.Node, Before.Node); Target.Count := Target.Count + Subtree_Count; Position.Container := Target'Unrestricted_Access; end Splice_Subtree; procedure Splice_Subtree (Container : in out Tree; Parent : Cursor; Before : Cursor; Position : Cursor) is begin if Checks and then Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; end if; if Checks and then Parent.Container /= Container'Unrestricted_Access then raise Program_Error with "Parent cursor not in container"; end if; if Before /= No_Element then if Checks and then Before.Container /= Container'Unrestricted_Access then raise Program_Error with "Before cursor not in container"; end if; if Checks and then Before.Node.Parent /= Parent.Node then raise Constraint_Error with "Before cursor not child of Parent"; end if; end if; if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor not in container"; end if; if Checks and then Is_Root (Position) then -- Should this be PE instead? Need ARG confirmation. ??? raise Constraint_Error with "Position cursor designates root"; end if; if Position.Node.Parent = Parent.Node then if Position.Node = Before.Node then return; end if; if Position.Node.Next = Before.Node then return; end if; end if; TC_Check (Container.TC); if Checks and then Is_Reachable (From => Parent.Node, To => Position.Node) then raise Constraint_Error with "Position is ancestor of Parent"; end if; Remove_Subtree (Position.Node); Position.Node.Parent := Parent.Node; Insert_Subtree_Node (Position.Node, Parent.Node, Before.Node); end Splice_Subtree; ------------------------ -- Subtree_Node_Count -- ------------------------ function Subtree_Node_Count (Position : Cursor) return Count_Type is begin if Position = No_Element then return 0; end if; return Subtree_Node_Count (Position.Node); end Subtree_Node_Count; function Subtree_Node_Count (Subtree : Tree_Node_Access) return Count_Type is Result : Count_Type; Node : Tree_Node_Access; begin Result := 1; Node := Subtree.Children.First; while Node /= null loop Result := Result + Subtree_Node_Count (Node); Node := Node.Next; end loop; return Result; end Subtree_Node_Count; ---------- -- Swap -- ---------- procedure Swap (Container : in out Tree; I, J : Cursor) is begin if Checks and then I = No_Element then raise Constraint_Error with "I cursor has no element"; end if; if Checks and then I.Container /= Container'Unrestricted_Access then raise Program_Error with "I cursor not in container"; end if; if Checks and then Is_Root (I) then raise Program_Error with "I cursor designates root"; end if; if I = J then -- make this test sooner??? return; end if; if Checks and then J = No_Element then raise Constraint_Error with "J cursor has no element"; end if; if Checks and then J.Container /= Container'Unrestricted_Access then raise Program_Error with "J cursor not in container"; end if; if Checks and then Is_Root (J) then raise Program_Error with "J cursor designates root"; end if; TE_Check (Container.TC); declare EI : constant Element_Type := I.Node.Element; begin I.Node.Element := J.Node.Element; J.Node.Element := EI; end; end Swap; -------------------- -- Update_Element -- -------------------- procedure Update_Element (Container : in out Tree; Position : Cursor; Process : not null access procedure (Element : in out Element_Type)) is T : Tree renames Position.Container.all'Unrestricted_Access.all; Lock : With_Lock (T.TC'Unrestricted_Access); begin if Checks and then Position = No_Element then raise Constraint_Error with "Position cursor has no element"; end if; if Checks and then Position.Container /= Container'Unrestricted_Access then raise Program_Error with "Position cursor not in container"; end if; if Checks and then Is_Root (Position) then raise Program_Error with "Position cursor designates root"; end if; Process (Position.Node.Element); end Update_Element; ----------- -- Write -- ----------- procedure Write (Stream : not null access Root_Stream_Type'Class; Container : Tree) is procedure Write_Children (Subtree : Tree_Node_Access); procedure Write_Subtree (Subtree : Tree_Node_Access); -------------------- -- Write_Children -- -------------------- procedure Write_Children (Subtree : Tree_Node_Access) is CC : Children_Type renames Subtree.Children; C : Tree_Node_Access; begin Count_Type'Write (Stream, Child_Count (CC)); C := CC.First; while C /= null loop Write_Subtree (C); C := C.Next; end loop; end Write_Children; ------------------- -- Write_Subtree -- ------------------- procedure Write_Subtree (Subtree : Tree_Node_Access) is begin Element_Type'Output (Stream, Subtree.Element); Write_Children (Subtree); end Write_Subtree; -- Start of processing for Write begin Count_Type'Write (Stream, Container.Count); if Container.Count = 0 then return; end if; Write_Children (Root_Node (Container)); end Write; procedure Write (Stream : not null access Root_Stream_Type'Class; Position : Cursor) is begin raise Program_Error with "attempt to write tree cursor to stream"; end Write; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Write; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Constant_Reference_Type) is begin raise Program_Error with "attempt to stream reference"; end Write; end Ada.Containers.Multiway_Trees;
28.675009
79
0.5919
41663140ad681f9b10b23ac43e15f4df91381915
3,692
ads
Ada
tools/scitools/conf/understand/ada/ada05/a-wtdeau.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/ada05/a-wtdeau.ads
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
null
null
null
tools/scitools/conf/understand/ada/ada05/a-wtdeau.ads
brucegua/moocos
575c161cfa35e220f10d042e2e5ca18773691695
[ "Apache-2.0" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . W I D E _ T E X T _ I O . D E C I M A L _ A U X -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2006, 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 2, 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. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- -- -- -- -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package contains the routines for Ada.Wide_Text_IO.Decimal_IO -- that are shared among separate instantiations of this package. The -- routines in the package are identical semantically to those declared -- in Wide_Text_IO, except that default values have been supplied by the -- generic, and the Num parameter has been replaced by Integer or -- Long_Long_Integer, with an additional Scale parameter giving the -- value of Num'Scale. In addition the Get routines return the value -- rather than store it in an Out parameter. private package Ada.Wide_Text_IO.Decimal_Aux is function Get_Dec (File : File_Type; Width : Field; Scale : Integer) return Integer; function Get_LLD (File : File_Type; Width : Field; Scale : Integer) return Long_Long_Integer; function Gets_Dec (From : String; Last : access Positive; Scale : Integer) return Integer; function Gets_LLD (From : String; Last : access Positive; Scale : Integer) return Long_Long_Integer; procedure Put_Dec (File : File_Type; Item : Integer; Fore : Field; Aft : Field; Exp : Field; Scale : Integer); procedure Put_LLD (File : File_Type; Item : Long_Long_Integer; Fore : Field; Aft : Field; Exp : Field; Scale : Integer); procedure Puts_Dec (To : out String; Item : Integer; Aft : Field; Exp : Field; Scale : Integer); procedure Puts_LLD (To : out String; Item : Long_Long_Integer; Aft : Field; Exp : Field; Scale : Integer); end Ada.Wide_Text_IO.Decimal_Aux;
38.458333
78
0.493229
06ddcfd8f0d5c31a913a784fab08848fddb9062b
4,554
adb
Ada
src/Projects/eu_projects-nodes-action_nodes.adb
fintatarta/eugen
2c384838ff0e81b51172310ce5d0e47d71ffd4fd
[ "MIT" ]
null
null
null
src/Projects/eu_projects-nodes-action_nodes.adb
fintatarta/eugen
2c384838ff0e81b51172310ce5d0e47d71ffd4fd
[ "MIT" ]
null
null
null
src/Projects/eu_projects-nodes-action_nodes.adb
fintatarta/eugen
2c384838ff0e81b51172310ce5d0e47d71ffd4fd
[ "MIT" ]
null
null
null
-- with Symbolic_Identifiers; package body EU_Projects.Nodes.Action_Nodes is use Times.Time_Expressions; function Var_Begin (Item : Action_Node) return Symbolic_Instant is (Variable (Join (Dotted_Identifier (Item.Label), Event_Names.Begin_Name))); function Var_End (Item : Action_Node) return Symbolic_Instant is (Variable (Join (Dotted_Identifier (Item.Label), Event_Names.End_Name))); function Var_Duration (Item : Action_Node) return Symbolic_Duration is (Variable (Join (Dotted_Identifier (Item.Label), Event_Names.Duration_Name))); ---------------- -- Efforts_Of -- ---------------- function Efforts_Of (Item : Action_Node; Names : Partners.Partner_Name_Array) return Effort_List is Result : Effort_List (Names'Range); begin for Idx in Names'Range loop Result (Idx) := Effort_Entry'(Partner => Names (Idx), Effort => Item.Partner_Effort(Names(Idx))); end loop; return Result; end Efforts_Of; --------------------------- -- Parse_Raw_Expressions -- --------------------------- overriding procedure Parse_Raw_Expressions (Item : in out Action_Node; Vars : Times.Time_Expressions.Parsing.Symbol_Table) is use Times.Time_Expressions.Parsing; begin Item.Start_Symbolic := Parse (To_String (Item.Raw_Time.Start), Vars); if Item.Raw_Time.Stop = Null_Unbounded_String then Item.Stop_Symbolic := Item.Var_Begin + Item.Var_Duration; Item.Duration_Symbolic := Parse (To_String (Item.Raw_Time.Duration), Vars); else Item.Stop_Symbolic := Parse (To_String (Item.Raw_Time.Stop), Vars); Item.Duration_Symbolic := Item.Var_End - Item.Var_Begin; end if; end Parse_Raw_Expressions; ----------------- -- Fix_Instant -- ----------------- overriding procedure Fix_Instant (Item : in out Action_Node; Var : Simple_Identifier; Value : Times.Instant) is use Times; begin if Var = Event_Names.Begin_Name then Item.Start_At := Value; Item.Start_Fixed := True; elsif Var = Event_Names.End_Name then Item.Stop_At := Value; Item.Stop_Fixed := True; else raise Unknown_Instant_Var with To_String (Var); end if; if Item.Stop_Fixed and Item.Start_Fixed then Item.Elapsed_Time := Item.Stop_At - Item.Start_At; end if; end Fix_Instant; ----------- -- After -- ----------- function After (List : Node_Label_Lists.Vector) return Instant_Raw is use type Ada.Containers.Count_Type; ------------ -- End_Of -- ------------ function End_Of (X : Node_Label) return String is (To_String (Join (Dotted_Identifier (X), Event_Names.End_Name))); begin if List.Length = 0 then raise Constraint_Error; elsif List.Length = 1 then return Instant_Raw (End_Of (List.First_Element)); else declare Tmp : Unbounded_String := To_Unbounded_String ("max("); begin for K in List.First_Index .. List.Last_Index loop Tmp := Tmp & End_Of (List (K)); if K < List.Last_Index then Tmp := Tmp & ","; else Tmp := Tmp & ")"; end if; end loop; return Instant_Raw (To_String (Tmp)); end; end if; end After; ---------------- -- Add_Effort -- ---------------- procedure Add_Effort (Item : in out Action_Node; Partner : in Nodes.Partners.Partner_Label; PM : in Efforts.Person_Months) is use type Efforts.Person_Months; begin if not Item.Partner_Effort.Contains (Partner) then raise Unknown_Partner; end if; if Item.Partner_Effort (Partner) /= 0 then raise Duplicated_Effort; end if; Item.Partner_Effort (Partner) := PM; end Add_Effort; ------------------------ -- Initialize_Efforts -- ------------------------ procedure Initialize_Efforts (Item : in out Action_Node; Node_Dir : Node_Tables.Node_Table) is begin for Lab of Node_Dir.Labels_Of (Partner_Node) loop Item.Partner_Effort.Insert (Key => Partners.Partner_Label (Lab), New_Item => 0); end loop; end Initialize_Efforts; end EU_Projects.Nodes.Action_Nodes;
28.111111
84
0.578173
319ed978f02144a26d2710e7e877bc02dfe5583f
3,039
ads
Ada
gcc-gcc-7_3_0-release/gcc/ada/s-spsufi.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/ada/s-spsufi.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/ada/s-spsufi.ads
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- SYSTEM.STORAGE_POOLS.SUBPOOLS.FINALIZATION -- -- -- -- S p e c -- -- -- -- Copyright (C) 2011-2015, 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. -- -- -- ------------------------------------------------------------------------------ pragma Compiler_Unit_Warning; package System.Storage_Pools.Subpools.Finalization is -- The pragma is needed because package System.Storage_Pools.Subpools which -- is already preelaborated now depends on this unit. pragma Preelaborate; procedure Finalize_And_Deallocate (Subpool : in out Subpool_Handle); -- This routine performs the following actions: -- 1) Finalize all objects chained on the subpool's master -- 2) Remove the subpool from the owner's list of subpools -- 3) Deallocate the doubly linked list node associated with the subpool -- 4) Call Deallocate_Subpool end System.Storage_Pools.Subpools.Finalization;
62.020408
79
0.459691
3d1b488464ec07905461b58245860a8485978963
3,031
ada
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c5/c55b11b.ada
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/ada/acats/tests/c5/c55b11b.ada
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c5/c55b11b.ada
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
-- C55B11B.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 THE FORM 'FOR I IN ST RANGE L .. R LOOP' IS ACCEPTED -- EVEN IF BOTH L AND R ARE OVERLOADED ENUMERATION LITERALS (SO -- THAT L .. R WOULD BE ILLEGAL WITHOUT ST RANGE). -- HISTORY: -- DHH 09/07/88 CREATED ORIGINAL TEST. WITH REPORT; USE REPORT; PROCEDURE C55B11B IS TYPE ST IS (A, B, C, D, E, F, G, H); TYPE SI IS (A, B, C, D, F, E, G, H); GLOBAL : INTEGER := 0; PROCEDURE CHECK_VAR(T : ST) IS BEGIN GLOBAL := GLOBAL + 1; CASE T IS WHEN D => IF GLOBAL /= IDENT_INT(1) THEN FAILED("1 WRONG VALUE"); END IF; WHEN E => IF GLOBAL /= IDENT_INT(2) THEN FAILED("2 WRONG VALUE"); END IF; WHEN F => IF GLOBAL /= IDENT_INT(3) THEN FAILED("3 WRONG VALUE"); END IF; WHEN G => IF GLOBAL /= IDENT_INT(4) THEN FAILED("4 WRONG VALUE"); END IF; WHEN OTHERS => FAILED("WRONG VALUE TO PROCEDURE"); END CASE; END CHECK_VAR; PROCEDURE CHECK_VAR(T : SI) IS BEGIN FAILED("WRONG PROCEDURE CALLED"); END CHECK_VAR; BEGIN TEST ("C55B11B", "CHECK THAT THE 'FORM FOR I IN ST RANGE L .. R " & "LOOP' IS ACCEPTED EVEN IF BOTH L AND R ARE " & "OVERLOADED ENUMERATION LITERALS (SO THAT L .. " & "R WOULD BE ILLEGAL WITHOUT ST RANGE)"); FOR I IN ST RANGE D .. G LOOP CHECK_VAR(I); END LOOP; RESULT; END C55B11B;
34.83908
79
0.550973
577a8db5a39ef255ca737b13353d73110544e6ab
6,246
adb
Ada
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-pack17.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-pack17.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-pack17.adb
orb-zhuchen/Orb
6da2404b949ac28bde786e08bf4debe4a27cd3a0
[ "CNRI-Python-GPL-Compatible", "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . P A C K _ 1 7 -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2019, 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 System.Storage_Elements; with System.Unsigned_Types; package body System.Pack_17 is subtype Bit_Order is System.Bit_Order; Reverse_Bit_Order : constant Bit_Order := Bit_Order'Val (1 - Bit_Order'Pos (System.Default_Bit_Order)); subtype Ofs is System.Storage_Elements.Storage_Offset; subtype Uns is System.Unsigned_Types.Unsigned; subtype N07 is System.Unsigned_Types.Unsigned range 0 .. 7; use type System.Storage_Elements.Storage_Offset; use type System.Unsigned_Types.Unsigned; type Cluster is record E0, E1, E2, E3, E4, E5, E6, E7 : Bits_17; end record; for Cluster use record E0 at 0 range 0 * Bits .. 0 * Bits + Bits - 1; E1 at 0 range 1 * Bits .. 1 * Bits + Bits - 1; E2 at 0 range 2 * Bits .. 2 * Bits + Bits - 1; E3 at 0 range 3 * Bits .. 3 * Bits + Bits - 1; E4 at 0 range 4 * Bits .. 4 * Bits + Bits - 1; E5 at 0 range 5 * Bits .. 5 * Bits + Bits - 1; E6 at 0 range 6 * Bits .. 6 * Bits + Bits - 1; E7 at 0 range 7 * Bits .. 7 * Bits + Bits - 1; end record; for Cluster'Size use Bits * 8; for Cluster'Alignment use Integer'Min (Standard'Maximum_Alignment, 1 + 1 * Boolean'Pos (Bits mod 2 = 0) + 2 * Boolean'Pos (Bits mod 4 = 0)); -- Use maximum possible alignment, given the bit field size, since this -- will result in the most efficient code possible for the field. type Cluster_Ref is access Cluster; type Rev_Cluster is new Cluster with Bit_Order => Reverse_Bit_Order, Scalar_Storage_Order => Reverse_Bit_Order; type Rev_Cluster_Ref is access Rev_Cluster; ------------ -- Get_17 -- ------------ function Get_17 (Arr : System.Address; N : Natural; Rev_SSO : Boolean) return Bits_17 is A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8); C : Cluster_Ref with Address => A'Address, Import; RC : Rev_Cluster_Ref with Address => A'Address, Import; begin if Rev_SSO then case N07 (Uns (N) mod 8) is when 0 => return RC.E0; when 1 => return RC.E1; when 2 => return RC.E2; when 3 => return RC.E3; when 4 => return RC.E4; when 5 => return RC.E5; when 6 => return RC.E6; when 7 => return RC.E7; end case; else case N07 (Uns (N) mod 8) is when 0 => return C.E0; when 1 => return C.E1; when 2 => return C.E2; when 3 => return C.E3; when 4 => return C.E4; when 5 => return C.E5; when 6 => return C.E6; when 7 => return C.E7; end case; end if; end Get_17; ------------ -- Set_17 -- ------------ procedure Set_17 (Arr : System.Address; N : Natural; E : Bits_17; Rev_SSO : Boolean) is A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8); C : Cluster_Ref with Address => A'Address, Import; RC : Rev_Cluster_Ref with Address => A'Address, Import; begin if Rev_SSO then case N07 (Uns (N) mod 8) is when 0 => RC.E0 := E; when 1 => RC.E1 := E; when 2 => RC.E2 := E; when 3 => RC.E3 := E; when 4 => RC.E4 := E; when 5 => RC.E5 := E; when 6 => RC.E6 := E; when 7 => RC.E7 := E; end case; else case N07 (Uns (N) mod 8) is when 0 => C.E0 := E; when 1 => C.E1 := E; when 2 => C.E2 := E; when 3 => C.E3 := E; when 4 => C.E4 := E; when 5 => C.E5 := E; when 6 => C.E6 := E; when 7 => C.E7 := E; end case; end if; end Set_17; end System.Pack_17;
39.531646
78
0.460775
597781cd4c3fae9060f68e87abf6db866d8112f7
9,172
ads
Ada
src/sys/processes/util-processes.ads
yrashk/ada-util
2aaa1d87e92a7137e1c63dce90f0722c549dfafd
[ "Apache-2.0" ]
null
null
null
src/sys/processes/util-processes.ads
yrashk/ada-util
2aaa1d87e92a7137e1c63dce90f0722c549dfafd
[ "Apache-2.0" ]
null
null
null
src/sys/processes/util-processes.ads
yrashk/ada-util
2aaa1d87e92a7137e1c63dce90f0722c549dfafd
[ "Apache-2.0" ]
null
null
null
----------------------------------------------------------------------- -- util-processes -- Process creation and control -- Copyright (C) 2011, 2012, 2016, 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- 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.Streams; with Util.Systems.Types; with Ada.Finalization; with Ada.Strings.Unbounded; package Util.Processes is Invalid_State : exception; Process_Error : exception; -- The optional process pipes: -- <dl> -- <dt>NONE</dt> -- <dd>the process will inherit the standard input, output and error.</dd> -- <dt>READ</dt> -- <dd>a pipe is created to read the process standard output.</dd> -- <dt>READ_ERROR</dt> -- <dd>a pipe is created to read the process standard error. The output and input are -- inherited.</dd> -- <dt>READ_ALL</dt> -- <dd>similar to READ the same pipe is used for the process standard error.</dd> -- <dt>WRITE</dt> -- <dd>a pipe is created to write on the process standard input.</dd> -- <dt>READ_WRITE</dt> -- <dd>Combines the <b>READ</b> and <b>WRITE</b> modes.</dd> -- <dt>READ_WRITE_ALL</dt> -- <dd>Combines the <b>READ_ALL</b> and <b>WRITE</b> modes.</dd> -- </dl> type Pipe_Mode is (NONE, READ, READ_ERROR, READ_ALL, WRITE, READ_WRITE, READ_WRITE_ALL); subtype String_Access is Ada.Strings.Unbounded.String_Access; subtype File_Type is Util.Systems.Types.File_Type; type Argument_List is array (Positive range <>) of String_Access; type Process_Identifier is new Integer; -- ------------------------------ -- Process -- ------------------------------ type Process is limited private; -- Before launching the process, redirect the input stream of the process -- to the specified file. -- Raises <b>Invalid_State</b> if the process is running. procedure Set_Input_Stream (Proc : in out Process; File : in String); -- Set the output stream of the process. -- Raises <b>Invalid_State</b> if the process is running. procedure Set_Output_Stream (Proc : in out Process; File : in String; Append : in Boolean := False); -- Set the error stream of the process. -- Raises <b>Invalid_State</b> if the process is running. procedure Set_Error_Stream (Proc : in out Process; File : in String; Append : in Boolean := False); -- Set the working directory that the process will use once it is created. -- The directory must exist or the <b>Invalid_Directory</b> exception will be raised. procedure Set_Working_Directory (Proc : in out Process; Path : in String); -- Set the shell executable path to use to launch a command. The default on Unix is -- the /bin/sh command. Argument splitting is done by the /bin/sh -c command. -- When setting an empty shell command, the argument splitting is done by the -- <tt>Spawn</tt> procedure. procedure Set_Shell (Proc : in out Process; Shell : in String); -- Closes the given file descriptor in the child process before executing the command. procedure Add_Close (Proc : in out Process; Fd : in File_Type); -- Append the argument to the current process argument list. -- Raises <b>Invalid_State</b> if the process is running. procedure Append_Argument (Proc : in out Process; Arg : in String); -- Spawn a new process with the given command and its arguments. The standard input, output -- and error streams are either redirected to a file or to a stream object. procedure Spawn (Proc : in out Process; Command : in String; Arguments : in Argument_List); procedure Spawn (Proc : in out Process; Command : in String; Mode : in Pipe_Mode := NONE); -- Wait for the process to terminate. procedure Wait (Proc : in out Process); -- Terminate the process by sending a signal on Unix and exiting the process on Windows. -- This operation is not portable and has a different behavior between Unix and Windows. -- Its intent is to stop the process. procedure Stop (Proc : in out Process; Signal : in Positive := 15); -- Get the process exit status. function Get_Exit_Status (Proc : in Process) return Integer; -- Get the process identifier. function Get_Pid (Proc : in Process) return Process_Identifier; -- Returns True if the process is running. function Is_Running (Proc : in Process) return Boolean; -- Get the process input stream allowing to write on the process standard input. function Get_Input_Stream (Proc : in Process) return Util.Streams.Output_Stream_Access; -- Get the process output stream allowing to read the process standard output. function Get_Output_Stream (Proc : in Process) return Util.Streams.Input_Stream_Access; -- Get the process error stream allowing to read the process standard output. function Get_Error_Stream (Proc : in Process) return Util.Streams.Input_Stream_Access; private type File_Type_Array is array (Positive range <>) of File_Type; type File_Type_Array_Access is access all File_Type_Array; -- The <b>System_Process</b> interface is specific to the system. On Unix, it holds the -- process identifier. On Windows, more information is necessary, including the process -- and thread handles. It's a little bit overkill to setup an interface for this but -- it looks cleaner than having specific system fields here. type System_Process is limited interface; type System_Process_Access is access all System_Process'Class; type Process is new Ada.Finalization.Limited_Controlled with record Pid : Process_Identifier := -1; Sys : System_Process_Access := null; Exit_Value : Integer := -1; Dir : Ada.Strings.Unbounded.Unbounded_String; In_File : Ada.Strings.Unbounded.Unbounded_String; Out_File : Ada.Strings.Unbounded.Unbounded_String; Err_File : Ada.Strings.Unbounded.Unbounded_String; Shell : Ada.Strings.Unbounded.Unbounded_String; Out_Append : Boolean := False; Err_Append : Boolean := False; Output : Util.Streams.Input_Stream_Access := null; Input : Util.Streams.Output_Stream_Access := null; Error : Util.Streams.Input_Stream_Access := null; To_Close : File_Type_Array_Access; end record; -- Initialize the process instance. overriding procedure Initialize (Proc : in out Process); -- Deletes the process instance. overriding procedure Finalize (Proc : in out Process); -- Wait for the process to exit. procedure Wait (Sys : in out System_Process; Proc : in out Process'Class; Timeout : in Duration) is abstract; -- Terminate the process by sending a signal on Unix and exiting the process on Windows. -- This operation is not portable and has a different behavior between Unix and Windows. -- Its intent is to stop the process. procedure Stop (Sys : in out System_Process; Proc : in out Process'Class; Signal : in Positive := 15) is abstract; -- Spawn a new process. procedure Spawn (Sys : in out System_Process; Proc : in out Process'Class; Mode : in Pipe_Mode := NONE) is abstract; -- Append the argument to the process argument list. procedure Append_Argument (Sys : in out System_Process; Arg : in String) is abstract; -- Set the process input, output and error streams to redirect and use specified files. procedure Set_Streams (Sys : in out System_Process; Input : in String; Output : in String; Error : in String; Append_Output : in Boolean; Append_Error : in Boolean; To_Close : in File_Type_Array_Access) is abstract; -- Deletes the storage held by the system process. procedure Finalize (Sys : in out System_Process) is abstract; end Util.Processes;
43.67619
96
0.631596
3d7c5b569e9d91b67ccf67d469c40f010e969d50
3,808
adb
Ada
Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.adb
mvaisakh/android_external_libncurses
d44c8a16d7f1ed276d0de0b3f6f1a5596c5f556f
[ "DOC", "Unlicense" ]
35
2015-03-07T13:26:22.000Z
2021-11-06T16:18:59.000Z
Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.adb
mvaisakh/android_external_libncurses
d44c8a16d7f1ed276d0de0b3f6f1a5596c5f556f
[ "DOC", "Unlicense" ]
3
2017-04-07T21:02:48.000Z
2017-04-08T17:59:35.000Z
Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.adb
mvaisakh/android_external_libncurses
d44c8a16d7f1ed276d0de0b3f6f1a5596c5f556f
[ "DOC", "Unlicense" ]
19
2015-06-16T06:13:44.000Z
2021-07-24T02:37:45.000Z
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding -- -- -- -- Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 1998,2008 Free Software Foundation, Inc. -- -- -- -- 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, distribute with modifications, 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 ABOVE 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. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control: -- $Revision: 1.9 $ -- $Date: 2008/07/26 18:49:47 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; package body Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address is procedure Set_Field_Type (Fld : in Field; Typ : in Internet_V4_Address_Field) is C_IPV4_Field_Type : C_Field_Type; pragma Import (C, C_IPV4_Field_Type, "TYPE_IPV4"); function Set_Fld_Type (F : Field := Fld; Cft : C_Field_Type := C_IPV4_Field_Type) return C_Int; pragma Import (C, Set_Fld_Type, "set_field_type"); Res : Eti_Error; begin Res := Set_Fld_Type; if Res /= E_Ok then Eti_Exception (Res); end if; Wrap_Builtin (Fld, Typ); end Set_Field_Type; end Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address;
56.835821
78
0.461397
571506e5e31cbc3a29827f6455a77494b7da3e62
3,839
ads
Ada
source/amf/ocl/amf-ocl-invalid_literal_exps.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
24
2016-11-29T06:59:41.000Z
2021-08-30T11:55:16.000Z
source/amf/ocl/amf-ocl-invalid_literal_exps.ads
svn2github/matreshka
9d222b3ad9da508855fb1f5adbe5e8a4fad4c530
[ "BSD-3-Clause" ]
2
2019-01-16T05:15:20.000Z
2019-02-03T10:03:32.000Z
source/amf/ocl/amf-ocl-invalid_literal_exps.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 © 2012-2013, Vadim Godunko <[email protected]> -- -- 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 AMF.OCL.Literal_Exps; package AMF.OCL.Invalid_Literal_Exps is pragma Preelaborate; type OCL_Invalid_Literal_Exp is limited interface and AMF.OCL.Literal_Exps.OCL_Literal_Exp; type OCL_Invalid_Literal_Exp_Access is access all OCL_Invalid_Literal_Exp'Class; for OCL_Invalid_Literal_Exp_Access'Storage_Size use 0; end AMF.OCL.Invalid_Literal_Exps;
63.983333
78
0.425892
310c2859d43036e8e182b0a0d0c09f3e8000cdfe
7,056
adb
Ada
src/Backup/dsp-generic_functions.adb
fintatarta/generic-dsp
cc948cc5c146d2e19b1d0194d21d1e8b7806d735
[ "MIT" ]
null
null
null
src/Backup/dsp-generic_functions.adb
fintatarta/generic-dsp
cc948cc5c146d2e19b1d0194d21d1e8b7806d735
[ "MIT" ]
null
null
null
src/Backup/dsp-generic_functions.adb
fintatarta/generic-dsp
cc948cc5c146d2e19b1d0194d21d1e8b7806d735
[ "MIT" ]
null
null
null
pragma Ada_2012; with Ada.Unchecked_Deallocation; with Ada.Numerics.Elementary_Functions; package body DSP.Generic_Functions is use type Complex_Types.Complex; procedure Free is new Ada.Unchecked_Deallocation (Object => Scalar_Array, Name => Scalar_Array_Access); pragma Unreferenced (Free); procedure Free is new Ada.Unchecked_Deallocation (Object => Complex_Array, Name => Complex_Array_Access); ---------------- -- To_Complex -- ---------------- function To_Complex (X : Scalar_Array) return Complex_Array is Result : Complex_Array (X'Range); begin for K in X'Range loop Result (K) := (X (K), 0.0); end loop; return Result; end To_Complex; ------------ -- Filter -- ------------ function Filter (Item : in out Complex_FIR; Input : Complex_Type) return Complex_Type is Result : constant Complex_Type := Input * Item.Spec (0)+ Item.Buffer (1); Len : constant Positive := Item.Buffer'Last; begin pragma Assert (Item.Spec.all'First = 0 and Item.Buffer.all'First = 1 and Item.Buffer.all'Last = Item.Spec.all'Last); for K in 1 .. Len - 1 loop Item.Buffer (K) := Item.Buffer (K + 1) + Input * Item.Spec (K); end loop; Item.Buffer (Len) := Input * Item.Spec (Len); return Result; end Filter; --------- -- Set -- --------- procedure Set (Filter : in out Complex_FIR; Impulse_Response : Complex_Array) is begin Filter.Buffer := new Complex_Array (1 .. Impulse_Response'Last); Filter.Buffer.all := (others => (0.0, 0.0)); Filter.Spec := new Complex_Array (0 .. Impulse_Response'Last); Filter.Spec.all := (others => (0.0, 0.0)); for K in Impulse_Response'Range loop Filter.Spec (K) := Impulse_Response (K); end loop; end Set; --------- -- Set -- --------- procedure Set (Filter : in out Complex_FIR; Impulse_Response : Scalar_Array) is begin Filter.Set (To_Complex (Impulse_Response)); end Set; overriding procedure Finalize (Object : in out Complex_FIR) is begin if Object.Spec /= null then pragma Assert (Object.Buffer /= null); Free (Object.Spec); Free (Object.Buffer); end if; end Finalize; overriding procedure Finalize (Object : in out Complex_IIR) is begin if Object.Num /= null then pragma Assert (Object.Buffer /= null); Free (Object.Num); Free (Object.Den); Free (Object.Buffer); end if; end Finalize; ------------ -- Filter -- ------------ function Filter (Item : in out Complex_IIR; Input : Complex_Type) return Complex_Type is Result : constant Complex_Type := Input * Item.Num (0)+ Item.Buffer (1); Len : constant Positive := Item.Buffer'Last; begin pragma Assert (Item.Num.all'First = 0 and Item.Den.all'First = 1 and Item.Buffer.all'First = 1 and Item.Buffer.all'Last = Item.Num.all'Last and Item.Buffer.all'Last = Item.Den.all'Last); for K in 1 .. Len - 1 loop Item.Buffer (K) := Item.Buffer (K + 1) + Input * Item.Num (K) - Result * Item.Den (K); end loop; Item.Buffer (Len) := Input * Item.Num (Len) - Result * Item.Den (Len); return Result; end Filter; --------- -- Set -- --------- procedure Set (Filter : in out Complex_IIR; Specs : Complex_IIR_Spec) is Last : constant Positive := Positive'Max (Specs.Num_Deg, Specs.Den_Deg); begin Filter.Buffer := new Complex_Array (1 .. Last); Filter.Buffer.all := (others => (0.0, 0.0)); Filter.Num := new Complex_Array (0 .. Last); Filter.Num.all := (others => (0.0, 0.0)); for K in Specs.Numerator'Range loop Filter.Num (K) := Specs.Numerator (K); end loop; Filter.Den := new Complex_Array (1 .. Last); Filter.Den.all := (others => (0.0, 0.0)); for K in Specs.Denominator'Range loop Filter.Den (K) := Specs.Denominator (K); end loop; end Set; --------- -- Set -- --------- procedure Set (Filter : in out Complex_IIR; Numerator : Complex_Array; Denominator : Complex_Array) is Tmp : Complex_IIR_Spec := (Num_Deg => Numerator'Last, Den_Deg => Denominator'Last, Numerator => (others => (0.0, 0.0)), Denominator => (others => (0.0, 0.0))); begin for K in Integer'Max (Tmp.Numerator'First, Numerator'First) .. Numerator'Last loop Tmp.Numerator (K) := Numerator (K); end loop; for K in Integer'Max (Tmp.Denominator'First, Denominator'First) .. Denominator'Last loop Tmp.Denominator (K) := Denominator (K); end loop; Filter.Set (Tmp); end Set; --------- -- Set -- --------- procedure Set (Filter : in out Complex_IIR; Numerator : Scalar_Array; Denominator : Scalar_Array) is begin Filter.Set (To_Complex (Numerator), To_Complex (Denominator)); end Set; function Notch_Specs (Freq : Normalized_Frequency; Pole_Radius : Float; Class : Notch_Type := Stopband) return Complex_IIR_Spec is use Ada.Numerics; use Ada.Numerics.Elementary_Functions; C : constant Scalar_Type := Scalar_Type (2.0 * Cos (2.0 * Pi * Freq)); R : constant Scalar_Type := Scalar_Type (Pole_Radius); begin case Class is when Stopband => return Complex_IIR_Spec'(Num_Deg => 2, Den_Deg => 2, Numerator => (0 => (1.0, 0.0), 1 => (-C, 0.0), 2 => (1.0, 0.0)), Denominator => (1 => (-R * C, 0.0), 2 => (R ** 2, 0.0))); when Passband => return Complex_IIR_Spec'(Num_Deg => 1, Den_Deg => 2, Numerator => (0 => (C * (1.0 - R), 0.0), 1 => (R ** 2 - 1.0, 0.0)), Denominator => (1 => (-R * C, 0.0), 2 => (R ** 2, 0.0))); end case; end Notch_Specs; end DSP.Generic_Functions;
29.037037
94
0.488379
1d09917a58faa5af2bc9ccd45810a051a91e6cad
13,221
adb
Ada
lab13/src/main.adb
evgenijaZ/PP-labs
cfb63ae270f4dab9e7f06d300e054dc071b6d646
[ "MIT" ]
null
null
null
lab13/src/main.adb
evgenijaZ/PP-labs
cfb63ae270f4dab9e7f06d300e054dc071b6d646
[ "MIT" ]
null
null
null
lab13/src/main.adb
evgenijaZ/PP-labs
cfb63ae270f4dab9e7f06d300e054dc071b6d646
[ "MIT" ]
null
null
null
with System; use System; with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; procedure Main is N : Integer := 12; P : Integer := 6; H : Integer := N / P; type GeneralVector is array (Integer range <>) of Integer; subtype Vector is GeneralVector (1 .. N); subtype VectorH is GeneralVector (1 .. H); subtype Vector2H is GeneralVector (1 .. 2 * H); subtype Vector4H is GeneralVector (1 .. 4 * H); subtype Vector5H is GeneralVector (1 .. 5 * H); type GeneralMatrix is array (Integer range <>) of Vector; subtype Matrix is GeneralMatrix (1 .. N); subtype MatrixH is GeneralMatrix (1 .. H); subtype Matrix2H is GeneralMatrix (1 .. 2 * H); subtype Matrix3H is GeneralMatrix (1 .. 3 * H); subtype Matrix4H is GeneralMatrix (1 .. 4 * H); subtype Matrix5H is GeneralMatrix (1 .. 5 * H); task T1 is entry Data2 (MB_p : in MatrixH; MK_p : in Matrix); entry ShareM (m_p : in Integer); end T1; task T2 is entry Data2 (MB_p : in Matrix2H; MK_p : in Matrix); entry Data1 (Z_p : in Vector5H; MO_p : in Matrix5H); entry SendMin1 (m1_p : in Integer); entry ShareM (m_p : in Integer); entry Rezult1 (MA_p : in MatrixH); end T2; task T3 is entry Data2 (MB_p123 : in Matrix3H; MB_p56 : in Matrix2H; MK_p : in Matrix); entry Data1 (Z_p : in Vector4H; MO_p : in Matrix4H); entry SendMin12 (m1_p, m2_p : in Integer); entry SendMin5 (m5_p : in Integer); entry SendMin6 (m6_p : in Integer); entry ShareM (m_p : in Integer); entry Rezult2 (MA_p : in Matrix2H); entry Rezult5 (MA_p : in MatrixH); entry Rezult6 (MA_p : in MatrixH); end T3; task T4 is entry SendMin12356 (m1_p, m2_p, m3_p, m5_p, m6_p : in Integer); entry Data1 (Z_p : in VectorH; MO_p : in MatrixH); entry Rezult12356 (MA_p : in Matrix5H); end T4; task T5 is entry Data2 (MB_p : in MatrixH; MK_p : in Matrix); entry Data1 (Z_p : in VectorH; MO_p : in MatrixH); entry ShareM (m_p : in Integer); end T5; task T6 is entry Data2 (MB_p : in MatrixH; MK_p : in Matrix); entry Data1 (Z_p : in VectorH; MO_p : in MatrixH); entry ShareM (m_p : in Integer); end T6; task body T1 is Z : Vector; MO, MK : Matrix; m1, m : Integer; MA, MB : MatrixH; from, to : Integer; begin Put_Line ("T1 started"); from := 1; to := H; --Input Z, MO for i in 1 .. N loop Z (i) := 1; for j in 1 .. N loop MO (i) (j) := 1; end loop; end loop; --Send Z, MO to T2 T2.Data1 (Z (H + 1 .. N), MO (H + 1 .. N)); --Receive MB, MK from T2 accept Data2 (MB_p : in MatrixH; MK_p : in Matrix) do MB := MB_p; MK := MK_p; end Data2; --Calculate m1 m1 := Z(1); for i in 2 .. H loop if Z (i) < m1 then m1 := Z (i); end if; end loop; --Send m1 to T2 T2.SendMin1 (m1); --Receive m from T2 accept ShareM (m_p : in Integer) do m := m_p; end ShareM; --Calculate MAH = MBH + m*(MOH*MK) for i in from .. to loop for j in 1 .. N loop MA (i) (j) := 0; for K in 1 .. N loop MA (i) (j) := MA (i) (j) + MO (i) (K) * MK (K) (j); end loop; MA (i) (j) := MB (i) (j) + m * MA (i) (j); end loop; end loop; --Send MAH to T2 T2.Rezult1 (MA (1 .. H)); --Put_Line ("T1 finished"); end T1; task body T2 is Z : Vector5H; MK : Matrix; MO : Matrix5H; MB, MA : Matrix2H; m1, m2, m : Integer; from, to : Integer; begin Put_Line ("T2 started"); from := H + 1; to := 2 * H; --Receive Z, MO from T1; accept Data1 (Z_p : in Vector5H; MO_p : in Matrix5H) do Z := Z_p; MO := MO_p; end Data1; --Send Z, MO to T3; T3.Data1 (Z (H + 1 .. 5 * H), MO (H + 1 .. 5 * H)); --Receive MB, MK from T3; accept Data2 (MB_p : in Matrix2H; MK_p : in Matrix) do MB := MB_p; MK := MK_p; end Data2; --Send MB, MK to T1; T1.Data2 (MB (1 .. H), MK); --Calculate m2; m2 := Z(H+1); for i in H + 2 .. 2 * H loop if Z (i) < m2 then m2 := Z (i); end if; end loop; --Receive m1 from T1; accept SendMin1 (m1_p : in Integer) do m1 := m1_p; end SendMin1; --Send m1, m2 to T3; T3.SendMin12 (m1, m2); --Receive m from T3; accept ShareM (m_p : in Integer) do m := m_p; end ShareM; --Send m to T1; T1.ShareM (m); --Calculate MAH = MBH + m*(MOH*MK) for i in H + 1 .. 2 * H loop for j in 1 .. N loop MA (i) (j) := 0; for K in 1 .. N loop MA (i) (j) := MA (i) (j) + MO (i) (K) * MK (K) (j); end loop; MA (i) (j) := MB (i) (j) + m * MA (i) (j); end loop; end loop; --Receive MA from T1; accept Rezult1 (MA_p : in MatrixH) do MA (1 .. H) := MA_p; end Rezult1; --Send MA2H to T3 T3.Rezult2 (MA); --Put_Line ("T2 finished"); end T2; task body T3 is m1, m2, m3, m5, m6, m : Integer; MA : Matrix5H; Z : Vector4H; MO : Matrix4H; MK : Matrix; MB : Matrix5H; begin Put_Line ("T3 started"); --Receive Z, MO from T2; accept Data1 (Z_p : in Vector4H; MO_p : in Matrix4H) do Z := Z_p; MO := MO_p; end Data1; --Receive MB, MK from T4; accept Data2 (MB_p123 : in Matrix3H; MB_p56 : in Matrix2H; MK_p : in Matrix) do MB (1 .. 3 * H) := MB_p123; MB (3 * H + 1 .. 5 * H) := MB_p56; MK := MK_p; end Data2; --Send MB,MK to T2; T2.Data2 (MB (1 .. 2 * H), MK); --Send Z,MO to T4; T4.Data1 (Z (H + 1 .. 2 * H), MO (H + 1 .. 2 * H)); --Send Z,MO to T5; T5.Data1 (Z (2 * H + 1 .. 3 * H), MO (2 * H + 1 .. 3 * H)); --Send MB,MK to T5; T5.Data2 (MB (3 * H + 1 .. 4 * H), MK); --Send Z,MO to T6; T6.Data1 (Z (3 * H + 1 .. 4 * H), MO (3 * H + 1 .. 4 * H)); --Send MB,MK to T6; T6.Data2 (MB (4 * H + 1 .. 5 * H), MK); --Calculate m3; m3 := Z(1); for i in 2 .. H loop if Z (i) < m3 then m3 := Z (i); end if; end loop; --Receive m1,m2 from T2; accept SendMin12 (m1_p : in Integer; m2_p : in Integer) do m1 := m1_p; m2 := m2_p; end SendMin12; --Receive m5 from T5; accept SendMin5 (m5_p : in Integer) do m5 := m5_p; end SendMin5; --Receive m6 from T6; accept SendMin6 (m6_p : in Integer) do m6 := m6_p; end SendMin6; --Send m1,m2,m3,m5,m6 to T4; T4.SendMin12356 (m1, m2, m3, m5, m6); --Receive m from T4; accept ShareM (m_p : in Integer) do m := m_p; end ShareM; --Send m to T2; T2.ShareM (m); --Send m to T5; T5.ShareM (m); --Send m to T6; T6.ShareM (m); --Calculate MAH = MBH + m*(MOH*MK); for i in 2 * H + 1 .. 3 * H loop for j in 1 .. N loop MA (i) (j) := 0; for K in 1 .. N loop MA (i) (j) := MA (i) (j) + MO (i) (K) * MK (K) (j); end loop; MA (i) (j) := MB (i + H) (j) + m * MA (i) (j); end loop; end loop; --Receive MA from T2; accept Rezult2 (MA_p : in Matrix2H) do MA (1 .. 2 * H) := MA_p; end Rezult2; --Receive MA from T5; accept Rezult5 (MA_p : in MatrixH) do MA (3 * H + 1 .. 4 * H) := MA_p; end Rezult5; --Receive MA from T6; accept Rezult6 (MA_p : in MatrixH) do MA (4 * H + 1 .. 5 * H) := MA_p; end Rezult6; --Send MA to T4; T4.Rezult12356 (MA); --Put_Line ("T3 finished"); end T3; task body T4 is MA, MB, MK : Matrix; Z : VectorH; MO : MatrixH; m4, min : Integer; from, to : Integer; M : array (1 .. 6) of Integer; begin Put_Line ("T4 started"); from := 3 * H + 1; to := 4 * H; --Input MB,MK; for i in 1 .. N loop for j in 1 .. N loop MB (i) (j) := 1; MK (i) (j) := 1; end loop; end loop; --Send MB, MK to T3; T3.Data2 (MB (1 .. 3 * H), MB (4 * H + 1 .. N), MK); --Receive Z, MO from T3; accept Data1 (Z_p : in VectorH; MO_p : in MatrixH) do Z := Z_p; MO := MO_p; end Data1; --Calculate m4; m4 := Z(1); for i in 2 .. H loop if Z (i) < m4 then m4 := Z (i); end if; end loop; M (4) := m4; --Receive m1,m2,m3,m5,m6 from T3; accept SendMin12356 (m1_p : in Integer; m2_p : in Integer; m3_p : in Integer; m5_p : in Integer; m6_p : in Integer) do M (1) := m1_p; M (2) := m2_p; M (3) := m3_p; M (5) := m5_p; M (6) := m6_p; end SendMin12356; --Calculate m; min := M(1); for i in 2 .. P loop if M (i) < min then min := M (i); end if; end loop; --Send m to T3; T3.ShareM (min); --Calculate MAH = MBH + m*(MOH*MK); for i in 3 * H + 1 .. 4 * H loop for j in 1 .. N loop MA (i) (j) := 0; for K in 1 .. N loop MA (i) (j) := MA (i) (j) + MO (i - 3 * H) (K) * MK (K) (j); end loop; MA (i) (j) := MB (i) (j) + min * MA (i) (j); end loop; end loop; --Receive MA from T3; accept Rezult12356 (MA_p : in Matrix5H) do MA (1 .. 3 * H) := MA_p (1 .. 3 * H); MA (4 * H + 1 .. N) := MA_p (3 * H + 1 .. 5 * H); end Rezult12356; --Output MA; if N <= 12 then for i in 1 .. N loop for j in 1 .. N loop Put (MA (i) (j)); Put (" "); end loop; Put_Line (" "); end loop; end if; -- Put_Line ("T4 finished"); end T4; task body T5 is MK : Matrix; MB, MO, MA : MatrixH; Z : VectorH; m5, m : Integer; from, to : Integer; begin Put_Line ("T5 started"); from := 4 * H + 1; to := 5 * H; --Receive Z, MO from T3; accept Data1 (Z_p : in VectorH; MO_p : in MatrixH) do Z := Z_p; MO := MO_p; end Data1; --Receive MB, MK from T3; accept Data2 (MB_p : in MatrixH; MK_p : in Matrix) do MB := MB_p; MK := MK_p; end Data2; --Calculate m5; m5 := Z(1); for i in 2 .. H loop if Z (i) < m5 then m5 := Z (i); end if; end loop; --Send m5 to T3; T3.SendMin5 (m5); --Receive m from T3; accept ShareM (m_p : in Integer) do m := m_p; end ShareM; --Calculate MAH = MBH + m*(MOH*MK); for i in 1 .. H loop for j in 1 .. N loop MA (i) (j) := 0; for K in 1 .. N loop MA (i) (j) := MA (i) (j) + MO (i) (K) * MK (K) (j); end loop; MA (i) (j) := MB (i) (j) + m * MA (i) (j); end loop; end loop; --Send MA to T3; T3.Rezult5 (MA); --Put_Line ("T5 finished"); end T5; task body T6 is MK : Matrix; MB, MO, MA : MatrixH; Z : VectorH; m6, m : Integer; from, to : Integer; begin Put_Line ("T6 started"); from := 5 * H + 1; to := N; --Receive Z, MO from T3; accept Data1 (Z_p : in VectorH; MO_p : in MatrixH) do Z := Z_p; MO := MO_p; end Data1; --Receive MB, MK from T3; accept Data2 (MB_p : in MatrixH; MK_p : in Matrix) do MB := MB_p; MK := MK_p; end Data2; --Calculate m6; m6 := Z(1); for i in 2 .. H loop if Z (i) < m6 then m6 := Z (i); end if; end loop; --Send m6 to T3; T3.SendMin6 (m6); --Receive m from T3; accept ShareM (m_p : in Integer) do m := m_p; end ShareM; --Calculate MAH = MBH + m*(MOH*MK); for i in 1 .. H loop for j in 1 .. N loop MA (i) (j) := 0; for K in 1 .. N loop MA (i) (j) := MA (i) (j) + MO (i) (K) * MK (K) (j); end loop; MA (i) (j) := MB (i) (j) + m * MA (i) (j); end loop; end loop; --Send MA to T3; T3.Rezult6 (MA); -- Put_Line ("T6 finished"); end T6; begin null; end Main;
28.616883
74
0.444898
57c8c642f3cde9c1180beebface862012eff81f4
4,710
ads
Ada
source/nodes/program-nodes-allocators.ads
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
null
null
null
source/nodes/program-nodes-allocators.ads
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
null
null
null
source/nodes/program-nodes-allocators.ads
reznikmm/gela
20134f1d154fb763812e73860c6f4b04f353df79
[ "MIT" ]
1
2019-10-16T09:05:27.000Z
2019-10-16T09:05:27.000Z
-- SPDX-FileCopyrightText: 2019 Max Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- with Program.Lexical_Elements; with Program.Elements.Expressions; with Program.Elements.Subtype_Indications; with Program.Elements.Qualified_Expressions; with Program.Elements.Allocators; with Program.Element_Visitors; package Program.Nodes.Allocators is pragma Preelaborate; type Allocator is new Program.Nodes.Node and Program.Elements.Allocators.Allocator and Program.Elements.Allocators.Allocator_Text with private; function Create (New_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Left_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access; Subpool_Name : Program.Elements.Expressions.Expression_Access; Right_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access; Subtype_Indication : Program.Elements.Subtype_Indications .Subtype_Indication_Access; Qualified_Expression : Program.Elements.Qualified_Expressions .Qualified_Expression_Access) return Allocator; type Implicit_Allocator is new Program.Nodes.Node and Program.Elements.Allocators.Allocator with private; function Create (Subpool_Name : Program.Elements.Expressions.Expression_Access; Subtype_Indication : Program.Elements.Subtype_Indications .Subtype_Indication_Access; Qualified_Expression : Program.Elements.Qualified_Expressions .Qualified_Expression_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Allocator with Pre => Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance; private type Base_Allocator is abstract new Program.Nodes.Node and Program.Elements.Allocators.Allocator with record Subpool_Name : Program.Elements.Expressions.Expression_Access; Subtype_Indication : Program.Elements.Subtype_Indications .Subtype_Indication_Access; Qualified_Expression : Program.Elements.Qualified_Expressions .Qualified_Expression_Access; end record; procedure Initialize (Self : in out Base_Allocator'Class); overriding procedure Visit (Self : not null access Base_Allocator; Visitor : in out Program.Element_Visitors.Element_Visitor'Class); overriding function Subpool_Name (Self : Base_Allocator) return Program.Elements.Expressions.Expression_Access; overriding function Subtype_Indication (Self : Base_Allocator) return Program.Elements.Subtype_Indications.Subtype_Indication_Access; overriding function Qualified_Expression (Self : Base_Allocator) return Program.Elements.Qualified_Expressions .Qualified_Expression_Access; overriding function Is_Allocator (Self : Base_Allocator) return Boolean; overriding function Is_Expression (Self : Base_Allocator) return Boolean; type Allocator is new Base_Allocator and Program.Elements.Allocators.Allocator_Text with record New_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_Allocator_Text (Self : in out Allocator) return Program.Elements.Allocators.Allocator_Text_Access; overriding function New_Token (Self : Allocator) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function Left_Bracket_Token (Self : Allocator) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Right_Bracket_Token (Self : Allocator) return Program.Lexical_Elements.Lexical_Element_Access; type Implicit_Allocator is new Base_Allocator with record Is_Part_Of_Implicit : Boolean; Is_Part_Of_Inherited : Boolean; Is_Part_Of_Instance : Boolean; end record; overriding function To_Allocator_Text (Self : in out Implicit_Allocator) return Program.Elements.Allocators.Allocator_Text_Access; overriding function Is_Part_Of_Implicit (Self : Implicit_Allocator) return Boolean; overriding function Is_Part_Of_Inherited (Self : Implicit_Allocator) return Boolean; overriding function Is_Part_Of_Instance (Self : Implicit_Allocator) return Boolean; end Program.Nodes.Allocators;
34.888889
78
0.743737
580880e25ea229c819d550641b5b37df155d24fe
6,224
ada
Ada
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c3/c34005i.ada
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/ada/acats/tests/c3/c34005i.ada
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c3/c34005i.ada
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
-- C34005I.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: -- FOR DERIVED ONE-DIMENSIONAL ARRAY TYPES WHOSE COMPONENT TYPE IS A -- CHARACTER TYPE: -- CHECK THAT ALL VALUES OF THE PARENT (BASE) TYPE ARE PRESENT FOR -- THE DERIVED (BASE) TYPE WHEN THE DERIVED TYPE DEFINITION IS -- CONSTRAINED. -- CHECK THAT ANY CONSTRAINT IMPOSED ON THE PARENT SUBTYPE IS ALSO -- IMPOSED ON THE DERIVED SUBTYPE. -- HISTORY: -- JRK 9/15/86 CREATED ORIGINAL TEST. WITH REPORT; USE REPORT; PROCEDURE C34005I IS TYPE COMPONENT IS NEW CHARACTER; PACKAGE PKG IS FIRST : CONSTANT := 0; LAST : CONSTANT := 100; SUBTYPE INDEX IS INTEGER RANGE FIRST .. LAST; TYPE PARENT IS ARRAY (INDEX RANGE <>) OF COMPONENT; FUNCTION CREATE ( F, L : INDEX; C : COMPONENT; DUMMY : PARENT -- TO RESOLVE OVERLOADING. ) RETURN PARENT; END PKG; USE PKG; TYPE T IS NEW PARENT (IDENT_INT (5) .. IDENT_INT (7)); SUBTYPE SUBPARENT IS PARENT (5 .. 7); TYPE S IS NEW SUBPARENT; X : T := (OTHERS => 'B'); Y : S := (OTHERS => 'B'); PACKAGE BODY PKG IS FUNCTION CREATE ( F, L : INDEX; C : COMPONENT; DUMMY : PARENT ) RETURN PARENT IS A : PARENT (F .. L); B : COMPONENT := C; BEGIN FOR I IN F .. L LOOP A (I) := B; B := COMPONENT'SUCC (B); END LOOP; RETURN A; END CREATE; END PKG; BEGIN TEST ("C34005I", "CHECK THAT ALL VALUES OF THE PARENT (BASE) " & "TYPE ARE PRESENT FOR THE DERIVED (BASE) TYPE " & "WHEN THE DERIVED TYPE DEFINITION IS " & "CONSTRAINED. ALSO CHECK THAT ANY CONSTRAINT " & "IMPOSED ON THE PARENT SUBTYPE IS ALSO IMPOSED " & "ON THE DERIVED SUBTYPE. CHECK FOR DERIVED " & "ONE-DIMENSIONAL ARRAY TYPES WHOSE COMPONENT " & "TYPE IS A CHARACTER TYPE"); -- CHECK THAT BASE TYPE VALUES NOT IN THE SUBTYPE ARE PRESENT. BEGIN IF CREATE (2, 3, 'D', X) /= "DE" OR CREATE (2, 3, 'D', Y) /= "DE" THEN FAILED ("CAN'T CREATE BASE TYPE VALUES OUTSIDE THE " & "SUBTYPE"); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ("CALL TO CREATE RAISED CONSTRAINT_ERROR"); WHEN OTHERS => FAILED ("CALL TO CREATE RAISED EXCEPTION"); END; IF X & "CD" /= "BBBCD" OR Y & "CD" /= "BBBCD" THEN FAILED ("INCORRECT &"); END IF; -- CHECK THE DERIVED SUBTYPE CONSTRAINT. IF T'FIRST /= 5 OR T'LAST /= 7 OR S'FIRST /= 5 OR S'LAST /= 7 THEN FAILED ("INCORRECT 'FIRST OR 'LAST"); END IF; BEGIN X := "ABC"; Y := "ABC"; IF PARENT (X) /= PARENT (Y) THEN -- USE X AND Y. FAILED ("INCORRECT CONVERSION TO PARENT"); END IF; EXCEPTION WHEN OTHERS => FAILED ("EXCEPTION RAISED BY OK ASSIGNMENT"); END; BEGIN X := "AB"; FAILED ("CONSTRAINT_ERROR NOT RAISED -- X := ""AB"""); IF X = "AB" THEN -- USE X. COMMENT ("X ALTERED -- X := ""AB"""); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- X := ""AB"""); END; BEGIN X := "ABCD"; FAILED ("CONSTRAINT_ERROR NOT RAISED -- " & "X := ""ABCD"""); IF X = "ABCD" THEN -- USE X. COMMENT ("X ALTERED -- X := ""ABCD"""); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- " & "X := ""ABCD"""); END; BEGIN Y := "AB"; FAILED ("CONSTRAINT_ERROR NOT RAISED -- Y := ""AB"""); IF Y = "AB" THEN -- USE Y. COMMENT ("Y ALTERED -- Y := ""AB"""); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- Y := ""AB"""); END; BEGIN Y := "ABCD"; FAILED ("CONSTRAINT_ERROR NOT RAISED -- " & "Y := ""ABCD"""); IF Y = "ABCD" THEN -- USE Y. COMMENT ("Y ALTERED -- Y := ""ABCD"""); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- " & "Y := ""ABCD"""); END; RESULT; END C34005I;
31.755102
79
0.503374
1de39827131bc22c9281631d4163bb226b62ff32
2,956
ads
Ada
tools-src/gnu/gcc/gcc/ada/s-sopco5.ads
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
80
2015-01-02T10:14:04.000Z
2021-06-07T06:29:49.000Z
tools-src/gnu/gcc/gcc/ada/s-sopco5.ads
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
9
2015-05-14T11:03:12.000Z
2018-01-04T07:12:58.000Z
tools-src/gnu/gcc/gcc/ada/s-sopco5.ads
modern-tomato/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
69
2015-01-02T10:45:56.000Z
2021-09-06T07:52:13.000Z
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . S T R I N G _ O P S _ C O N C A T _ 5 -- -- -- -- S p e c -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992-2000, 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 2, 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. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package contains the function for concatenating five strings package System.String_Ops_Concat_5 is pragma Pure (String_Ops_Concat_5); function Str_Concat_5 (S1, S2, S3, S4, S5 : String) return String; -- Concatenate two strings and return resulting string end System.String_Ops_Concat_5;
65.688889
78
0.435386
41cac95e01cb8587cc4c1a2cbc8bf673f5fd5064
8,745
ads
Ada
demo/adainclude/s-unstyp.ads
e3l6/SSMDev
2929757aab3842aefd84debb2d7c3e8b28c2b340
[ "MIT" ]
null
null
null
demo/adainclude/s-unstyp.ads
e3l6/SSMDev
2929757aab3842aefd84debb2d7c3e8b28c2b340
[ "MIT" ]
null
null
null
demo/adainclude/s-unstyp.ads
e3l6/SSMDev
2929757aab3842aefd84debb2d7c3e8b28c2b340
[ "MIT" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . U N S I G N E D _ T Y P E S -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2014, 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. -- -- -- ------------------------------------------------------------------------------ -- This package contains definitions of standard unsigned types that -- correspond in size to the standard signed types declared in Standard, -- and (unlike the types in Interfaces) have corresponding names. It -- also contains some related definitions for other specialized types -- used by the compiler in connection with packed array types. pragma Compiler_Unit_Warning; package System.Unsigned_Types is pragma Pure; type Short_Short_Unsigned is mod 2 ** Short_Short_Integer'Size; type Short_Unsigned is mod 2 ** Short_Integer'Size; type Unsigned is mod 2 ** Integer'Size; type Long_Unsigned is mod 2 ** Long_Integer'Size; type Long_Long_Unsigned is mod 2 ** Long_Long_Integer'Size; type Float_Unsigned is mod 2 ** Float'Size; -- Used in the implementation of Is_Negative intrinsic (see Exp_Intr) type Packed_Byte is mod 2 ** 8; for Packed_Byte'Size use 8; -- Component type for Packed_Bytes array type Packed_Bytes1 is array (Natural range <>) of Packed_Byte; for Packed_Bytes1'Alignment use 1; for Packed_Bytes1'Component_Size use Packed_Byte'Size; -- This is the type used to implement packed arrays where no alignment -- is required. This includes the cases of 1,2,4 (where we use direct -- masking operations), and all odd component sizes (where the clusters -- are not aligned anyway, see, e.g. System.Pack_07 in file s-pack07 -- for details. type Packed_Bytes2 is new Packed_Bytes1; for Packed_Bytes2'Alignment use Integer'Min (2, Standard'Maximum_Alignment); -- This is the type used to implement packed arrays where an alignment -- of 2 (is possible) is helpful for maximum efficiency of the get and -- set routines in the corresponding library unit. This is true of all -- component sizes that are even but not divisible by 4 (other than 2 for -- which we use direct masking operations). In such cases, the clusters -- can be assumed to be 2-byte aligned if the array is aligned. See for -- example System.Pack_10 in file s-pack10). type Packed_Bytes4 is new Packed_Bytes1; for Packed_Bytes4'Alignment use Integer'Min (4, Standard'Maximum_Alignment); -- This is the type used to implement packed arrays where an alignment -- of 4 (if possible) is helpful for maximum efficiency of the get and -- set routines in the corresponding library unit. This is true of all -- component sizes that are divisible by 4 (other than powers of 2, which -- are either handled by direct masking or not packed at all). In such -- cases the clusters can be assumed to be 4-byte aligned if the array -- is aligned (see System.Pack_12 in file s-pack12 as an example). type Bits_1 is mod 2**1; type Bits_2 is mod 2**2; type Bits_4 is mod 2**4; -- Types used for packed array conversions subtype Bytes_F is Packed_Bytes4 (1 .. Float'Size / 8); -- Type used in implementation of Is_Negative intrinsic (see Exp_Intr) function Shift_Left (Value : Short_Short_Unsigned; Amount : Natural) return Short_Short_Unsigned; function Shift_Right (Value : Short_Short_Unsigned; Amount : Natural) return Short_Short_Unsigned; function Shift_Right_Arithmetic (Value : Short_Short_Unsigned; Amount : Natural) return Short_Short_Unsigned; function Rotate_Left (Value : Short_Short_Unsigned; Amount : Natural) return Short_Short_Unsigned; function Rotate_Right (Value : Short_Short_Unsigned; Amount : Natural) return Short_Short_Unsigned; function Shift_Left (Value : Short_Unsigned; Amount : Natural) return Short_Unsigned; function Shift_Right (Value : Short_Unsigned; Amount : Natural) return Short_Unsigned; function Shift_Right_Arithmetic (Value : Short_Unsigned; Amount : Natural) return Short_Unsigned; function Rotate_Left (Value : Short_Unsigned; Amount : Natural) return Short_Unsigned; function Rotate_Right (Value : Short_Unsigned; Amount : Natural) return Short_Unsigned; function Shift_Left (Value : Unsigned; Amount : Natural) return Unsigned; function Shift_Right (Value : Unsigned; Amount : Natural) return Unsigned; function Shift_Right_Arithmetic (Value : Unsigned; Amount : Natural) return Unsigned; function Rotate_Left (Value : Unsigned; Amount : Natural) return Unsigned; function Rotate_Right (Value : Unsigned; Amount : Natural) return Unsigned; function Shift_Left (Value : Long_Unsigned; Amount : Natural) return Long_Unsigned; function Shift_Right (Value : Long_Unsigned; Amount : Natural) return Long_Unsigned; function Shift_Right_Arithmetic (Value : Long_Unsigned; Amount : Natural) return Long_Unsigned; function Rotate_Left (Value : Long_Unsigned; Amount : Natural) return Long_Unsigned; function Rotate_Right (Value : Long_Unsigned; Amount : Natural) return Long_Unsigned; function Shift_Left (Value : Long_Long_Unsigned; Amount : Natural) return Long_Long_Unsigned; function Shift_Right (Value : Long_Long_Unsigned; Amount : Natural) return Long_Long_Unsigned; function Shift_Right_Arithmetic (Value : Long_Long_Unsigned; Amount : Natural) return Long_Long_Unsigned; function Rotate_Left (Value : Long_Long_Unsigned; Amount : Natural) return Long_Long_Unsigned; function Rotate_Right (Value : Long_Long_Unsigned; Amount : Natural) return Long_Long_Unsigned; pragma Import (Intrinsic, Shift_Left); pragma Import (Intrinsic, Shift_Right); pragma Import (Intrinsic, Shift_Right_Arithmetic); pragma Import (Intrinsic, Rotate_Left); pragma Import (Intrinsic, Rotate_Right); -- The following definitions are obsolescent. They were needed by the -- previous version of the compiler and runtime, but are not needed -- by the current version. We retain them to help with bootstrap path -- problems. Also they seem harmless, and if any user programs have -- been using these types, why discombobulate them? subtype Packed_Bytes is Packed_Bytes4; subtype Packed_Bytes_Unaligned is Packed_Bytes1; end System.Unsigned_Types;
41.842105
79
0.603316
57fb1bc15c076aa42662e19d7455c3c280b8fccc
381
adb
Ada
day23/src/main.adb
jwarwick/aoc_2020
b88e5a69f7ce035c4bc0a2474e0e0cdbb7b43377
[ "MIT" ]
3
2020-12-26T23:44:33.000Z
2021-12-06T16:00:54.000Z
day23/src/main.adb
jwarwick/aoc_2020
b88e5a69f7ce035c4bc0a2474e0e0cdbb7b43377
[ "MIT" ]
null
null
null
day23/src/main.adb
jwarwick/aoc_2020
b88e5a69f7ce035c4bc0a2474e0e0cdbb7b43377
[ "MIT" ]
null
null
null
-- AOC 2020, Day 23 with Ada.Text_IO; use Ada.Text_IO; with Day; use Day; procedure main is cups : constant Cup_Array := (3,1,5,6,7,9,8,2,4); steps : constant Natural := 100; part1 : constant String := play(cups, steps); part2 : constant Long_Integer := play2(cups, 1000000, 10000000); begin put_line("Part 1: " & part1); put_line("Part 2: " & part2'IMAGE); end main;
27.214286
66
0.666667
3df6686d646f81e6d8afb74ec6edc3a8420d40dd
1,885
adb
Ada
src/dependency_graph_extractor.adb
TNO/Dependency_Graph_Extractor-Ada
cfcc9132cf181e4db5139c14150f221efa69a6d6
[ "BSD-3-Clause" ]
null
null
null
src/dependency_graph_extractor.adb
TNO/Dependency_Graph_Extractor-Ada
cfcc9132cf181e4db5139c14150f221efa69a6d6
[ "BSD-3-Clause" ]
null
null
null
src/dependency_graph_extractor.adb
TNO/Dependency_Graph_Extractor-Ada
cfcc9132cf181e4db5139c14150f221efa69a6d6
[ "BSD-3-Clause" ]
null
null
null
with Ada.Calendar; with Ada.Command_Line; with Ada.Strings.Unbounded; with Ada.Text_IO; with GNATCOLL.VFS; with Command_Line; with Extraction; with GraphML_Writers; procedure Dependency_Graph_Extractor is package G_W renames GraphML_Writers; package S_U renames Ada.Strings.Unbounded; package V_F_S renames GNATCOLL.VFS; use type Ada.Calendar.Time; use type S_U.Unbounded_String; use type V_F_S.Filesystem_String; use type V_F_S.Virtual_File; Output_File : S_U.Unbounded_String; Directory_Prefix : S_U.Unbounded_String; Recurse_Projects : Boolean; Input_Files : Command_Line.Input_File_Vectors.Vector; Start_Time : constant Ada.Calendar.Time := Ada.Calendar.Clock; begin if not Command_Line.Parse_Command_Line (Input_Files, Recurse_Projects, Directory_Prefix, Output_File) then return; end if; if Output_File = S_U.Null_Unbounded_String then Ada.Text_IO.Put_Line (Ada.Text_IO.Standard_Error, "No output file provided"); Ada.Command_Line.Set_Exit_Status (1); return; end if; declare use Extraction; Filename : constant String := S_U.To_String (Output_File); Prefix : constant V_F_S.Virtual_File := (if Directory_Prefix = S_U.Null_Unbounded_String then V_F_S.No_File else V_F_S.Create_From_Base (+S_U.To_String (Directory_Prefix))); Graph : G_W.GraphML_File := G_W.Create_GraphML_Writer (Filename, Node_Attributes, Edge_Attributes); begin Prefix.Normalize_Path; for Input_File of Input_Files loop Extract_Dependency_Graph (S_U.To_String (Input_File), Recurse_Projects, Prefix, Graph); end loop; Graph.Close; end; Ada.Text_IO.Put_Line (Ada.Text_IO.Standard_Error, Duration'Image (Ada.Calendar.Clock - Start_Time)); end Dependency_Graph_Extractor;
30.901639
79
0.719363
5719b1b01eb6d489b084ae923d64a851f965106b
6,995
adb
Ada
src/ncurses-5.5/Ada95/samples/ncurses2-getopt.adb
erwinchang/minicom
3fe2ba7d8e8475c199b493a2b99cd3c690f6ea4f
[ "MIT" ]
null
null
null
src/ncurses-5.5/Ada95/samples/ncurses2-getopt.adb
erwinchang/minicom
3fe2ba7d8e8475c199b493a2b99cd3c690f6ea4f
[ "MIT" ]
null
null
null
src/ncurses-5.5/Ada95/samples/ncurses2-getopt.adb
erwinchang/minicom
3fe2ba7d8e8475c199b493a2b99cd3c690f6ea4f
[ "MIT" ]
3
2016-06-13T13:20:56.000Z
2019-12-05T02:31:23.000Z
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- ncurses -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 2000,2004 Free Software Foundation, Inc. -- -- -- -- 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, distribute with modifications, 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 ABOVE 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. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Eugene V. Melaragno <[email protected]> 2000 -- Version Control -- $Revision: 1.6 $ -- $Date: 2004/08/21 21:37:00 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ -- A simplified version of the GNU getopt function -- copyright Free Software Foundtion with Ada.Strings.Fixed; with Ada.Strings.Bounded; with Ada.Text_IO; use Ada.Text_IO; package body ncurses2.getopt is nextchar : Natural := 0; -- Ncurses doesn't use the non option elements so we are spared -- the job of computing those. -- also the user is not allowed to modify argv or argc -- Doing so is Erroneous execution. -- longoptions are not handled. procedure Qgetopt (retval : out Integer; argc : Integer; argv : stringfunc; -- argv will be the Argument function. optstring : String; optind : in out Integer; -- ignored for ncurses, must be initialized to 1 by -- the caller Optarg : out stringa -- a garbage colector would be useful here. ) is package BS is new Ada.Strings.Bounded.Generic_Bounded_Length (200); use BS; optargx : Bounded_String; begin if argc < optind then retval := -1; return; end if; optargx := To_Bounded_String (""); if nextchar = 0 then if argv (optind) = "--" then -- the rest are non-options, we ignore them retval := -1; return; end if; if argv (optind)(1) /= '-' or argv (optind)'Length = 1 then optind := optind + 1; Optarg := new String'(argv (optind)); retval := 1; return; end if; nextchar := 2; -- skip the one hyphen. end if; -- Look at and handle the next short option-character. declare c : Character := argv (optind) (nextchar); temp : constant Natural := Ada.Strings.Fixed.Index (optstring, String'(1 => c)); begin if temp = 0 or c = ':' then Put_Line (Standard_Error, argv (optind) & ": invalid option -- " & c); c := '?'; return; end if; if optstring (temp + 1) = ':' then if optstring (temp + 2) = ':' then -- This is an option that accepts an argument optionally. if nextchar /= argv (optind)'Length then optargx := To_Bounded_String (argv (optind) (nextchar .. argv (optind)'Length)); else Optarg := null; end if; else -- This is an option that requires an argument. if nextchar /= argv (optind)'Length then optargx := To_Bounded_String (argv (optind) (nextchar .. argv (optind)'Length)); optind := optind + 1; elsif optind = argc then Put_Line (Standard_Error, argv (optind) & ": option requires an argument -- " & c); if optstring (1) = ':' then c := ':'; else c := '?'; end if; else -- increment it again when taking next ARGV-elt as argument. optind := optind + 1; optargx := To_Bounded_String (argv (optind)); optind := optind + 1; end if; end if; nextchar := 0; else -- no argument for the option if nextchar = argv (optind)'Length then optind := optind + 1; nextchar := 0; else nextchar := nextchar + 1; end if; end if; retval := Character'Pos (c); Optarg := new String'(To_String (optargx)); return; end; end Qgetopt; end ncurses2.getopt;
42.652439
79
0.442173
2fe58a3723895bdcdd7e333aeacf2282511dba8f
2,116
ada
Ada
Task/User-input-Graphical/Ada/user-input-graphical.ada
djgoku/RosettaCodeData
91df62d46142e921b3eacdb52b0316c39ee236bc
[ "Info-ZIP" ]
1
2021-02-01T17:43:23.000Z
2021-02-01T17:43:23.000Z
Task/User-input-Graphical/Ada/user-input-graphical.ada
p0l4r/RosettaCodeData
ba8067c3b7e68156d666c9a802c07cdacecc14ea
[ "Info-ZIP" ]
null
null
null
Task/User-input-Graphical/Ada/user-input-graphical.ada
p0l4r/RosettaCodeData
ba8067c3b7e68156d666c9a802c07cdacecc14ea
[ "Info-ZIP" ]
1
2018-11-09T22:08:40.000Z
2018-11-09T22:08:40.000Z
with Gtk.Button; use Gtk.Button; with Gtk.GEntry; use Gtk.GEntry; with Gtk.Label; use Gtk.Label; with Gtk.Window; use Gtk.Window; with Gtk.Widget; use Gtk.Widget; with Gtk.Table; use Gtk.Table; with Gtk.Handlers; with Gtk.Main; procedure Graphic_Input is Window : Gtk_Window; Grid : Gtk_Table; Label : Gtk_Label; Message : Gtk_Label; Edit : Gtk_GEntry; Button : Gtk_Button; package Handlers is new Gtk.Handlers.Callback (Gtk_Widget_Record); package Return_Handlers is new Gtk.Handlers.Return_Callback (Gtk_Widget_Record, Boolean); function Delete_Event (Widget : access Gtk_Widget_Record'Class) return Boolean is begin return False; end Delete_Event; procedure Destroy (Widget : access Gtk_Widget_Record'Class) is begin Gtk.Main.Main_Quit; end Destroy; procedure Clicked (Widget : access Gtk_Widget_Record'Class) is begin if Get_Text (Label) = "Enter integer:" then Set_Text (Message, "Entered:" & Integer'Image (Integer'Value (Get_Text (Edit)))); Set_Sensitive (Button, False); else Set_Text (Message, "Entered:" & Get_Text (Edit)); Set_Text (Label, "Enter integer:"); end if; exception when Constraint_Error => Set_Text (Message, "Error integer input"); end Clicked; begin Gtk.Main.Init; Gtk.Window.Gtk_New (Window); Gtk_New (Grid, 2, 3, False); Add (Window, Grid); Gtk_New (Label, "Enter string:"); Attach (Grid, Label, 0, 1, 0, 1); Gtk_New (Edit); Attach (Grid, Edit, 1, 2, 0, 1); Gtk_New (Button, "OK"); Attach (Grid, Button, 2, 3, 0, 1); Gtk_New (Message); Attach (Grid, Message, 0, 3, 1, 2); Return_Handlers.Connect ( Window, "delete_event", Return_Handlers.To_Marshaller (Delete_Event'Access) ); Handlers.Connect ( Window, "destroy", Handlers.To_Marshaller (Destroy'Access) ); Handlers.Connect ( Button, "clicked", Handlers.To_Marshaller (Clicked'Access) ); Show_All (Grid); Show (Window); Gtk.Main.Main; end Graphic_Input;
26.123457
90
0.651701
06c1177aa668b06b466f52969c360a38dbdc49cb
2,866
ads
Ada
src/mqtt.ads
jpuente/Temperature_Sensor
f69aef1d7119114183f8dea2c8d09906e11bcac5
[ "BSD-3-Clause" ]
null
null
null
src/mqtt.ads
jpuente/Temperature_Sensor
f69aef1d7119114183f8dea2c8d09906e11bcac5
[ "BSD-3-Clause" ]
null
null
null
src/mqtt.ads
jpuente/Temperature_Sensor
f69aef1d7119114183f8dea2c8d09906e11bcac5
[ "BSD-3-Clause" ]
null
null
null
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2017, Universidad Politécnica de Madrid -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ -- MQTT client with GNAT.Sockets; use GNAT.Sockets; with GNAT.Sockets.MQTT; use GNAT.Sockets.MQTT; package MQTT is Server_Name : constant String := "xxx.dit.upm.es"; Client_Name : constant String := "xxx"; Port : constant GNAT.Sockets.Port_Type := 1883; QoS : QoS_Level := Exactly_Once; Topic_Text : constant String := "test/temperature"; procedure Publish (Message_Text : String); end MQTT;
59.708333
78
0.52582
fb29a08a3846d016b489b06e94fc6295591bb4a0
3,276
adb
Ada
regtests/wiki-filters-html-tests.adb
jquorning/ada-wiki
21dcbeb3897499ee4b4a85353f8a782e154c0a43
[ "Apache-2.0" ]
18
2015-10-26T21:32:08.000Z
2021-11-30T10:38:51.000Z
regtests/wiki-filters-html-tests.adb
jquorning/ada-wiki
21dcbeb3897499ee4b4a85353f8a782e154c0a43
[ "Apache-2.0" ]
2
2018-03-18T08:22:06.000Z
2022-02-16T22:15:05.000Z
regtests/wiki-filters-html-tests.adb
jquorning/ada-wiki
21dcbeb3897499ee4b4a85353f8a782e154c0a43
[ "Apache-2.0" ]
2
2019-04-05T17:10:34.000Z
2022-02-13T20:50:56.000Z
----------------------------------------------------------------------- -- wiki-filters-html-tests -- Unit tests for wiki HTML filters -- Copyright (C) 2015 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- 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.Test_Caller; with Util.Assertions; with Util.Strings; with Util.Log.Loggers; package body Wiki.Filters.Html.Tests is Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Wiki.Filters"); package Caller is new Util.Test_Caller (Test, "Wikis.Filters.Html"); procedure Assert_Equals is new Util.Assertions.Assert_Equals_T (Html_Tag); procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test Wiki.Filters.Html.Find_Tag", Test_Find_Tag'Access); end Add_Tests; -- ------------------------------ -- Test Find_Tag operation. -- ------------------------------ procedure Test_Find_Tag (T : in out Test) is begin for I in Html_Tag'Range loop declare Name : constant String := Html_Tag'Image (I); Wname : constant Wide_Wide_String := Html_Tag'Wide_Wide_Image (I); Pos : constant Natural := Util.Strings.Index (Name, '_'); Tname : constant Wide_Wide_String := Wname (Wname'First .. Pos - 1); Tag : constant Html_Tag := Find_Tag (Tname); begin Log.Info ("Checking tag {0}", Name); if I /= ROOT_HTML_TAG then Assert_Equals (T, I, Tag, "Find_Tag failed"); end if; Assert_Equals (T, UNKNOWN_TAG, Find_Tag (Tname & "x"), "Find_Tag must return UNKNOWN_TAG"); for K in Tname'Range loop if K = Tname'First then Assert_Equals (T, UNKNOWN_TAG, Find_Tag ("_" & Tname (Tname'First + 1 .. Tname'Last)), "Find_Tag must return UNKNOWN_TAG"); elsif K = Tname'Last then Assert_Equals (T, UNKNOWN_TAG, Find_Tag (Tname (Tname'First .. K - 1) & "_"), "Find_Tag must return UNKNOWN_TAG"); else Assert_Equals (T, UNKNOWN_TAG, Find_Tag (Tname (Tname'First .. K - 1) & "_" & Tname (K + 1 .. Tname'Last)), "Find_Tag must return UNKNOWN_TAG"); end if; end loop; end; end loop; end Test_Find_Tag; end Wiki.Filters.Html.Tests;
40.444444
88
0.544872