[BACK]Return to libkern.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / lib / libkern

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/lib/libkern/libkern.h between version 1.55.4.2 and 1.56

version 1.55.4.2, 2006/05/11 23:31:08 version 1.56, 2006/03/08 00:24:06
Line 35 
Line 35 
 #define _LIB_LIBKERN_LIBKERN_H_  #define _LIB_LIBKERN_LIBKERN_H_
   
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/inttypes.h>  
 #include <sys/null.h>  #include <sys/null.h>
   
 #ifndef LIBKERN_INLINE  #ifndef LIBKERN_INLINE
Line 172  tolower(int ch)
Line 171  tolower(int ch)
 }  }
 #endif  #endif
   
 /*  /* nth bit, BIT(0) == 0x1. */
  * Return the number of elements in a statically-allocated array,  #define BIT(n) (((n) == 32) ? 0 : ((uint32_t)1 << (n)))
  * __x.  
  */  
 #define __arraycount(__x)       (sizeof(__x) / sizeof(__x[0]))  
   
 /* __BIT(n): nth bit, where __BIT(0) == 0x1. */  /* bits m through n, m < n. */
 #define __BIT(__n) (((__n) == 32) ? 0 : ((uint32_t)1 << (__n)))  #define BITS(m, n) ((BIT(MAX((m), (n)) + 1) - 1) ^ (BIT(MIN((m), (n))) - 1))
   
 /* __BITS(m, n): bits m through n, m < n. */  
 #define __BITS(__m, __n)        \  
         ((__BIT(MAX((__m), (__n)) + 1) - 1) ^ (__BIT(MIN((__m), (__n))) - 1))  
   
 /* find least significant bit that is set */  /* find least significant bit that is set */
 #define __LOWEST_SET_BIT(__mask) ((((__mask) - 1) & (__mask)) ^ (__mask))  #define _LOWEST_SET_BIT(__mask) ((((__mask) - 1) & (__mask)) ^ (__mask))
   
 #define SHIFTOUT(__x, __mask) (((__x) & (__mask)) / __LOWEST_SET_BIT(__mask))  #define SHIFTOUT(__x, __mask) (((__x) & (__mask)) / _LOWEST_SET_BIT(__mask))
 #define SHIFTIN(__x, __mask) ((__x) * __LOWEST_SET_BIT(__mask))  #define SHIFTIN(__x, __mask) ((__x) * _LOWEST_SET_BIT(__mask))
 #define SHIFTOUT_MASK(__mask) SHIFTOUT((__mask), (__mask))  #define SHIFTOUT_MASK(__mask) SHIFTOUT((__mask), (__mask))
   
 #ifdef NDEBUG                                           /* tradition! */  #ifdef NDEBUG                                           /* tradition! */
Line 204  tolower(int ch)
Line 196  tolower(int ch)
 #endif  #endif
 #endif  #endif
   
 #ifdef __COVERITY__  
 #ifndef DIAGNOSTIC  
 #define DIAGNOSTIC  
 #endif  
 #endif  
   
 #ifndef DIAGNOSTIC  #ifndef DIAGNOSTIC
 #define _DIAGASSERT(a)  (void)0  #define _DIAGASSERT(a)  (void)0
 #ifdef lint  #ifdef lint
Line 303  int  ffs __P((int));
Line 289  int  ffs __P((int));
   
 void     __assert __P((const char *, const char *, int, const char *))  void     __assert __P((const char *, const char *, int, const char *))
             __attribute__((__noreturn__));              __attribute__((__noreturn__));
 unsigned int  
         bcdtobin __P((unsigned int));  
 unsigned int  
         bintobcd __P((unsigned int));  
 u_int32_t  u_int32_t
         inet_addr __P((const char *));          inet_addr __P((const char *));
 struct in_addr;  struct in_addr;
Line 331  size_t  strlcpy __P((char *, const char 
Line 313  size_t  strlcpy __P((char *, const char 
 size_t   strlcat __P((char *, const char *, size_t));  size_t   strlcat __P((char *, const char *, size_t));
 int      strncasecmp __P((const char *, const char *, size_t));  int      strncasecmp __P((const char *, const char *, size_t));
 u_long   strtoul __P((const char *, char **, int));  u_long   strtoul __P((const char *, char **, int));
 uintmax_t strtoumax __P((const char *, char **, int));  
 #endif /* !_LIB_LIBKERN_LIBKERN_H_ */  #endif /* !_LIB_LIBKERN_LIBKERN_H_ */

Legend:
Removed from v.1.55.4.2  
changed lines
  Added in v.1.56

CVSweb <webmaster@jp.NetBSD.org>