home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / amiga / programm / 17742 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  1.0 KB

  1. Path: sparky!uunet!mcsun!news.funet.fi!funic!sauna.cs.hut.fi!news.cs.hut.fi!too
  2. From: too@cardhu.cs.hut.fi (Tomi Ollila)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: What is htonl() ?
  5. Date: 23 Dec 92 15:46:43
  6. Organization: /u/users10/too/.organization
  7. Lines: 17
  8. Distribution: world
  9. Message-ID: <TOO.92Dec23154643@cardhu.cs.hut.fi>
  10. References: <72250@cup.portal.com>
  11. NNTP-Posting-Host: cardhu.cs.hut.fi
  12. In-reply-to: Counsellor@cup.portal.com's message of Tue, 22 Dec 92 23:10:38 PST
  13.  
  14. In article <72250@cup.portal.com> Counsellor@cup.portal.com (Benjamin Counsellor Reich) writes:
  15.  
  16.    I am stumped by one line of code:
  17.  
  18.     *lmark = htonl(*lmark);
  19.  
  20. that function (Macro) return 32 bit value of its host byte order value in
  21. network byte order. because 680x0 processor uses network byte order in 16
  22. and 32 bit values (LITTLE ENDIAN) , that function is implemented as macro
  23. whis does no conversion:
  24.  
  25. #define htonl(x)    (x).
  26.  
  27. .. in that case you couild just remove the line and reduce a few cycles
  28. from execution time, but it would cause combabitily problems.
  29.  
  30. Tomi
  31.