[SHELL/EXPERIMENTS]

* Create a branch for some evul shell experiments.

svn path=/branches/shell-experiments/; revision=61927
This commit is contained in:
Amine Khaldi 2014-02-02 19:37:27 +00:00
parent d09f611410
commit 527f2f9057
20177 changed files with 0 additions and 1312061 deletions

28
lib/sdk/crt/math/ldiv.c Normal file
View 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;
}