X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=internals%2F_PDCLIB_config.h;h=d2188ff112f8657124884bf3b54dd700138fa2ca;hb=744bbe0fcec2f59f755dd56fa59d8979f4253dfd;hp=5e22b527478bbe20d4fc9f2501b450497b3afbb3;hpb=a5d93ddfe2e3afc18540fef4a1b7d6759b031ae9;p=pdclib diff --git a/internals/_PDCLIB_config.h b/internals/_PDCLIB_config.h index 5e22b52..d2188ff 100644 --- a/internals/_PDCLIB_config.h +++ b/internals/_PDCLIB_config.h @@ -16,6 +16,18 @@ /* The character (sequence) your platform uses as newline. */ #define _PDCLIB_endl "\n" +/* exit() can signal success to the host environment by the value of zero or */ +/* the constant EXIT_SUCCESS. Failure is signaled by EXIT_FAILURE. Note that */ +/* any other return value is "implementation-defined", i.e. your environment */ +/* is not required to handle it gracefully. Set your definitions here. */ +#define _PDCLIB_SUCCESS 0 +#define _PDCLIB_FAILURE -1 + +/* qsort() in requires a function that swaps two memory areas. */ +/* Below is a naive implementation that can be improved significantly for */ +/* specific platforms, e.g. by swapping int instead of char. */ +#define _PDCLIB_memswp( i, j, size ) char tmp; do { tmp = *i; *i++ = *j; *j++ = tmp; } while ( --size ); + /* -------------------------------------------------------------------------- */ /* Integers */ /* -------------------------------------------------------------------------- */