Subversion Repositories Kolibri OS

Rev

Rev 5191 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5191 Rev 6324
1
/* Alpha VMS external format of Descriptors.
1
/* Alpha VMS external format of Descriptors.
2
 
2
 
3
   Copyright 2010 Free Software Foundation, Inc.
3
   Copyright (C) 2010-2015 Free Software Foundation, Inc.
4
   Written by Tristan Gingold , AdaCore.
4
   Written by Tristan Gingold , AdaCore.
5
 
5
 
6
   This file is part of BFD, the Binary File Descriptor library.
6
   This file is part of BFD, the Binary File Descriptor library.
7
 
7
 
8
   This program is free software; you can redistribute it and/or modify
8
   This program is free software; you can redistribute it and/or modify
9
   it under the terms of the GNU General Public License as published by
9
   it under the terms of the GNU General Public License as published by
10
   the Free Software Foundation; either version 3 of the License, or
10
   the Free Software Foundation; either version 3 of the License, or
11
   (at your option) any later version.
11
   (at your option) any later version.
12
 
12
 
13
   This program is distributed in the hope that it will be useful,
13
   This program is distributed in the hope that it will be useful,
14
   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
   but WITHOUT ANY WARRANTY; without even the implied warranty of
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
   GNU General Public License for more details.
16
   GNU General Public License for more details.
17
 
17
 
18
   You should have received a copy of the GNU General Public License
18
   You should have received a copy of the GNU General Public License
19
   along with this program; if not, write to the Free Software
19
   along with this program; if not, write to the Free Software
20
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
20
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21
   MA 02110-1301, USA.  */
21
   MA 02110-1301, USA.  */
22
 
22
 
23
#ifndef _VMS_DSC_H
23
#ifndef _VMS_DSC_H
24
#define _VMS_DSC_H
24
#define _VMS_DSC_H
25
 
25
 
