InnoDB Plugin
1.0
|
Functions | |
UNIV_INLINE void * | ut_memcpy (void *dest, const void *sour, ulint n) |
UNIV_INLINE void * | ut_memmove (void *dest, const void *sour, ulint n) |
UNIV_INLINE int | ut_memcmp (const void *str1, const void *str2, ulint n) |
UNIV_INLINE char * | ut_strcpy (char *dest, const char *sour) |
UNIV_INLINE ulint | ut_strlen (const char *str) |
UNIV_INLINE int | ut_strcmp (const char *str1, const char *str2) |
UNIV_INLINE ulint | ut_raw_to_hex (const void *raw, ulint raw_size, char *hex, ulint hex_size) |
UNIV_INLINE ulint | ut_str_sql_format (const char *str, ulint str_len, char *buf, ulint buf_size) |
Memory primitives
Created 5/30/1994 Heikki Tuuri
#define LOOP_READ_BYTES | ( | ASSIGN | ) |
#define MK_ALL_UINT16_WITH_A | ( | a | ) |
UNIV_INLINE int ut_memcmp | ( | const void * | str1, |
const void * | str2, | ||
ulint | n | ||
) |
Wrapper for memcmp(3). Compare memory areas.
str1 | in: first memory block to compare |
str2 | in: second memory block to compare |
n | in: number of bytes to compare |
UNIV_INLINE void* ut_memcpy | ( | void * | dest, |
const void * | sour, | ||
ulint | n | ||
) |
Wrapper for memcpy(3). Copy memory area when the source and
target are not overlapping.
dest | in: copy to |
sour | in: copy from |
n | in: number of bytes to copy |
UNIV_INLINE void* ut_memmove | ( | void * | dest, |
const void * | sour, | ||
ulint | n | ||
) |
Wrapper for memmove(3). Copy memory area when the source and
target are overlapping.
dest | in: copy to |
sour | in: copy from |
n | in: number of bytes to copy |
UNIV_INLINE ulint ut_raw_to_hex | ( | const void * | raw, |
ulint | raw_size, | ||
char * | hex, | ||
ulint | hex_size | ||
) |
Converts a raw binary data to a NUL-terminated hex string. The output is truncated if there is not enough space in "hex", make sure "hex_size" is at least (2 * raw_size + 1) if you do not want this to happen. Returns the actual number of characters written to "hex" (including the NUL).
raw | in: raw data |
raw_size | in: "raw" length in bytes |
hex | out: hex string |
hex_size | in: "hex" size in bytes |
UNIV_INLINE ulint ut_str_sql_format | ( | const char * | str, |
ulint | str_len, | ||
char * | buf, | ||
ulint | buf_size | ||
) |
Adds single quotes to the start and end of string and escapes any quotes by doubling them. Returns the number of bytes that were written to "buf" (including the terminating NUL). If buf_size is too small then the trailing bytes from "str" are discarded.
str | in: string |
str_len | in: string length in bytes |
buf | out: output buffer |
buf_size | in: output buffer size in bytes |
UNIV_INLINE int ut_strcmp | ( | const char * | str1, |
const char * | str2 | ||
) |
Wrapper for strcmp(3). Compare NUL-terminated strings.
str1 | in: first string to compare |
str2 | in: second string to compare |
UNIV_INLINE char* ut_strcpy | ( | char * | dest, |
const char * | sour | ||
) |
Wrapper for strcpy(3). Copy a NUL-terminated string.
dest | in: copy to |
sour | in: copy from |
UNIV_INLINE ulint ut_strlen | ( | const char * | str | ) |
Wrapper for strlen(3). Determine the length of a NUL-terminated string.
str | in: string |