summaryrefslogtreecommitdiff
path: root/devel/sdcc/patches/patch-ak
blob: 1badeb4ccd33200c62e801597bbcaf405c3b3009 (plain)
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
$NetBSD: patch-ak,v 1.2 2001/04/23 17:33:06 wulf Exp $ 

--- src/SDCCval.c.orig	Mon Apr  9 20:40:49 2001
+++ src/SDCCval.c	Mon Apr  9 20:43:10 2001
@@ -573,7 +573,7 @@
 /*------------------------------------------------------------------*/
 /* floatFromVal - value to unsinged integer conversion		    */
 /*------------------------------------------------------------------*/
-double   floatFromVal ( value *val )
+long   floatFromVal ( value *val )
 {
     if (!val)
 	return 0;
@@ -586,22 +586,22 @@
     /* 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;
+	return (long) SPEC_CVAL(val->etype).v_ulong;
 
     if (SPEC_NOUN(val->etype) == V_FLOAT )
-	return (double) SPEC_CVAL(val->etype).v_float ;
+	return (long) 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 ;
+		return (long) SPEC_CVAL(val->etype).v_ulong ;
 	    else
-		return (double) SPEC_CVAL(val->etype).v_long  ;
+		return (long) SPEC_CVAL(val->etype).v_long  ;
 	}
 	else {
 	    if (SPEC_USIGN(val->etype))
-		return (double) SPEC_CVAL(val->etype).v_uint ;
+		return (long) SPEC_CVAL(val->etype).v_uint ;
 	    else
-		return (double) SPEC_CVAL(val->etype).v_int  ;
+		return (long) SPEC_CVAL(val->etype).v_int  ;
 	}
     }
 }