--- cvsroot/libecb/ecb.pod 2015/02/18 20:29:27 1.62 +++ cvsroot/libecb/ecb.pod 2015/09/01 16:14:42 1.70 @@ -189,6 +189,22 @@ #define SQL_LIMIT 100 sql_exec ("select * from table limit " ECB_STRINGIFY (SQL_LIMIT)); +=item ECB_STRINGIFY_EXPR (expr) + +Like C, but additionally evaluates C to make sure it +is a valid expression. This is useful to catch typos or cases where the +macro isn't available: + + #include + + ECB_STRINGIFY (EDOM); // "33" (on my system at least) + ECB_STRINGIFY_EXPR (EDOM); // "33" + + // now imagine we had a typo: + + ECB_STRINGIFY (EDAM); // "EDAM" + ECB_STRINGIFY_EXPR (EDAM); // error: EDAM undefined + =back =head2 ATTRIBUTES @@ -228,7 +244,7 @@ =item ecb_deprecated_message (message) -Same as C, but if possible, supply a diagnostic that is +Same as C, but if possible, the specified diagnostic is used instead of a generic depreciation message when the object is being used. @@ -248,7 +264,7 @@ =item ecb_noinline -Prevent a function from being inlined - it might be optimised away, but +Prevents a function from being inlined - it might be optimised away, but not inlined into other functions. This is useful if you know your function is rarely called and large enough for inlining not to be helpful. @@ -475,8 +491,9 @@ =item ecb_assume (cond) -Try to tell the compiler that some condition is true, even if it's not -obvious. +Tries to tell the compiler that some condition is true, even if it's not +obvious. This is not a function, but a statement: it cannot be used in +another expression. This can be used to teach the compiler about invariants or other conditions that might improve code generation, but which are impossible to @@ -507,7 +524,7 @@ This function does nothing itself, except tell the compiler that it will never be executed. Apart from suppressing a warning in some cases, this -function can be used to implement C or similar functions. +function can be used to implement C or similar functionality. =item ecb_prefetch (addr, rw, locality) @@ -519,6 +536,9 @@ need to be accessible (it could be a null pointer for example), but C and C must be compile-time constants. +This is a statement, not a function: you cannot use it as part of an +expression. + An obvious way to use this is to prefetch some data far away, in a big array you loop over. This prefetches memory some 128 array elements later, in the hope that it will be ready when the CPU arrives at that location. @@ -580,9 +600,9 @@ =item bool ecb_is_pot64 (uint32_t x) -Return true iff C is a power of two or C. +Returns true iff C is a power of two or C. -For smaller types then C you can safely use C. +For smaller types than C you can safely use C. =item int ecb_ld32 (uint32_t x) @@ -673,7 +693,7 @@ Evaluates to positive infinity if supported by the platform, otherwise to a truly huge number. -=item ECB_NON +=item ECB_NAN Evaluates to a quiet NAN if supported by the platform, otherwise to C. @@ -718,7 +738,7 @@ =item float ecb_binary32_to_float (uint32_t x) [-UECB_NO_LIBM] -=item double ecb_binary32_to_double (uint64_t x) [-UECB_NO_LIBM] +=item double ecb_binary64_to_double (uint64_t x) [-UECB_NO_LIBM] The reverse operation of the previous function - takes the bit representation of an IEEE binary16, binary32 or binary64 number and @@ -822,4 +842,23 @@ =back +=head1 UNDOCUMENTED FUNCTIONALITY + +F is full of undocumented functionality as well, some of which is +intended to be internal-use only, some of which we forgot to document, and +some of which we hide because we are not sure we will keep the interface +stable. + +While you are welcome to rummage around and use whatever you find useful +(we can't stop you), keep in mind that we will change undocumented +functionality in incompatible ways without thinking twice, while we are +considerably more conservative with documented things. + +=head1 AUTHORS + +C is designed and maintained by: + + Emanuele Giaquinta + Marc Alexander Lehmann +