Subversion Repositories tendra.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
7 7u83 2
 * Copyright (c) 2002-2005 The TenDRA Project <http://www.tendra.org/>.
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions are met:
7
 *
8
 * 1. Redistributions of source code must retain the above copyright notice,
9
 *    this list of conditions and the following disclaimer.
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
11
 *    this list of conditions and the following disclaimer in the documentation
12
 *    and/or other materials provided with the distribution.
13
 * 3. Neither the name of The TenDRA Project nor the names of its contributors
14
 *    may be used to endorse or promote products derived from this software
15
 *    without specific, prior written permission.
16
 *
17
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
18
 * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
19
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
21
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22
 * EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
24
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
 *
29
 * $Id$
30
 */
31
/*
2 7u83 32
    		 Crown Copyright (c) 1997
33
 
34
    This TenDRA(r) Computer Program is subject to Copyright
35
    owned by the United Kingdom Secretary of State for Defence
36
    acting through the Defence Evaluation and Research Agency
37
    (DERA).  It is made available to Recipients with a
38
    royalty-free licence for its use, reproduction, transfer
39
    to other parties and amendment for any purpose not excluding
40
    product development provided that any such use et cetera
41
    shall be deemed to be acceptance of the following conditions:-
42
 
43
        (1) Its Recipients shall ensure that this Notice is
44
        reproduced upon any copies or amended versions of it;
45
 
46
        (2) Any amended version of it shall be clearly marked to
47
        show both the nature of and the organisation responsible
48
        for the relevant amendment or amendments;
49
 
50
        (3) Its onward transfer from a recipient to another
51
        party shall be deemed to be that party's acceptance of
52
        these conditions;
53
 
54
        (4) DERA gives no warranty or assurance as to its
55
        quality or suitability for any purpose and DERA accepts
56
        no liability whatsoever in relation to any use to which
57
        it may be put.
58
*/
59
 
60
 
61
/**********************************************************************
62
$Author: release $
63
$Date: 1998/01/17 15:55:45 $
64
$Revision: 1.1.1.1 $
65
$Log: read_sort.c,v $
66
 * Revision 1.1.1.1  1998/01/17  15:55:45  release
67
 * First version to be checked into rolling release.
68
 *
69
 * Revision 1.3  1997/12/04  19:50:03  pwe
70
 * ANDF-DE V1.9
71
 *
72
 * Revision 1.2  1997/08/23  13:30:52  pwe
73
 * no invert order, and initial ANDF-DE
74
 *
75
 * Revision 1.1  1995/04/06  10:43:34  currie
76
 * Initial revision
77
 *
78
***********************************************************************/
79
 
80
 
81
 
82
/* defines read_sort, which calls the decoder routine for the sort
83
   given by sn and delivers the result inserted into the union tokval */
84
 
85
 
86
#include "config.h"
87
#include "common_types.h"
88
#include "readglob.h"
89
#include "basicread.h"
90
#include "sortmacs.h"
91
#include "exp.h"
92
#include "expmacs.h"
93
#include "main_reads.h"
94
#include "externs.h"
95
#include "messages_r.h"
96
 
97
#include "read_sort.h"
98
 
7 7u83 99
tokval
100
read_sort(int sn)
2 7u83 101
{
102
  tokval v;
103
   switch (sn)
104
    {
105
      case ALIGNMENT_SORT:
106
        v.tk_alignment = d_alignment();
107
        break;
108
      case AL_TAG:
109
        v.tk_al_tag = d_al_tag();
110
        break;
111
      case BITFIELD_VARIETY:
112
        v.tk_bitfield_variety = d_bitfield_variety();
113
        break;
114
      case BOOL:
115
        v.tk_bool = d_bool();
116
        break;
117
      case ERROR_TREATMENT:
118
        v.tk_error_treatment = d_error_treatment();
119
        break;
120
      case EXP_S:
121
        v.tk_exp = d_exp();
122
        break;
123
      case FLOATING_VARIETY:
124
        v.tk_floating_variety = d_floating_variety();
125
        break;
126
      case LABEL:
127
        v.tk_label = d_label();
128
        break;
129
      case NAT:
130
        v.tk_nat = d_nat();
131
        break;
132
      case NTEST:
133
        v.tk_ntest = d_ntest();
134
        break;
135
      case ROUNDING_MODE:
136
        v.tk_rounding_mode = d_rounding_mode();
137
        break;
138
      case SHAPE:
139
        v.tk_shape = d_shape();
140
        break;
141
      case SIGNED_NAT:
142
        v.tk_signed_nat = d_signed_nat();
143
        break;
144
      case TAG:
145
        v.tk_tag = d_tag();
146
        break;
147
      case VARIETY:
148
        v.tk_variety = d_variety();
149
        break;
150
      case TOKEN:
151
        v.tk_token = d_token();
152
        break;
153
      case DIAG_TYPE_SORT:	/* OLD DIAGS */
154
	v.tk_diag_type = d_diag_type();
155
	break;
156
      case DIAG_FILENAME:	/* OLD DIAGS */
157
	v.tk_filename =  d_filename();
158
	break;
159
      case ACCESS_SORT:
160
        v.tk_access =  d_access();
161
        break;
162
       case TRANSFER_MODE_SORT:
163
        v.tk_transfer_mode =  d_transfer_mode();
164
        break;
165
       case PROCPROPS:
166
	v.tk_procprops = d_procprops();
167
	break;
168
       case STRING:
169
	v.tk_string = d_string();
170
	break;
171
       case DG_SORT:		/* NEW DIAGS */
172
	v.tk_dg = d_dg();
173
	break;
174
       case DG_DIM_SORT:	/* NEW DIAGS */
175
	v.tk_dg_dim = d_dg_dim();
176
	break;
177
       case DG_FILENAME_SORT:	/* NEW DIAGS */
178
	v.tk_dg_filename = d_dg_filename();
179
	break;
180
       case DG_IDNAME_SORT:	/* NEW DIAGS */
181
	v.tk_dg_idname = d_dg_idname();
182
	break;
183
       case DG_NAME_SORT:	/* NEW DIAGS */
184
	v.tk_dg_name = d_dg_name();
185
	break;
186
       case DG_TYPE_SORT:	/* NEW DIAGS */
187
	v.tk_dg_type = d_dg_type();
188
	break;
7 7u83 189
     default:
190
	SET(v);
191
	failer(SORT_NAME);
192
    }
2 7u83 193
  return v;
194
}