On portable C programming

Jerry Feldman gaf at blu.org
Sat Jan 10 09:20:25 EST 2009


yes. I may have used some of your stuff at Digital or HP.

On 01/09/2009 10:52 AM, Jim Kuzdrall wrote:
>     Yes, it has been quite a problem over the years.  I have been 
> designing and programming computers since 1960, mostly at the ALU and 
> binary data level, where format is critical.
>
>     The functions I created addressed, in a very elegant way, the very 
> problems you speak of.  They have been republished a number of times.  
> They are extremely fast.
>
>     The algorithm is elegant in that the C code for these functions is 
> exactly the same regardless of what computer or compiler is used.  
> There are no header entries or #ifdef telling the code that the host is 
> big endian, or BCD, or 1's compliment, or IEEE float.  No knowledge 
> about the host system's numeric format need be known.  None at all.  
> Yet, the functions always compile and do their job correctly, whether 
> storing the data or fetching the data.
>
>     I was well aware of ASCII transfer and the algorithms for converting 
> one stored format to another when I wrote the functions in the 1980's.  
> I wanted code that my programmers didn't have to fiddle with when 
> porting to one of the many new processors and systems emerging.  It 
> also had to be lightning fast, because the data libraries were large 
> and the processor MIPS were low.
>
>     As with most programs that dig down so far into bit-wise formats, 
> this one requires some background to understand.  It has been tested on 
> many processors and operating systems, but it never had a big company 
> behind it to push for more universal application.  To late now.
>
>     (Incidently, the pointer array I mentioned in an earlier post is not 
> needed.  The programs can read and write data directly to the host's 
> structs.) 
>
>   


-- 
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix
PGP key id: 537C5846
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB  CA3B 4607 4319 537C 5846


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20090110/d61ca2f6/attachment.bin 


More information about the gnhlug-discuss mailing list