help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: htonl() htons()


From: Hans Aberg
Subject: Re: htonl() htons()
Date: Tue, 22 Oct 2002 11:48:13 +0200

At 19:56 -0400 2002/10/21, John Millaway wrote:
>> I tried to compile this using my rather old CW pro 5 compiler for MacOS
>>pre-X:
>>
>> What are
>>   htonl() in yytbl_write32()
>>   htons() in yytbl_write16()
>> supposed to do (both in tables.c)? -- They have no prototypes and so not
>> appear elsewhere in the sources.
>
>They convert integers in host byte-order to network byte-order. (This
>way, the serialized DFA tables are portable.) On Intel platforms, some
>byte rearranging occurs. On other platforms, these are no-ops.
>
>htonl="host to network long"
>htons="... short".

>From your description I surmise one can replace them with the identity, and
the code will work.

Does anybody know what should they be on Motorola RISC CPU's?

  Hans Aberg






reply via email to

[Prev in Thread] Current Thread [Next in Thread]