home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Graphics / Graphics.zip / xfitsvew.zip / XFITSview / fitssubs / zsubs.h < prev   
C/C++ Source or Header  |  1998-04-02  |  2KB  |  54 lines

  1. /*  zsub header  */ 
  2. /*  This module contains machine specific routines such as data type  
  3.     conversion.  Note: many of these can be inlined using the macroes in 
  4.     zconvrt.h  */ 
  5. /*-----------------------------------------------------------------------
  6. *  Copyright (C) 1996,1998
  7. *  Associated Universities, Inc. Washington DC, USA.
  8. *  This program is free software; you can redistribute it and/or
  9. *  modify it under the terms of the GNU General Public License as
  10. *  published by the Free Software Foundation; either version 2 of
  11. *  the License, or (at your option) any later version.
  12. *
  13. *  This program is distributed in the hope that it will be useful,
  14. *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. *  GNU General Public License for more details.
  17. *-----------------------------------------------------------------------*/
  18. #include "mydefs.h" 
  19. #ifndef ZSUBS_H 
  20. #define ZSUBS_H 
  21.   
  22. /* Error message */ 
  23. void ErrorMess(char* message); 
  24.   
  25. /*   Translation of FITS data types  */ 
  26. /* 16 bit to Integer  */ 
  27. Integer zi16il (short in); 
  28.   
  29. /* 32 bit to Integer  */ 
  30. Integer zi32il (Integer in); 
  31.   
  32. /* 32 bit IEEE to float  */ 
  33. /*  NOTE: accepts input as long to avoid arithmetic problems  */ 
  34. float zr32rl (Integer in); 
  35.   
  36. /* 64 bit IEEE to double  */ 
  37. double zd64dl (double out); 
  38.   
  39. /* Integer to 16 bit  */ 
  40. short zili16l (Integer in); 
  41.   
  42. /* Integer to 32 bit  */ 
  43. Integer zili32 (Integer in); 
  44.   
  45. /* float to 32 bit IEEE  */ 
  46. /* NOTE: returns long to avoid arithmetic problems  */ 
  47. Integer zrlr32 (float out); 
  48.   
  49. /* double to 64 bit IEEE  */ 
  50. double zdld64 (double out); 
  51.  
  52. #endif /* ZSUBS_H */ 
  53.   
  54.