Add ceil() function to fpcrtl of pas2c
authorunc0rr
Sat, 11 Apr 2015 17:37:43 +0300
changeset 10910 df11dea74701
parent 10909 594f59bd1751
child 10911 5e3f42553ebc
child 10912 5b8d8ecef5a8
child 10913 8699c3df40f8
child 11333 facac91c7c65
Add ceil() function to fpcrtl of pas2c
project_files/hwc/rtl/system.c
project_files/hwc/rtl/system.h
--- a/project_files/hwc/rtl/system.c	Sat Apr 11 15:34:07 2015 +0300
+++ b/project_files/hwc/rtl/system.c	Sat Apr 11 17:37:43 2015 +0300
@@ -300,6 +300,10 @@
     return (int) n;
 }
 
+Integer fpcrtl_ceil(extended n) {
+    return (int) (ceil(n));
+}
+
 LongInt str_to_int(char *src)
 {
     int i;
--- a/project_files/hwc/rtl/system.h	Sat Apr 11 15:34:07 2015 +0300
+++ b/project_files/hwc/rtl/system.h	Sat Apr 11 17:37:43 2015 +0300
@@ -93,6 +93,7 @@
 #define     fpcrtl_Assigned                                 fpcrtl_assigned
 
 Integer     fpcrtl_trunc(extended n);
+Integer     fpcrtl_ceil(extended n);
 
 #define     fpcrtl_val(s, a)                                fpcrtl_val__vars(s, &(a))
 void        __attribute__((overloadable))                   fpcrtl_val__vars(string255 s, LongInt *a);