10
#include "../machine.h"
17
#include <floatingpoint.h>
20
#if defined(netbsd) || defined(freebsd)
23
fpsetmask(0); /* Don't dump core on FPE return Inf or NaN */
37
/* static char *the_p,*the_ps;*/
43
integer C2F(scimem)(n,ptr)
48
/* add 1 for alignment problems */
49
p1 = (char *) malloc((unsigned)sizeof(double) * (*n + 1));
53
/* add 1 for alignment problems */
54
*ptr = ((int) (the_p - (char *)C2F(stack).stk_1))/sizeof(double) + 1;
59
sciprint("No space to allocate Scilab stack\r\n");
67
integer C2F(scigmem)(n,ptr)
72
/* add 1 for alignment problems */
73
p1 = (char *) malloc((unsigned)sizeof(double) * (*n + 1));
77
/* add 1 for alignment problems */
78
*ptr = ((int) (the_gp - (char *)C2F(stack).stk_1))/sizeof(double) + 1;
83
sciprint("No space to allocate Scilab stack\r\n");
93
if (the_gps != NULL) free(the_gps);
98
if (the_ps != NULL) free(the_ps);