home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / extensions / server / PEX / include / UnswDecon.ci < prev    next >
Encoding:
Text File  |  1991-02-15  |  3.7 KB  |  110 lines

  1. /* $XConsortium: UnswDecon.ci,v 5.2 91/02/16 09:57:45 rws Exp $ */
  2.  
  3. /***********************************************************
  4. Copyright 1989, 1990, 1991 by Sun Microsystems, Inc. and the X Consortium.
  5.  
  6.                         All Rights Reserved
  7.  
  8. Permission to use, copy, modify, and distribute this software and its 
  9. documentation for any purpose and without fee is hereby granted, 
  10. provided that the above copyright notice appear in all copies and that
  11. both that copyright notice and this permission notice appear in 
  12. supporting documentation, and that the names of Sun Microsystems,
  13. the X Consortium, and MIT not be used in advertising or publicity 
  14. pertaining to distribution of the software without specific, written 
  15. prior permission.  
  16.  
  17. SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
  18. INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT 
  19. SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 
  20. DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  21. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  22. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  23. SOFTWARE.
  24.  
  25. ******************************************************************/
  26.  
  27.  
  28. /* Copyright 1988-1991
  29.  * Center for Information Technology Integration (CITI)
  30.  * Information Technology Division
  31.  * University of Michigan
  32.  * Ann Arbor, Michigan
  33.  *
  34.  *                         All Rights Reserved
  35.  * 
  36.  * Permission to use, copy, modify, and distribute this software and
  37.  * its documentation for any purpose and without fee is hereby
  38.  * granted, provided that the above copyright notice appear in all
  39.  * copies and that both that copyright notice and this permission
  40.  * notice appear in supporting documentation, and that the names of
  41.  * CITI or THE UNIVERSITY OF MICHIGAN not be used in advertising or
  42.  * publicity pertaining to distribution of the software without
  43.  * specific, written prior permission.
  44.  * 
  45.  * THE SOFTWARE IS PROVIDED "AS IS." CITI AND THE UNIVERSITY OF
  46.  * MICHIGAN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  47.  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
  48.  * NO EVENT SHALL CITI OR THE UNIVERSITY OF MICHIGAN BE LIABLE FOR ANY
  49.  * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  50.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
  51.  * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
  52.  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  53.  * SOFTWARE.
  54.  */
  55.  
  56. /*
  57.  * Here we want to float convert AND byte swap
  58.  * the packet.  Operators are defined accordingly.
  59.  */
  60.  
  61. #ifdef SWAP_FUNC_PREFIX
  62. #undef SWAP_FUNC_PREFIX    
  63. #undef SWAP_FUNC_PEX_PFX    
  64. #undef NO_FLOATS    
  65. #undef NO_CONVERSIONS     
  66. #undef NO_SWAP
  67. #undef SWAPINT_C
  68. #undef SWAPSHORT_C
  69. #undef SWAPFLOAT_C
  70.  
  71. #undef pSWAPINT_C
  72. #undef pSWAPSHORT_C
  73. #undef pSWAPFLOAT_C
  74.  
  75. #undef SWAPFLOAT
  76. #undef SWAPSHORT
  77. #undef SWAPINT
  78.  
  79. #undef pSWAPFLOAT
  80. #undef pSWAPSHORT
  81. #undef pSWAPINT
  82. #endif
  83.  
  84. #if defined (__STDC__)
  85. #define SWAP_FUNC_PREFIX(nm)    ud##nm
  86. #define SWAP_FUNC_PEX_PFX(nm)    udPEX##nm
  87. #else
  88. #define SWAP_FUNC_PREFIX(nm)    ud/**/nm
  89. #define SWAP_FUNC_PEX_PFX(nm)    udPEX/**/nm
  90. #endif
  91.  
  92. #define NO_CONVERSIONS     0
  93. #define NO_FLOATS     0
  94. #define NO_SWAP        0
  95. #define SWAPINT_C(x,y)     swaplongc(x,y)
  96. #define SWAPSHORT_C(x,y) swapshortc(x,y)
  97. #define SWAPFLOAT_C(x,y) swapConvFloatc(x,y)
  98.  
  99. #define SWAPFLOAT(x,n)    swapConvFloat(x,n)
  100. #define SWAPSHORT(x,n)    swapshort(x,n)
  101. #define SWAPINT(x,n)    swaplong(x,n)
  102.  
  103. #define pSWAPINT_C(x,y)      pswaplongc(x,y)
  104. #define pSWAPSHORT_C(x,y) pswapshortc(x,y)
  105. #define pSWAPFLOAT_C(x,y) pswapConvFloatc(x,y)
  106.  
  107. #define pSWAPFLOAT(x,n)    pswapConvFloat(x,n)
  108. #define pSWAPSHORT(x,n)    pswapshort(x,n)
  109. #define pSWAPINT(x,n)    pswaplong(x,n)
  110.