C Standard Library Extensions  6.2.0
qfits_byteswap.h
1 /* $Id: qfits_byteswap.h,v 1.1.1.1 2008-11-03 13:40:49 agabasch Exp $
2  *
3  * This file is part of the ESO QFITS Library
4  * Copyright (C) 2001-2004 European Southern Observatory
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 
21 /*
22  * $Author: agabasch $
23  * $Date: 2008-11-03 13:40:49 $
24  * $Revision: 1.1.1.1 $
25  * $Name: not supported by cvs2svn $
26  */
27 
28 #ifndef QFITS_BYTESWAP_H
29 #define QFITS_BYTESWAP_H
30 
31 /*-----------------------------------------------------------------------------
32  Includes
33  -----------------------------------------------------------------------------*/
34 
35 #include <stdlib.h>
36 
37 /*-----------------------------------------------------------------------------
38  Function ANSI C prototypes
39  -----------------------------------------------------------------------------*/
40 
41 unsigned short qfits_swap_bytes_16(unsigned short w);
42 unsigned int qfits_swap_bytes_32(unsigned int dw);
43 void qfits_swap_bytes(void * p, int s);
44 
45 #endif
unsigned short qfits_swap_bytes_16(unsigned short w)
Swap a 16-bit number.
Definition: qfits_byteswap.c:63
void qfits_swap_bytes(void *p, int s)
Swaps bytes in a variable of given size.
Definition: qfits_byteswap.c:97
unsigned int qfits_swap_bytes_32(unsigned int dw)
Swap a 32-bit number.
Definition: qfits_byteswap.c:79