X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Filog%2F_info;h=066dcb89e0218beff72b1963ff7105f2d7fadfe6;hp=59e556656a6e30064db022aad78ba79cd5453efa;hb=d1cea3ebf96f61b5bbac1e74975700770e06add6;hpb=18636637ee013ef828cb04b2b7bb4a4922324475 diff --git a/ccan/ilog/_info b/ccan/ilog/_info index 59e55665..066dcb89 100644 --- a/ccan/ilog/_info +++ b/ccan/ilog/_info @@ -1,12 +1,12 @@ /** * ilog - Integer logarithm. * - * ILOG_32() and ILOG_64() compute the minimum number of bits required to store + * ilog_32() and ilog_64() compute the minimum number of bits required to store * an unsigned 32-bit or 64-bit value without any leading zero bits. * This can also be thought of as the location of the highest set bit, with * counting starting from one (so that 0 returns 0, 1 returns 1, and 2**31 * returns 32). - * When the value is known to be non-zero ILOGNZ_32() and ILOGNZ_64() can + * When the value is known to be non-zero ilog32_nz() and ilog64_nz() can * compile into as few as two instructions, one of which may get optimized out * later. * STATIC_ILOG_32 and STATIC_ILOG_64 allow computation on compile-time @@ -19,12 +19,12 @@ * * int main(void){ * int i; - * printf("ILOG_32(0x%08X)=%i\n",0,ILOG_32(0)); + * printf("ilog32(0x%08X)=%i\n",0,ilog32(0)); * for(i=1;i<=STATIC_ILOG_32(USHRT_MAX);i++){ * uint32_t v; * v=(uint32_t)1U<<(i-1); - * //Here we know v is non-zero, so we can use ILOGNZ_32(). - * printf("ILOG_32(0x%08X)=%i\n",v,ILOGNZ_32(v)); + * //Here we know v is non-zero, so we can use ilog32_nz(). + * printf("ilog32(0x%08X)=%i\n",v,ilog32_nz(v)); * } * return 0; * } @@ -32,13 +32,14 @@ * License: LGPL (v2 or later) */ #include +#include #include "config.h" int main(int _argc,const char *_argv[]){ /*Expect exactly one argument.*/ if(_argc!=2)return 1; if(strcmp(_argv[1],"depends")==0){ - /*PRINTF-CCAN-PACKAGES-YOU-NEED-ONE-PER-LINE-IF-ANY*/ + printf("ccan/compiler\n"); return 0; } return 1;