00001 /* 00002 * gui - [gega user interface] the flexible solution for user interface problems 00003 * Copyright (C) 2002 Gergely Gati 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; version 2 of the License. 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 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 * 00018 * Gergely Gati 00019 * email: g.gati@freemail.hu 00020 * AIM screenname: GatiGergely 00021 * ICQ number: 93131690 00022 * 00023 */ 00024 /* endian.h */ 00025 #ifndef __ENDIAN_H 00026 #define __ENDIAN_H 00027 00028 #include "machine.h" 00029 #include "types.h" 00030 00031 #define ENDIAN_MACRO 00032 00033 #ifdef ENDIAN_MACRO 00034 #define endian_ToAlien32(v) ((v>>24)|((v>>16)&0xff)|((v>>8)&0xff)|(v&0xff)) 00035 #define endian_FromAlien32(v) ((v>>24)|((v>>16)&0xff)|((v>>8)&0xff)|(v&0xff)) 00036 #define endian_ToAlien16(v) ((v>>8)|(v&0xff)) 00037 #define endian_FromAlien16(v) ((v>>8)|(v&0xff)) 00038 #endif /* ENDIAN_MACRO */ 00039 00040 #ifndef ENDIAN_MACRO 00041 u32 endian_ToAlien32(u32 v); 00042 u32 endian_FromAlien32(u32 v); 00043 u16 endian_ToAlien16(u32 v); 00044 u16 endian_FromAlien16(u16 v); 00045 #endif /* ENDIAN_MACRO */ 00046 00047 #endif
1.2.14 written by Dimitri van Heesch,
© 1997-2002