comp.lang.ada
 help / color / mirror / Atom feed
* Update of SAL
@ 2001-11-18 23:02 LeakyStain
  2001-11-20 12:07 ` Martin Dowie
  0 siblings, 1 reply; 4+ messages in thread
From: LeakyStain @ 2001-11-18 23:02 UTC (permalink / raw)


I've posted a new version of SAL to my website:

http://users.erols.com/leakstan/Stephe/Ada/sal.html 

There are a couple new packages, and the sorted tree now supports three
options for duplicate keys; error, allow, ignore.

Have fun!

-- Stephe



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Update of SAL
  2001-11-18 23:02 Update of SAL LeakyStain
@ 2001-11-20 12:07 ` Martin Dowie
  2001-11-20 12:24   ` Stephen Leake
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Dowie @ 2001-11-20 12:07 UTC (permalink / raw)


"LeakyStain" <leakstan@erols.com> wrote in message
news:3BF83DFF.52C85B1D@erols.com...
> I've posted a new version of SAL to my website:
>
> http://users.erols.com/leakstan/Stephe/Ada/sal.html
>
> There are a couple new packages, and the sorted tree now supports three
> options for duplicate keys; error, allow, ignore.

Got a quick URL to 'Endianness'? I'm sure I could regenerate
it to get the SAL to compile but if you have a quick link
that would obviously save some effort.

TIA





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Update of SAL
  2001-11-20 12:07 ` Martin Dowie
@ 2001-11-20 12:24   ` Stephen Leake
  2001-11-20 20:24     ` martin.m.dowie
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Leake @ 2001-11-20 12:24 UTC (permalink / raw)


"Martin Dowie" <martin.dowie@nospam.baesystems.com> writes:

> "LeakyStain" <leakstan@erols.com> wrote in message
> news:3BF83DFF.52C85B1D@erols.com...
> > I've posted a new version of SAL to my website:
> >
> > http://users.erols.com/leakstan/Stephe/Ada/sal.html
> >
> > There are a couple new packages, and the sorted tree now supports three
> > options for duplicate keys; error, allow, ignore.
> 
> Got a quick URL to 'Endianness'? I'm sure I could regenerate
> it to get the SAL to compile but if you have a quick link
> that would obviously save some effort.

Hmm. There seems to be a problem with my quality control!

I apparently added sal-gen-word_order_convert without adding a test
for it, so I never actually compiled it, so I didn't notice I left out
Endianness. Sigh.

Below is the version for GNAT on x86; this package is compiler and CPU
specific. Obviously, I should rename it to SAL.Endianness or
something.

Let me know if this doesn't work.

-- 
-- Stephe


--
-- Define constants to reflect hardware bit and word endianness in record
-- representation clauses. Obviously, this file is highly system-dependent.
--
with System;
package Endianness is
   pragma Pure;

   -- this is for gnat on an Intel 386 compatible processor
   System_Name : constant System.Name := System.SYSTEM_NAME_GNAT;

   Endianness_Error : exception;

   Bit_Order      : constant := 1; -- 1 or -1
   High_Bit_First : constant := 0; -- 0 or 1
   Low_Bit_First  : constant := 1; -- opposite of High_Bit_First
   LSBit          : constant := 0; -- 0 or 7 or 15 (for word machines)

   -- typical usage of these constants, to make record spec independent of
   -- bit-endianness:
   --
   --    for Foo_Type use record
   --       User_Ephemeris_Needed       at 0 range LSBit + Bit_Order * 0 .. LSBit + Bit_Order * 0;
   --
   --       Operational_Status          at 0 range
   --          Low_Bit_First  * (LSBit + Bit_Order * 4) + High_Bit_First * (LSBit + Bit_Order * 7) ..
   --          High_Bit_First * (LSBit + Bit_Order * 4) + Low_Bit_First  * (LSBit + Bit_Order * 7);
   --    end record;

   type Byte_Order_Type is (Big_Endian, Little_Endian);
   Byte_Order : constant Byte_Order_Type := Little_Endian;

end Endianness;



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Update of SAL
  2001-11-20 12:24   ` Stephen Leake
@ 2001-11-20 20:24     ` martin.m.dowie
  0 siblings, 0 replies; 4+ messages in thread
From: martin.m.dowie @ 2001-11-20 20:24 UTC (permalink / raw)


"Stephen Leake" <stephen.a.leake.1@gsfc.nasa.gov> wrote in message
news:uherpd3zk.fsf@gsfc.nasa.gov...
> "Martin Dowie" <martin.dowie@nospam.baesystems.com> writes:
>
[snip]
>
> Hmm. There seems to be a problem with my quality control!
>
> I apparently added sal-gen-word_order_convert without adding a test
> for it, so I never actually compiled it, so I didn't notice I left out
> Endianness. Sigh.
>
> Below is the version for GNAT on x86; this package is compiler and CPU
> specific. Obviously, I should rename it to SAL.Endianness or
> something.
>
> Let me know if this doesn't work.

cheers!





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-11-20 20:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-18 23:02 Update of SAL LeakyStain
2001-11-20 12:07 ` Martin Dowie
2001-11-20 12:24   ` Stephen Leake
2001-11-20 20:24     ` martin.m.dowie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox