• Skip to content
  • Skip to link menu
KDE 4.5 API Reference
  • KDE API Reference
  • KDE Support
  • Sitemap
  • Contact Us
 

kdewin

byteswap.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2007 Ralf Habacker <ralf.habacker@freenet.de>
00003 
00004    This program is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this program; see the file COPYING.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017    Boston, MA 02110-1301, USA.
00018 */
00019 #ifndef KDE_BYTESWAP_H
00020 #define KDE_BYTESWAP_H
00021 
00022 #define bswap_16(x) (((x) << 8) & 0xff00) | (((x) >> 8 ) & 0xff)
00023 #define bswap_32(x) (((x) << 24) & 0xff000000)  \
00024                     | (((x) << 8) & 0xff0000)   \
00025                     | (((x) >> 8) & 0xff00)     \
00026                     | (((x) >> 24) & 0xff )
00027 #define bswap_64(x) ((((x) & 0xff00000000000000ull) >> 56) \
00028                     | (((x) & 0x00ff000000000000ull) >> 40) \
00029                     | (((x) & 0x0000ff0000000000ull) >> 24) \
00030                     | (((x) & 0x000000ff00000000ull) >> 8) \
00031                     | (((x) & 0x00000000ff000000ull) << 8) \
00032                     | (((x) & 0x0000000000ff0000ull) << 24) \
00033                     | (((x) & 0x000000000000ff00ull) << 40) \
00034                     | (((x) & 0x00000000000000ffull) << 56))
00035 
00036 #endif 

kdewin

Skip menu "kdewin"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

KDE Support

Skip menu "KDE Support"
  • akonadi
  • attica
  • grantlee
  • kdewin
  • polkit-qt
  • polkit-qt-1
  • qca
  • qimageblitz
  • soprano
  •       searchclient
Generated for KDE Support by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal