casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
io.h
Go to the documentation of this file.
1 /************************************************************************/
2 /* */
3 /* A general header file for the various file and i/o handling */
4 /* routines. */
5 /* */
6 /* History: */
7 /* rjs Dark-ages Original version. */
8 /* rjs 20aug92 Correct "roundup" macro when rounding 0. */
9 /* rjs 15may96 Moved roundup macro elsewhere. */
10 /* pjt 28may02 Added H_INT8 */
11 /* pjt 17jun02 different MIR4 structures? */
12 /************************************************************************/
13 
14 /* Binary items start with a sequence to allow routines to blindly determine
15  how to read them. The "binary_item" is a catch all with only indicates
16  that the data is binary valued, but does not hint at the format. */
17 
18 #if !defined(MIR_IO_H)
19 #define MIR_IO_H
20 
21 #include "hio.h"
22 #include <unistd.h>
23 
24 #define ITEM_HDR_SIZE 4
25 
26 #if 1
27 
28 /* MIRIAD3 and below data structures */
29 
30 
31 static char binary_item[ITEM_HDR_SIZE] = {0,0,0,0},
39 
40 #else
41 
42 /* MIRIAD4 data structures - not finalized on this though */
43 
44 static char binary_item[ITEM_HDR_SIZE] = {1,0,0,0},
45  real_item[ITEM_HDR_SIZE] = {1,0,0,H_REAL},
46  int_item[ITEM_HDR_SIZE] = {1,0,0,H_INT},
47  int2_item[ITEM_HDR_SIZE] = {1,0,0,H_INT2},
48  int8_item[ITEM_HDR_SIZE] = {1,0,0,H_INT8},
49  char_item[ITEM_HDR_SIZE] = {1,0,0,H_BYTE},
50  dble_item[ITEM_HDR_SIZE] = {1,0,0,H_DBLE},
51  cmplx_item[ITEM_HDR_SIZE] = {1,0,0,H_CMPLX};
52 
53 
54 #endif
55 
56 #endif /* MIR_IO_H */
#define H_REAL
Definition: miriad.h:108
static char int_item[ITEM_HDR_SIZE]
Definition: io.h:33
#define H_BYTE
Definition: miriad.h:105
static char real_item[ITEM_HDR_SIZE]
Definition: io.h:32
static char int8_item[ITEM_HDR_SIZE]
Definition: io.h:35
#define H_INT8
Definition: miriad.h:112
static char cmplx_item[ITEM_HDR_SIZE]
Definition: io.h:38
static char char_item[ITEM_HDR_SIZE]
Definition: io.h:36
static char int2_item[ITEM_HDR_SIZE]
Definition: io.h:34
static char dble_item[ITEM_HDR_SIZE]
Definition: io.h:37
#define H_INT2
Definition: miriad.h:107
#define H_CMPLX
Definition: miriad.h:111
static char binary_item[ITEM_HDR_SIZE]
Definition: io.h:31
#define H_DBLE
Definition: miriad.h:109
#define H_INT
Definition: miriad.h:106
#define ITEM_HDR_SIZE
Definition: io.h:24