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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6353697ffeb79d16 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!q18g2000vbm.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Encapsulating Ada.Direct_IO Date: Thu, 18 Nov 2010 11:48:49 -0800 (PST) Organization: http://groups.google.com Message-ID: <0ce12623-198f-42e6-a30a-8e2cb77947be@q18g2000vbm.googlegroups.com> References: <5ba4147a-6099-4a05-b548-09544f58247a@j18g2000yqd.googlegroups.com> <162dnSHurcNcEHnRRVn_vwA@giganews.com> <2edbda42-28e8-462c-9005-eda66538274b@p11g2000vbn.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1290109729 27058 127.0.0.1 (18 Nov 2010 19:48:49 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 18 Nov 2010 19:48:49 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q18g2000vbm.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:15597 Date: 2010-11-18T11:48:49-08:00 List-Id: On Nov 18, 10:21=A0am, "Peter C. Chapin" wrote: > I'm thinking about the very common case when one is trying to read a > file that has a format defined by some third party. For example the > specification of the format might say, "The first octet of the header > defines the message type and can be one of the following values... The > type field is followed by a 24 bit length field in big endian form. The > body of the message follows the length field, and finally a 32 bit CRC > follows the message body." The problem is that this *definition* is not sufficient to tell you what an OS will stick in your memory buffer if you ask to read from such a file. You need additional OS-dependent information. -- Adam