~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to incl/fitscvb.h

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* @(#)fitscvb.h        19.1 (ESO-IPG) 02/25/03 13:49:30 */
 
2
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
3
.COPYRIGHT    (c)  1994   European Southern Observatory
 
4
.LANGUAGE     C
 
5
.IDENT        fitscvb.h
 
6
.AUTHOR       P.Grosbol   ESO/IPG
 
7
.KEYWORDS     data representation
 
8
.PURPOSE      define computers with different data formats
 
9
.VERSION      1.0   1991-Feb-07:  Creation (from datafmt.h),  PJG
 
10
.VERSION      1.1   1993-Oct-26:  Include 'fitsfmt.h',  PJG
 
11
.VERSION      1.2   1994-May-09:  Cast constants for ANSI-C,  PJG
 
12
--------------------------------------------------------------------*/
 
13
#include    <computer.h>           /* computer dependant constants  */
 
14
 
 
15
#ifndef  _FITSFMT
 
16
#include     <fitsfmt.h>
 
17
#endif
 
18
 
 
19
typedef  struct {
 
20
                  int            ifmt;   /* integer format          */
 
21
                  int           fpfmt;   /* floating point format   */
 
22
                  INT4            bos;   /* byte order for short    */
 
23
                  INT4            bol;   /* byte order for long     */
 
24
                  INT4            bof;   /* byte order for float    */
 
25
                  INT4            bod;   /* byte order for double   */
 
26
                } DFMT;
 
27
 
 
28
static struct {                     /* 32 and 64 bit IEEE exp. mask  */
 
29
                INT4   dummy;       /* dummy variable for alignment  */
 
30
                char   cd[4];
 
31
                char   cf[4];
 
32
              } FDMSK = {0,{0x7F,(char)0xF0,0x00,0x00},
 
33
                           {0x7F,(char)0x80,0x00,0x00}};
 
34
 
 
35
#define FPXM   (*(INT4 *)FDMSK.cf)         /* 32 bit IEEE exp. mask  */
 
36
#define DPXM   (*(INT4 *)FDMSK.cd)         /* 64 bit IEEE exp. mask  */
 
37
 
 
38
static  DFMT  cpu = { INTFMT, FLOATFMT, 
 
39
                      SWAPSHORT, SWAPINT, SWAPFLOAT, SWAPDOUBLE
 
40
                    };
 
41