From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1ea59bb198e88f9f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!wns13feed!worldnet.att.net!attbi_s02.POSTED!53ab2750!not-for-mail From: "Jeff C r e e.m" Newsgroups: comp.lang.ada References: Subject: Re: GNAT Ada.Streams Bug? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response Message-ID: NNTP-Posting-Host: 24.147.74.171 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s02 1101411628 24.147.74.171 (Thu, 25 Nov 2004 19:40:28 GMT) NNTP-Posting-Date: Thu, 25 Nov 2004 19:40:28 GMT Organization: Comcast Online Date: Thu, 25 Nov 2004 19:40:32 GMT Xref: g2news1.google.com comp.lang.ada:6477 Date: 2004-11-25T19:40:32+00:00 List-Id: "Warren W. Gay VE3WWG" wrote in message news:fOopd.59177$Le1.1221311@news20.bellglobal.com... > This is on gnat-3.14p on debian (debian's package library doesn't > seem to provide 3.15p), so this may be fixed by now: > > I am running into a Ada.Streams problem with 24 bit values (3 bytes). > For example, if you use Ada.Streams to read in a partition table, > defined as follows, with 3.14p, you'll read more bytes than needed > (thus messing things up): > These might be helpful http://groups.google.com/groups?hl=en&lr=&threadm=t3f6rg54jlkfee%40corp.supernews.com&rnum=2&prev=/groups%3Fq%3Dstreams%2Bcreem%2Bsize%26hl%3Den%26lr%3D%26selm%3Dt3f6rg54jlkfee%2540corp.supernews.com%26rnum%3D2 http://groups.google.com/groups?q=streams+creem+size&hl=en&lr=&selm=t739enmlcvuo2d%40corp.supernews.com&rnum=1 http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00270.TXT?rev=1.6 In any case, you can "work around" this and get more efficient code to boot by writing your own 'read and 'write for your record to read the whole "hunk" of data in at once (based on the 'size of the record in terms of stream elements).