ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

ldiv.c
Go to the documentation of this file.
00001 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
00002 #include <precomp.h>
00003 
00004 /*
00005  * @implemented
00006  */
00007 ldiv_t
00008 ldiv(long num, long denom)
00009 {
00010   ldiv_t r;
00011 
00012   if (num > 0 && denom < 0)
00013   {
00014     num = -num;
00015     denom = -denom;
00016   }
00017   r.quot = num / denom;
00018   r.rem = num % denom;
00019   if (num < 0 && denom > 0)
00020   {
00021     if (r.rem > 0)
00022     {
00023       r.quot++;
00024       r.rem -= denom;
00025     }
00026   }
00027   return r;
00028 }

Generated on Sat May 26 2012 04:35:27 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.