nfs-ganesha 1.4
|
#include "common_utils.h"
#include <strings.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
Go to the source code of this file.
Defines | |
#define | IS_HEXA(c) ( (((c) >= '0') && ((c) <= '9')) || (((c) >= 'A') && ((c) <= 'F')) || (((c) >= 'a') && ((c) <= 'f')) ) |
#define | HEXA2BYTE(c) |
Functions | |
int | s_read_int (char *str) |
int | s_read_octal (char *str) |
int | s_read_int64 (char *str, unsigned long long *out64) |
int | s_read_size (char *str, size_t *p_size) |
int | StrToBoolean (char *str) |
int | snprintmem (char *target, int tgt_size, caddr_t source, int mem_size) |
int | sscanmem (caddr_t target, int tgt_size, const char *str_source) |
int | find_space (char c) |
int | find_comma (char c) |
int | find_colon (char c) |
int | find_endLine (char c) |
int | find_slash (char c) |
#define HEXA2BYTE | ( | c | ) |
((unsigned char)(((c) >= '0') && ((c) <= '9')?((c) - '0'):\ (((c) >= 'A') && ((c) <= 'F')?((c)-'A'+10) :\ (((c) >= 'a') && ((c) <= 'f')?((c)-'a'+10) : /*error :*/ 0 ))))
Definition at line 218 of file common_utils.c.
#define IS_HEXA | ( | c | ) | ( (((c) >= '0') && ((c) <= '9')) || (((c) >= 'A') && ((c) <= 'F')) || (((c) >= 'a') && ((c) <= 'f')) ) |
Definition at line 215 of file common_utils.c.
int find_colon | ( | char | c | ) |
find_colon : return TRUE is argument is ':'.
return TRUE is argument is ':'
c | character to test. |
Definition at line 325 of file common_utils.c.
int find_comma | ( | char | c | ) |
find_comma : return TRUE is argument is ','.
return TRUE is argument is ','
c | character to test. |
Definition at line 309 of file common_utils.c.
int find_endLine | ( | char | c | ) |
find_endLine : return TRUE if character is a end of line.
return TRUE if character is a end of line.
c | character to test. |
Definition at line 341 of file common_utils.c.
int find_slash | ( | char | c | ) |
find_slash : return TRUE is argument is '/'.
return TRUE is argument is '/'
c | character to test. |
Definition at line 357 of file common_utils.c.
int find_space | ( | char | c | ) |
find_space : return TRUE is argument is a space character.
return TRUE is argument is a space character.
c | character to test. |
Definition at line 293 of file common_utils.c.
int s_read_int | ( | char * | str | ) |
Common tools for printing, parsing, .... This function converts a string to an integer.
str | (in char *) The string to be converted. |
Definition at line 29 of file common_utils.c.
int s_read_int64 | ( | char * | str, |
unsigned long long * | out64 | ||
) |
This function converts a string to an integer.
str | (in char *) The string to be converted. |
Definition at line 95 of file common_utils.c.
int s_read_octal | ( | char * | str | ) |
This function converts an octal to an integer.
str | (in char *) The string to be converted. |
Definition at line 62 of file common_utils.c.
int s_read_size | ( | char * | str, |
size_t * | p_size | ||
) |
Definition at line 124 of file common_utils.c.
int snprintmem | ( | char * | target, |
int | tgt_size, | ||
caddr_t | source, | ||
int | mem_size | ||
) |
snprintmem: Print the content of a handle, a cookie,... to an hexa string.
target | (output): The target buffer where memory is to be printed in ASCII. |
tgt_size | (input): Size (in bytes) of the target buffer. |
source | (input): The buffer to be printed. |
mem_size | (input): Size of the buffer to be printed. |
Definition at line 187 of file common_utils.c.
int sscanmem | ( | caddr_t | target, |
int | tgt_size, | ||
const char * | str_source | ||
) |
snscanmem: Read the content of a string and convert it to a handle, a cookie,...
target | (output): The target address where memory is to be written. |
tgt_size | (input): Size (in bytes) of the target memory buffer. |
str_source | (input): A hexadecimal string that represents the data to be stored into memory. |
Definition at line 237 of file common_utils.c.
int StrToBoolean | ( | char * | str | ) |
string to boolean convertion.
Definition at line 157 of file common_utils.c.