Pas2C: Fix data types of Trunc and Ceil
authorWuzzy <Wuzzy2@mail.ru>
Wed, 07 Nov 2018 23:43:15 +0100
changeset 14168 5c6f947c342c
parent 14167 48b9da0178eb
child 14169 e2c51c8e0b2e
Pas2C: Fix data types of Trunc and Ceil
project_files/hwc/rtl/system.c
project_files/hwc/rtl/system.h
--- a/project_files/hwc/rtl/system.c	Wed Nov 07 16:44:16 2018 -0500
+++ b/project_files/hwc/rtl/system.c	Wed Nov 07 23:43:15 2018 +0100
@@ -343,12 +343,12 @@
     *p = malloc(size);
 }
 
-Integer fpcrtl_trunc(extended n) {
-    return (int) n;
+Int64 fpcrtl_trunc(extended n) {
+    return (Int64) n;
 }
 
 Integer fpcrtl_ceil(extended n) {
-    return (int) (ceil(n));
+    return (Integer) (ceil(n));
 }
 
 LongInt str_to_int(char *src)
--- a/project_files/hwc/rtl/system.h	Wed Nov 07 16:44:16 2018 -0500
+++ b/project_files/hwc/rtl/system.h	Wed Nov 07 23:43:15 2018 +0100
@@ -94,7 +94,7 @@
 #define     fpcrtl_assigned(p)                              ((p) != NULL)
 #define     fpcrtl_Assigned                                 fpcrtl_assigned
 
-Integer     fpcrtl_trunc(extended n);
+Int64       fpcrtl_trunc(extended n);
 Integer     fpcrtl_ceil(extended n);
 
 #define     fpcrtl_val(s, a)                                fpcrtl_val__vars(s, &(a))