xref: /plan9-contrib/sys/src/ape/lib/ap/gen/ldiv.c (revision 219b2ee8daee37f4aad58d63f21287faa8e4ffdc)
1 #include <stdlib.h>
2 
3 ldiv_t ldiv(long int numer, long int denom)
4 {
5 	ldiv_t ans;
6 	ans.quot=numer/denom;
7 	ans.rem=numer-ans.quot*denom;
8 	return ans;
9 }
10