X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=internals%2F_PDCLIB_config.h;h=5e22b527478bbe20d4fc9f2501b450497b3afbb3;hp=49afceeb2050b5c2eb8a57f569d58181e83a80a1;hb=a5d93ddfe2e3afc18540fef4a1b7d6759b031ae9;hpb=8a70c7a124624ac1d2a5125497bf9a76556e8b11 diff --git a/internals/_PDCLIB_config.h b/internals/_PDCLIB_config.h index 49afcee..5e22b52 100644 --- a/internals/_PDCLIB_config.h +++ b/internals/_PDCLIB_config.h @@ -39,6 +39,30 @@ #define _PDCLIB_LONG_BYTES 4 #define _PDCLIB_LLONG_BYTES 8 +/* defines the div() function family that allows taking quotient */ +/* and remainder of an integer division in one operation. Many platforms */ +/* support this in hardware / opcode, and the standard permits ordering of */ +/* the return structure in any way to fit the hardware. That is why those */ +/* structs can be configured here. */ + +struct _PDCLIB_div_t +{ + int quot; + int rem; +}; + +struct _PDCLIB_ldiv_t +{ + long int quot; + long int rem; +}; + +struct _PDCLIB_lldiv_t +{ + long long int quot; + long long int rem; +}; + /* -------------------------------------------------------------------------- */ /* defines a set of integer types that are of a minimum width, and */ /* "usually fastest" on the system. (If, for example, accessing a single char */