[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Byte order conversions
From:       Thiago Macieira <thiago.macieira () kdemail ! net>
Date:       2004-10-27 12:58:59
Message-ID: 200410270959.07461.thiago.macieira () kdemail ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Szombathelyi György wrote:
>Is there anyone who knows convenient byte-order conversion functions in
>QT/kdelibs? If not, then what about adding some functions like
>{be2me,le2me,me2be,me2le}_{16,32,64) (prefixed with the usual 'K')?. As
>I browse through the code, every piece of code which requires this
>functionality implements its own solution, usually with ugly macros and
>#ifdef WORDS_BIGENDIAN conditionals.

htons, htonl, ntohs, ntohl should do the big-endian to machine-endian stuff. 

-- 
  Thiago Macieira  -  Registered Linux user #65028
   thiago (AT) macieira (DOT) info
    ICQ UIN: 1967141   PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

[Attachment #5 (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic