Fix for initialization of scalos preferences library. Library is now loaded only...
[AROS-Contrib.git] / rexx / lstring / intdiv.c
blob7dcf091365edb2286f07a65403c25bf1e3a93d12
1 /*
2 * $Header$
3 * $Log$
4 * Revision 1.1 2001/04/04 05:43:37 wang
5 * First commit: compiles on Linux, Amiga, Windows, Windows CE, generic gcc
7 * Revision 1.1 1998/07/02 17:18:00 bnv
8 * Initial Version
12 #include <lerror.h>
13 #include <lstring.h>
15 /* ---------------- Lintdiv ---------------- */
16 void
17 Lintdiv( const PLstr to, const PLstr A, const PLstr B )
19 double b;
21 b = Lrdreal(B);
23 if (b == 0) Lerror(ERR_ARITH_OVERFLOW,0);
25 LINT(*to) = (long) (Lrdreal(A) / b);
26 LTYPE(*to) = LINTEGER_TY;
27 LLEN(*to) = sizeof(long);
28 } /* Lintdiv */