mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 23:03:00 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
28
sdk/lib/crt/math/ldiv.c
Normal file
28
sdk/lib/crt/math/ldiv.c
Normal file
|
@ -0,0 +1,28 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <precomp.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
ldiv_t
|
||||
ldiv(long num, long denom)
|
||||
{
|
||||
ldiv_t r;
|
||||
|
||||
if (num > 0 && denom < 0)
|
||||
{
|
||||
num = -num;
|
||||
denom = -denom;
|
||||
}
|
||||
r.quot = num / denom;
|
||||
r.rem = num % denom;
|
||||
if (num < 0 && denom > 0)
|
||||
{
|
||||
if (r.rem > 0)
|
||||
{
|
||||
r.quot++;
|
||||
r.rem -= denom;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue