iPXE
Macros | Functions | Variables
strings.h File Reference

String functions. More...

#include <string.h>
#include <bits/strings.h>

Go to the source code of this file.

Macros

#define ffsll(x)   ( __builtin_constant_p ( x ) ? __constant_ffsll ( x ) : __ffsll ( x ) )
 Find first (i.e. More...
 
#define ffsl(x)   ( __builtin_constant_p ( x ) ? __constant_ffsl ( x ) : __ffsl ( x ) )
 Find first (i.e. More...
 
#define ffs(x)   ffsl ( x )
 Find first (i.e. More...
 
#define flsll(x)   ( __builtin_constant_p ( x ) ? __constant_flsll ( x ) : __flsll ( x ) )
 Find last (i.e. More...
 
#define flsl(x)   ( __builtin_constant_p ( x ) ? __constant_flsl ( x ) : __flsl ( x ) )
 Find last (i.e. More...
 
#define fls(x)   flsl ( x )
 Find last (i.e. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
static __attribute__ ((always_inline)) int __constant_ffsll(unsigned long long x)
 Find first (i.e. More...
 
int __ffsll (long long x)
 
int __ffsl (long x)
 
int __flsll (long long x)
 
int __flsl (long x)
 
int __pure strcasecmp (const char *first, const char *second) __nonnull
 Compare case-insensitive strings. More...
 

Variables

static void * dest
 
static void size_t len
 

Detailed Description

String functions.

Definition in file strings.h.

Macro Definition Documentation

◆ ffsll

#define ffsll (   x)    ( __builtin_constant_p ( x ) ? __constant_ffsll ( x ) : __ffsll ( x ) )

Find first (i.e.

least significant) set bit

Parameters
xValue
Return values
lsbLeast significant bit set in value (LSB=1), or zero

Definition at line 122 of file strings.h.

◆ ffsl

#define ffsl (   x)    ( __builtin_constant_p ( x ) ? __constant_ffsl ( x ) : __ffsl ( x ) )

Find first (i.e.

least significant) set bit

Parameters
xValue
Return values
lsbLeast significant bit set in value (LSB=1), or zero

Definition at line 131 of file strings.h.

◆ ffs

#define ffs (   x)    ffsl ( x )

Find first (i.e.

least significant) set bit

Parameters
xValue
Return values
lsbLeast significant bit set in value (LSB=1), or zero

Definition at line 140 of file strings.h.

◆ flsll

#define flsll (   x)    ( __builtin_constant_p ( x ) ? __constant_flsll ( x ) : __flsll ( x ) )

Find last (i.e.

most significant) set bit

Parameters
xValue
Return values
msbMost significant bit set in value (LSB=1), or zero

Definition at line 148 of file strings.h.

◆ flsl

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

Find last (i.e.

most significant) set bit

Parameters
xValue
Return values
msbMost significant bit set in value (LSB=1), or zero

Definition at line 157 of file strings.h.

◆ fls

#define fls (   x)    flsl ( x )

Find last (i.e.

most significant) set bit

Parameters
xValue
Return values
msbMost significant bit set in value (LSB=1), or zero

Definition at line 166 of file strings.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ __attribute__()

static __attribute__ ( (always_inline)  )
inlinestatic

Find first (i.e.

Zero memory.

Copy memory.

Find last (i.e.

least significant) set bit

Parameters
xValue
Return values
lsbLeast significant bit set in value (LSB=1), or zero

most significant) set bit

Parameters
xValue
Return values
msbMost significant bit set in value (LSB=1), or zero
Parameters
srcSource
destDestination
lenLength
destDestination
lenLength

Definition at line 21 of file strings.h.

22  {
23  int r = 0;
24 
25  if ( ! ( x & 0x00000000ffffffffULL ) ) {
26  x >>= 32;
27  r += 32;
28  }
29  if ( ! ( x & 0x0000ffffUL ) ) {
30  x >>= 16;
31  r += 16;
32  }
33  if ( ! ( x & 0x00ff ) ) {
34  x >>= 8;
35  r += 8;
36  }
37  if ( ! ( x & 0x0f ) ) {
38  x >>= 4;
39  r += 4;
40  }
41  if ( ! ( x & 0x3 ) ) {
42  x >>= 2;
43  r += 2;
44  }
45  if ( ! ( x & 0x1 ) ) {
46  x >>= 1;
47  r += 1;
48  }
49  return ( x ? ( r + 1 ) : 0 );
50 }
static const uint8_t r[3][4]
MD4 shift amounts.
Definition: md4.c:54

References r.

◆ __ffsll()

int __ffsll ( long long  x)

◆ __ffsl()

int __ffsl ( long  x)

◆ __flsll()

int __flsll ( long long  x)

◆ __flsl()

int __flsl ( long  x)

◆ strcasecmp()

int __pure strcasecmp ( const char *  first,
const char *  second 
)

Compare case-insensitive strings.

Parameters
firstFirst string
secondSecond string
Return values
diffDifference

Definition at line 192 of file string.c.

192  {
193  const uint8_t *first_bytes = ( ( const uint8_t * ) first );
194  const uint8_t *second_bytes = ( ( const uint8_t * ) second );
195  int diff;
196 
197  for ( ; ; first_bytes++, second_bytes++ ) {
198  diff = ( toupper ( *first_bytes ) -
199  toupper ( *second_bytes ) );
200  if ( diff )
201  return diff;
202  if ( ! *first_bytes )
203  return 0;
204  }
205 }
static __always_inline int off_t userptr_t second
Definition: efi_uaccess.h:80
static int toupper(int character)
Convert character to upper case.
Definition: ctype.h:109
unsigned char uint8_t
Definition: stdint.h:10
uint32_t first
Length to skip in first segment.
Definition: pccrc.h:23

References first, second, and toupper().

Referenced by com32_identify(), comboot_identify(), efi_file_find(), efi_local_check_volume_name(), efi_snp_hii_fetch(), efi_snp_hii_store(), http_authentication(), http_digest_authenticate(), http_format_metadata_flavor(), http_parse_connection(), http_parse_content_encoding(), http_parse_digest_auth(), http_parse_header(), http_parse_transfer_encoding(), parse_fc_els_handler(), string_test_exec(), sundance_probe(), and tftp_process_option().

Variable Documentation

◆ dest

return dest

Definition at line 176 of file strings.h.

Referenced by __attribute__(), __memmove(), a3c90x_internal_ReadEeprom(), acpi_describe(), aes_unwrap(), aes_wrap(), arbel_fill_mlx_send_wqe(), arbel_fill_ud_send_wqe(), arbel_post_send(), ata_command(), bigint_grow_sample(), bigint_shrink_sample(), block_capacity(), block_read(), block_read_capacity(), block_write(), bzimage_load_initrds(), ccmp_ctr_xor(), copy_encap_settings(), copy_from_real(), copy_from_real_libkir(), copy_from_user(), copy_settings(), copy_to_user(), dmfe_transmit(), edd_describe(), efi_pxe_udp_write(), efi_undi_fill_header(), efi_undi_receive(), elf_load_segment(), elf_segment(), elfboot_check_segment(), eth_transmit(), fc_els_rx(), fc_els_tx(), fc_xchg_rx(), fc_xchg_tx(), gcc_implicit_memcpy(), gcc_implicit_memset(), generic_memcpy(), generic_memmove(), generic_memset(), hermon_fill_mlx_send_wqe(), hermon_fill_ud_send_wqe(), hermon_post_send(), ib_complete_recv(), ib_post_send(), ib_pull(), ib_push(), ibft_alloc_string(), ibft_set_string(), ibft_set_string_setting(), identify_device(), inet6_ntoa(), intf_close(), intf_get_dest_op_no_passthru_untyped(), intf_get_dest_op_untyped(), intf_plug(), intf_poke(), ipoib_complete_recv(), ipoib_transmit(), ipv4_netdev(), ipv4_route(), ipv4_rx(), ipv6_netdev(), ipv6_route(), ipv6_route_okx(), ipv6_rx(), job_progress(), linda_complete_recv(), linda_post_send(), memcpy_0(), memcpy_1(), memcpy_10(), memcpy_11(), memcpy_12(), memcpy_13(), memcpy_14(), memcpy_15(), memcpy_16(), memcpy_17(), memcpy_18(), memcpy_19(), memcpy_2(), memcpy_20(), memcpy_21(), memcpy_22(), memcpy_23(), memcpy_24(), memcpy_25(), memcpy_26(), memcpy_27(), memcpy_28(), memcpy_29(), memcpy_3(), memcpy_30(), memcpy_31(), memcpy_4(), memcpy_5(), memcpy_6(), memcpy_7(), memcpy_8(), memcpy_9(), memcpy_test_speed(), memcpy_var(), memset_var(), memset_zero_0(), memset_zero_1(), memset_zero_10(), memset_zero_11(), memset_zero_12(), memset_zero_13(), memset_zero_14(), memset_zero_15(), memset_zero_16(), memset_zero_17(), memset_zero_18(), memset_zero_19(), memset_zero_2(), memset_zero_20(), memset_zero_21(), memset_zero_22(), memset_zero_23(), memset_zero_24(), memset_zero_25(), memset_zero_26(), memset_zero_27(), memset_zero_28(), memset_zero_29(), memset_zero_3(), memset_zero_30(), memset_zero_31(), memset_zero_4(), memset_zero_5(), memset_zero_6(), memset_zero_7(), memset_zero_8(), memset_zero_9(), nbi_load_segment(), nbi_prepare_segment(), nbi_process_segments(), net80211_tx_mgmt(), peerdisc_stat(), pxenv_udp_write(), qib7322_complete_recv(), qib7322_post_send(), resize_dhcp_option(), resolv_done(), scsi_command(), scsi_response(), shuffle(), strcat(), strcpy(), string_copy(), string_test_exec(), strncpy(), tcp_process_tx_queue(), tls_cipherstream_deliver(), trivial_memcpy_user(), trivial_memmove_user(), udp_tx(), uri_copy_fields(), xfer_alloc_iob(), xfer_buffer(), xfer_deliver(), xfer_vredirect(), xfer_window(), xhci_enqueue(), and xsigo_xds_complete().

◆ len

size_t len
Initial value:
{
static void size_t len
Definition: strings.h:176
static void * dest
Definition: strings.h:176
static __always_inline void off_t userptr_t src
Definition: efi_uaccess.h:66
void * memmove(void *dest, const void *src, size_t len) __nonnull

Definition at line 176 of file strings.h.