strings.h File Reference

#include <limits.h>
#include <string.h>

Go to the source code of this file.

Defines

#define flsl(x)   ( __builtin_constant_p ( x ) ? __constant_flsl ( x ) : __flsl ( x ) )
#define fls(x)   flsl ( x )

Functions

 FILE_LICENCE (GPL2_OR_LATER)
static __attribute__ ((always_inline)) int __constant_flsl(unsigned long x)
int __flsl (long x)
int strcasecmp (const char *s1, const char *s2)

Variables

static void * dest


Define Documentation

#define flsl (  )     ( __builtin_constant_p ( x ) ? __constant_flsl ( x ) : __flsl ( x ) )

Definition at line 48 of file strings.h.

Referenced by slam_put_value().

#define fls (  )     flsl ( x )


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER   ) 

static __attribute__ ( (always_inline)   )  [inline, static]

Definition at line 9 of file strings.h.

References r.

00010                                     {
00011         int r = 0;
00012 
00013 #if ULONG_MAX > 0xffffffff
00014         if ( x & 0xffffffff00000000UL ) {
00015                 x >>= 32;
00016                 r += 32;
00017         }
00018 #endif
00019         if ( x & 0xffff0000UL ) {
00020                 x >>= 16;
00021                 r += 16;
00022         }
00023         if ( x & 0xff00 ) {
00024                 x >>= 8;
00025                 r += 8;
00026         }
00027         if ( x & 0xf0 ) {
00028                 x >>= 4;
00029                 r += 4;
00030         }
00031         if ( x & 0xc ) {
00032                 x >>= 2;
00033                 r += 2;
00034         }
00035         if ( x & 0x2 ) {
00036                 x >>= 1;
00037                 r += 1;
00038         }
00039         if ( x & 0x1 ) {
00040                 r += 1;
00041         }
00042         return r;
00043 }

int __flsl ( long  x  ) 

Definition at line 5 of file bitops.c.

00005                       {
00006         unsigned long value = x;
00007         int ls = 0;
00008 
00009         for ( ls = 0 ; value ; ls++ ) {
00010                 value >>= 1;
00011         }
00012         return ls;
00013 }

int strcasecmp ( const char *  s1,
const char *  s2 
)

Definition at line 131 of file string.c.

Referenced by com32_identify(), comboot_identify(), http_rx_header(), sundance_probe(), and tftp_process_option().

00132 {
00133         while (*a && *b && (*a & ~0x20) == (*b & ~0x20)) {a++; b++; }
00134         return((*a & ~0x20) - (*b & ~0x20));
00135 }


Variable Documentation

void* dest


Generated on Tue Apr 6 20:01:53 2010 for gPXE by  doxygen 1.5.7.1