Subversion Repositories tendra.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
2
    		 Crown Copyright (c) 1997
3
 
4
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
12
 
13
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
15
 
16
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
19
 
20
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
22
        these conditions;
23
 
24
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
27
        it may be put.
28
*/
29
 
30
 
31
/**********************************************************************
32
$Author: release $
33
$Date: 1998/01/17 15:55:45 $
34
$Revision: 1.1.1.1 $
35
$Log: arith_codes.h,v $
36
 * Revision 1.1.1.1  1998/01/17  15:55:45  release
37
 * First version to be checked into rolling release.
38
 *
39
 * Revision 1.1  1995/04/06  10:43:34  currie
40
 * Initial revision
41
 *
42
***********************************************************************/
43
#ifndef ARITH_CODES_H
44
#define ARITH_CODES_H
45
 
46
 
47
/****integer classes	| ref data_structures:RANGE
48
 ****			| use simple_ts.h:
49
 ****			| ref syntax_analysis:type specifiers
50
 ****			| ref tokenised objects:
51
 ****/ 
52
/*sizes*/
53
#define t_char		(0)		/*char*/
54
#define t_short		(1)		/*short*/
55
#define t_int		(2)			/*int*/
56
#define t_long		(3)		/*long*/
57
/*signedness*/
58
#define t_none		(0)		/* 0>>2 no sign*/
59
#define t_signed	(4)		/* 1>>2 signed*/
60
#define t_unsigned	(8)		/* 2>>2 unsigned*/
61
 
62
#define variety_filter	(3)	/*masks to leave the size of a non-tokenised integer*/
63
#define sign_filter	(12)	/*masks to leave the sign of a non-tokenised integer*/
64
 
65
#define int_range (t_int|t_signed) /*the commonly used integer type 'int'*/
66
 
67
 
68
 
69
/****floating_types	| ref data_structures:REALLEX
70
 ****			| ref data_structures:floating types
71
 ****			| use simple_ts.h:
72
 ****			| ref syntax_analysis:type specifiers
73
 ****			| ref data_structures:RANGE
74
 ****/
75
#define t_float		(0)	/*float*/
76
#define t_double	(1)	/*double*/
77
#define t_long_double	(2)	/*long double*/
78
 
79
/****arithmetic_types
80
 ****/
81
#define int_to_arith(i)(i)
82
#define arith_to_int(a)(a)
83
#define float_to_arith(f)(((f)<<3)|0x80)
84
#define arith_to_float(a)(((a)&0x7f)>>3)
85
 
86
 
87
#endif