blob: f2e8f2b7ec25e29e78dbc762f3c9c0c7712855d8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
*** sdcc.src/SDCCval.h.orig Thu Jul 1 09:28:12 1999
--- sdcc.src/SDCCval.h Mon Nov 29 19:06:01 1999
***************
*** 67,73 ****
value *charVal (char * );
value *symbolVal (symbol * );
void printVal (value * );
! double floatFromVal (value * );
value *array2Ptr (value * );
value *valUnaryPM (value * );
value *valComplement (value * );
--- 67,73 ----
value *charVal (char * );
value *symbolVal (symbol * );
void printVal (value * );
! long floatFromVal (value * );
value *array2Ptr (value * );
value *valUnaryPM (value * );
value *valComplement (value * );
*** sdcc.src/SDCCval.c.orig Mon Nov 29 19:08:57 1999
--- sdcc.src/SDCCval.c Mon Nov 29 19:07:48 1999
***************
*** 578,584 ****
/*------------------------------------------------------------------*/
/* floatFromVal - value to unsinged integer conversion */
/*------------------------------------------------------------------*/
! double floatFromVal ( value *val )
{
if (!val)
return 0;
--- 578,584 ----
/*------------------------------------------------------------------*/
/* floatFromVal - value to unsinged integer conversion */
/*------------------------------------------------------------------*/
! long floatFromVal ( value *val )
{
if (!val)
return 0;
***************
*** 591,612 ****
/* if it is not a specifier then we can assume that */
/* it will be an unsigned long */
if (!IS_SPEC(val->type))
! return (double) SPEC_CVAL(val->etype).v_ulong;
if (SPEC_NOUN(val->etype) == V_FLOAT )
! return (double) SPEC_CVAL(val->etype).v_float ;
else {
if (SPEC_LONG(val->etype)) {
if (SPEC_USIGN(val->etype))
! return (double) SPEC_CVAL(val->etype).v_ulong ;
else
! return (double) SPEC_CVAL(val->etype).v_long ;
}
else {
if (SPEC_USIGN(val->etype))
! return (double) SPEC_CVAL(val->etype).v_uint ;
else
! return (double) SPEC_CVAL(val->etype).v_int ;
}
}
}
--- 591,612 ----
/* if it is not a specifier then we can assume that */
/* it will be an unsigned long */
if (!IS_SPEC(val->type))
! return (long) SPEC_CVAL(val->etype).v_ulong;
if (SPEC_NOUN(val->etype) == V_FLOAT )
! return (long) SPEC_CVAL(val->etype).v_float ;
else {
if (SPEC_LONG(val->etype)) {
if (SPEC_USIGN(val->etype))
! return (long) SPEC_CVAL(val->etype).v_ulong ;
else
! return (long) SPEC_CVAL(val->etype).v_long ;
}
else {
if (SPEC_USIGN(val->etype))
! return (long) SPEC_CVAL(val->etype).v_uint ;
else
! return (long) SPEC_CVAL(val->etype).v_int ;
}
}
}
|