div.c 345 B

12345678910111213141516
  1. /*
  2. * div for uClibc
  3. * Copyright (C) 2000-2006 by Erik Andersen <andersen@uclibc.org>
  4. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  5. */
  6. #include <stdlib.h>
  7. div_t div(int numer, int denom)
  8. {
  9. div_t result;
  10. result.quot = numer / denom;
  11. result.rem = numer - (result.quot * denom);
  12. return(result);
  13. }