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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1e67a7db835cf5a8 X-Google-Attributes: gid103376,public From: nahaj@u.cc.utah.edu (John Halleck) Subject: Re: Binary files vs Portablity vs Ada Date: 1999/11/05 Message-ID: <7vv1ag$k1a$1@coward.ks.cc.utah.edu>#1/1 X-Deja-AN: 544864629 References: <7vt67r$qv0$1@coward.ks.cc.utah.edu> <1999Nov4.212826.1@eisner> X-Complaints-To: abuse@cc.utah.edu X-Trace: coward.ks.cc.utah.edu 941820048 20522 155.99.2.3 (5 Nov 1999 16:40:48 GMT) Organization: University of Utah - ACLIS NNTP-Posting-Date: 5 Nov 1999 16:40:48 GMT Newsgroups: comp.lang.ada Date: 1999-11-05T16:40:48+00:00 List-Id: Larry Kilgallen (kilgallen@eisner.decus.org) wrote: : [...] nahaj@u.cc.utah.edu (John Halleck) writes: : > [...] : > It is not hard to do something that just grabs bytes from a file : > until done, but that assumes the file is some multiple of eight : > bits long, and that all data for the file is in the bytes returned. : > On machines like the Sperry 1100 series, the native word size is : > 36 bits (Usually chopped into four nine-bit bytes for Text use) : > And the file is "control word -> image" instead of "embeded : > control." : > : > Can this be done portabily? (I suspect not, but I'm not an Ada : > expert.) I have something that seems to work for PC's, Mac's, ***** : > and Unix boxes, but it bugs me that I don't know how to do it in : > any general way. : Does your Mac version do the resource fork or just the data fork ? (: Only Data :) The project was only to show a co-worker about some of the ease of doing things portably in Ada. It was not for a production product... : > [... good examples of other portablitity issues ommitted ...] : So hardware data size is not your only issue. True enough. For the purpose of getting the bits for a hash there are other issues which I would expect the Language Designers not to have addressed. For example, on many OS's, files can have unallocated regions within the body of the file. How does one handle that for a Hash? (Or even doing direct IO?) There are ugly issues everywhere. This discussion seems to be drifting from the "Do it in Ada" question to "Boy the world is ugly portablity wise." I'm more than willing to continue this thread in private email with all interested parties. : Larry Kilgallen