26
/* Descriptors.  */
26
/* Descriptors.  */
27
#define DSC__K_DTYPE_Z	  0 /* Unspecified.  */
27
#define DSC__K_DTYPE_Z	  0 /* Unspecified.  */
28
#define DSC__K_DTYPE_V	  1 /* Bit.  */
28
#define DSC__K_DTYPE_V	  1 /* Bit.  */
29
#define DSC__K_DTYPE_BU   2 /* Byte logical.  */
29
#define DSC__K_DTYPE_BU   2 /* Byte logical.  */
30
#define DSC__K_DTYPE_WU   3 /* Word logical.  */
30
#define DSC__K_DTYPE_WU   3 /* Word logical.  */
31
#define DSC__K_DTYPE_LU   4 /* Longword logical.  */
31
#define DSC__K_DTYPE_LU   4 /* Longword logical.  */
32
#define DSC__K_DTYPE_QU   5 /* Quadword logical.  */
32
#define DSC__K_DTYPE_QU   5 /* Quadword logical.  */
33
#define DSC__K_DTYPE_B    6 /* Byte integer.  */
33
#define DSC__K_DTYPE_B    6 /* Byte integer.  */
34
#define DSC__K_DTYPE_W    7 /* Word integer.  */
34
#define DSC__K_DTYPE_W    7 /* Word integer.  */
35
#define DSC__K_DTYPE_L    8 /* Longword integer.  */
35
#define DSC__K_DTYPE_L    8 /* Longword integer.  */
36
#define DSC__K_DTYPE_Q    9 /* Quadword integer.  */
36
#define DSC__K_DTYPE_Q    9 /* Quadword integer.  */
37
#define DSC__K_DTYPE_F   10 /* Single-precision floating.  */
37
#define DSC__K_DTYPE_F   10 /* Single-precision floating.  */
38
#define DSC__K_DTYPE_D   11 /* Double-precision floating.  */
38
#define DSC__K_DTYPE_D   11 /* Double-precision floating.  */
39
#define DSC__K_DTYPE_FC  12 /* Complex.  */
39
#define DSC__K_DTYPE_FC  12 /* Complex.  */
40
#define DSC__K_DTYPE_DC  13 /* Double-precision Complex.  */
40
#define DSC__K_DTYPE_DC  13 /* Double-precision Complex.  */
41
#define DSC__K_DTYPE_T   14 /* ASCII text string.  */
41
#define DSC__K_DTYPE_T   14 /* ASCII text string.  */
42
#define DSC__K_DTYPE_NU  15 /* Numeric string, unsigned.  */
42
#define DSC__K_DTYPE_NU  15 /* Numeric string, unsigned.  */
43
#define DSC__K_DTYPE_NL  16 /* Numeric string, left separate sign.  */
43
#define DSC__K_DTYPE_NL  16 /* Numeric string, left separate sign.  */
44
#define DSC__K_DTYPE_NLO 17 /* Numeric string, left overpunched sign.  */
44
#define DSC__K_DTYPE_NLO 17 /* Numeric string, left overpunched sign.  */
45
#define DSC__K_DTYPE_NR  18 /* Numeric string, right separate sign.  */
45
#define DSC__K_DTYPE_NR  18 /* Numeric string, right separate sign.  */
46
#define DSC__K_DTYPE_NRO 19 /* Numeric string, right overpunched sign.  */
46
#define DSC__K_DTYPE_NRO 19 /* Numeric string, right overpunched sign.  */
47
#define DSC__K_DTYPE_NZ  20 /* Numeric string, zoned sign.  */
47
#define DSC__K_DTYPE_NZ  20 /* Numeric string, zoned sign.  */
48
#define DSC__K_DTYPE_P   21 /* Packed decimal string.  */
48
#define DSC__K_DTYPE_P   21 /* Packed decimal string.  */
49
#define DSC__K_DTYPE_ZI  22 /* Sequence of instructions.  */
49
#define DSC__K_DTYPE_ZI  22 /* Sequence of instructions.  */
50
#define DSC__K_DTYPE_ZEM 23 /* Procedure entry mask.  */
50
#define DSC__K_DTYPE_ZEM 23 /* Procedure entry mask.  */
51
#define DSC__K_DTYPE_DSC 24 /* Descriptor, used for arrays of dyn strings.  */
51
#define DSC__K_DTYPE_DSC 24 /* Descriptor, used for arrays of dyn strings.  */
52
#define DSC__K_DTYPE_OU  25 /* Octaword logical.  */
52
#define DSC__K_DTYPE_OU  25 /* Octaword logical.  */
53
#define DSC__K_DTYPE_O   26 /* Octaword integer.  */
53
#define DSC__K_DTYPE_O   26 /* Octaword integer.  */
54
#define DSC__K_DTYPE_G   27 /* Double precision G floating, 64 bit.  */
54
#define DSC__K_DTYPE_G   27 /* Double precision G floating, 64 bit.  */
55
#define DSC__K_DTYPE_H   28 /* Quadruple precision floating, 128 bit.  */
55
#define DSC__K_DTYPE_H   28 /* Quadruple precision floating, 128 bit.  */
56
#define DSC__K_DTYPE_GC  29 /* Double precision complex, G floating.  */
56
#define DSC__K_DTYPE_GC  29 /* Double precision complex, G floating.  */
57
#define DSC__K_DTYPE_HC  30 /* Quadruple precision complex, H floating.  */
57
#define DSC__K_DTYPE_HC  30 /* Quadruple precision complex, H floating.  */
58
#define DSC__K_DTYPE_CIT 31 /* COBOL intermediate temporary.  */
58
#define DSC__K_DTYPE_CIT 31 /* COBOL intermediate temporary.  */
59
#define DSC__K_DTYPE_BPV 32 /* Bound Procedure Value.  */
59
#define DSC__K_DTYPE_BPV 32 /* Bound Procedure Value.  */
60
#define DSC__K_DTYPE_BLV 33 /* Bound Label Value.  */
60
#define DSC__K_DTYPE_BLV 33 /* Bound Label Value.  */
61
#define DSC__K_DTYPE_VU  34 /* Bit Unaligned.  */
61
#define DSC__K_DTYPE_VU  34 /* Bit Unaligned.  */
62
#define DSC__K_DTYPE_ADT 35 /* Absolute Date-Time.  */
62
#define DSC__K_DTYPE_ADT 35 /* Absolute Date-Time.  */
63
#define DSC__K_DTYPE_VT  37 /* Varying Text.  */
63
#define DSC__K_DTYPE_VT  37 /* Varying Text.  */
64
#define DSC__K_DTYPE_T2  38 /* 16-bit char.  */
64
#define DSC__K_DTYPE_T2  38 /* 16-bit char.  */
65
#define DSC__K_DTYPE_VT2 39 /* 16-bit varying char.  */
65
#define DSC__K_DTYPE_VT2 39 /* 16-bit varying char.  */
66
 
66
 
