summaryrefslogtreecommitdiff
path: root/devel/sdcc/patches/patch-ab
diff options
context:
space:
mode:
Diffstat (limited to 'devel/sdcc/patches/patch-ab')
-rw-r--r--devel/sdcc/patches/patch-ab85
1 files changed, 85 insertions, 0 deletions
diff --git a/devel/sdcc/patches/patch-ab b/devel/sdcc/patches/patch-ab
new file mode 100644
index 00000000000..f2e8f2b7ec2
--- /dev/null
+++ b/devel/sdcc/patches/patch-ab
@@ -0,0 +1,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 ;
+ }
+ }
+ }