/* $XConsortium: UnswDecon.ci,v 5.2 91/02/16 09:57:45 rws Exp $ */

/***********************************************************
Copyright 1989, 1990, 1991 by Sun Microsystems, Inc. and the X Consortium.

                        All Rights Reserved

Permission to use, copy, modify, and distribute this software and its 
documentation for any purpose and without fee is hereby granted, 
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in 
supporting documentation, and that the names of Sun Microsystems,
the X Consortium, and MIT not be used in advertising or publicity 
pertaining to distribution of the software without specific, written 
prior permission.  

SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT 
SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.

******************************************************************/


/* Copyright 1988-1991
 * Center for Information Technology Integration (CITI)
 * Information Technology Division
 * University of Michigan
 * Ann Arbor, Michigan
 *
 *                         All Rights Reserved
 * 
 * Permission to use, copy, modify, and distribute this software and
 * its documentation for any purpose and without fee is hereby
 * granted, provided that the above copyright notice appear in all
 * copies and that both that copyright notice and this permission
 * notice appear in supporting documentation, and that the names of
 * CITI or THE UNIVERSITY OF MICHIGAN not be used in advertising or
 * publicity pertaining to distribution of the software without
 * specific, written prior permission.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS." CITI AND THE UNIVERSITY OF
 * MICHIGAN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
 * NO EVENT SHALL CITI OR THE UNIVERSITY OF MICHIGAN BE LIABLE FOR ANY
 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 * SOFTWARE.
 */

/*
 * Here we want to float convert AND byte swap
 * the packet.  Operators are defined accordingly.
 */

#ifdef SWAP_FUNC_PREFIX
#undef SWAP_FUNC_PREFIX	
#undef SWAP_FUNC_PEX_PFX	
#undef NO_FLOATS	
#undef NO_CONVERSIONS 	
#undef NO_SWAP
#undef SWAPINT_C
#undef SWAPSHORT_C
#undef SWAPFLOAT_C

#undef pSWAPINT_C
#undef pSWAPSHORT_C
#undef pSWAPFLOAT_C

#undef SWAPFLOAT
#undef SWAPSHORT
#undef SWAPINT

#undef pSWAPFLOAT
#undef pSWAPSHORT
#undef pSWAPINT
#endif

#if defined (__STDC__)
#define SWAP_FUNC_PREFIX(nm)	ud##nm
#define SWAP_FUNC_PEX_PFX(nm)	udPEX##nm
#else
#define SWAP_FUNC_PREFIX(nm)	ud/**/nm
#define SWAP_FUNC_PEX_PFX(nm)	udPEX/**/nm
#endif
 
#define NO_CONVERSIONS 	0
#define NO_FLOATS 	0
#define NO_SWAP		0
#define SWAPINT_C(x,y)	 swaplongc(x,y)
#define SWAPSHORT_C(x,y) swapshortc(x,y)
#define SWAPFLOAT_C(x,y) swapConvFloatc(x,y)

#define SWAPFLOAT(x,n)	swapConvFloat(x,n)
#define SWAPSHORT(x,n)	swapshort(x,n)
#define SWAPINT(x,n)	swaplong(x,n)

#define pSWAPINT_C(x,y)	  pswaplongc(x,y)
#define pSWAPSHORT_C(x,y) pswapshortc(x,y)
#define pSWAPFLOAT_C(x,y) pswapConvFloatc(x,y)

#define pSWAPFLOAT(x,n)	pswapConvFloat(x,n)
#define pSWAPSHORT(x,n)	pswapshort(x,n)
#define pSWAPINT(x,n)	pswaplong(x,n)