67
#define DSC__K_CLASS_S     1 /* Fixed-length scalar/string.  */
67
#define DSC__K_CLASS_S     1 /* Fixed-length scalar/string.  */
68
#define DSC__K_CLASS_D     2 /* Dynamic string.  */
68
#define DSC__K_CLASS_D     2 /* Dynamic string.  */
69
#define DSC__K_CLASS_V     3 /* Reserved.  */
69
#define DSC__K_CLASS_V     3 /* Reserved.  */
70
#define DSC__K_CLASS_A     4 /* Contiguous array.  */
70
#define DSC__K_CLASS_A     4 /* Contiguous array.  */
71
#define DSC__K_CLASS_P     5 /* Procedure argument descriptor.  */
71
#define DSC__K_CLASS_P     5 /* Procedure argument descriptor.  */
72
#define DSC__K_CLASS_PI    6 /* Procedure incarnation descriptor.  */
72
#define DSC__K_CLASS_PI    6 /* Procedure incarnation descriptor.  */
73
#define DSC__K_CLASS_J     7 /* Reserved.  */
73
#define DSC__K_CLASS_J     7 /* Reserved.  */
74
#define DSC__K_CLASS_JI    8 /* Obsolete.  */
74
#define DSC__K_CLASS_JI    8 /* Obsolete.  */
75
#define DSC__K_CLASS_SD    9 /* Decimal (scalar) string.  */
75
#define DSC__K_CLASS_SD    9 /* Decimal (scalar) string.  */
76
#define DSC__K_CLASS_NCA  10 /* Non-contiguous array.  */
76
#define DSC__K_CLASS_NCA  10 /* Non-contiguous array.  */
77
#define DSC__K_CLASS_VS   11 /* Varying string.  */
77
#define DSC__K_CLASS_VS   11 /* Varying string.  */
78
#define DSC__K_CLASS_VSA  12 /* Varying string array.  */
78
#define DSC__K_CLASS_VSA  12 /* Varying string array.  */
79
#define DSC__K_CLASS_UBS  13 /* Unaligned bit string.  */
79
#define DSC__K_CLASS_UBS  13 /* Unaligned bit string.  */
80
#define DSC__K_CLASS_UBA  14 /* Unaligned bit array.  */
80
#define DSC__K_CLASS_UBA  14 /* Unaligned bit array.  */
81
#define DSC__K_CLASS_SB   15 /* String with bounds.  */
81
#define DSC__K_CLASS_SB   15 /* String with bounds.  */
82
#define DSC__K_CLASS_UBSB 16 /* Unaligned bit string with bounds.  */
82
#define DSC__K_CLASS_UBSB 16 /* Unaligned bit string with bounds.  */
83
 
83
 
84
/* Common part.  */
84
/* Common part.  */
85
 
85
 
86
struct vms_dsc
86
struct vms_dsc
87
{
87
{
88
  unsigned char length[2];
88
  unsigned char length[2];
89
  unsigned char dtype;
89
  unsigned char dtype;
90
  unsigned char bclass;
90
  unsigned char bclass;
91
  unsigned char pointer[4];
91
  unsigned char pointer[4];
92
};
92
};
93
 
93
 
94
struct vms_dsc64
94
struct vms_dsc64
95
{
95
{
96
  unsigned char mbo[2];
96
  unsigned char mbo[2];
97
  unsigned char dtype;
97
  unsigned char dtype;
98
  unsigned char bclass;
98
  unsigned char bclass;
99
  unsigned char mbmo[4];
99
  unsigned char mbmo[4];
100
  unsigned char length[8];
100
  unsigned char length[8];
101
  unsigned char pointer[8];
101
  unsigned char pointer[8];
102
};
102
};
103
 
103
 
104
struct vms_dsc_nca
104
struct vms_dsc_nca
105
{
105
{
106
  unsigned char length[2];
106
  unsigned char length[2];
107
  unsigned char dtype;
107
  unsigned char dtype;
108
  unsigned char bclass;
108
  unsigned char bclass;
109
  unsigned char pointer[4];
109
  unsigned char pointer[4];
110
 
110
 
111
  unsigned char scale;
111
  unsigned char scale;
112
  unsigned char digits;
112
  unsigned char digits;
113
  unsigned char aflags;
113
  unsigned char aflags;
114
  unsigned char dimct;
114
  unsigned char dimct;
115
 
115
 
116
  unsigned char arsize[4];
116
  unsigned char arsize[4];
117
  unsigned char a0[4];
117
  unsigned char a0[4];
118
};
118
};
119
 
119
 
120
struct vms_dsc_ubs
120
struct vms_dsc_ubs
121
{
121
{
122
  unsigned char length[2];
122
  unsigned char length[2];
123
  unsigned char dtype;
123
  unsigned char dtype;
124
  unsigned char bclass;
124
  unsigned char bclass;
125
  unsigned char base[4];
125
  unsigned char base[4];
126
  unsigned char pos[4];
126
  unsigned char pos[4];
127
};
127
};
128
 
128
 
129
#endif /* _VMS_DSC_H */
129
#endif /* _VMS_DSC_H */