pacemaker
2.1.4-dc6eb4362
Scalable High-Availability cluster resource manager
|
#include <crm_internal.h>
#include <regex.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <float.h>
#include <limits.h>
#include <math.h>
#include <bzlib.h>
#include <sys/types.h>
#include <crm/common/util_compat.h>
Go to the source code of this file.
Macros | |
#define | _GNU_SOURCE |
#define | NUMCHARS "0123456789." |
#define | WHITESPACE " \t\n\r\f" |
Functions | |
int | pcmk__scan_ll (const char *text, long long *result, long long default_value) |
int | pcmk__scan_min_int (const char *text, int *result, int minimum) |
int | pcmk__scan_port (const char *text, int *port) |
int | pcmk__scan_double (const char *text, double *result, const char *default_text, char **end_text) |
int | pcmk__guint_from_hash (GHashTable *table, const char *key, guint default_val, guint *result) |
long long | crm_get_msec (const char *input) |
Parse a time+units string and return milliseconds equivalent. More... | |
gboolean | crm_is_true (const char *s) |
int | crm_str_to_boolean (const char *s, int *ret) |
char * | pcmk__trim (char *str) |
bool | pcmk__starts_with (const char *str, const char *prefix) |
Check whether a string starts with a certain sequence. More... | |
bool | pcmk__ends_with (const char *s, const char *match) |
bool | pcmk__ends_with_ext (const char *s, const char *match) |
GHashTable * | pcmk__strkey_table (GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func) |
GHashTable * | pcmk__strikey_table (GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func) |
GHashTable * | pcmk__str_table_dup (GHashTable *old_table) |
void | pcmk__add_separated_word (char **list, size_t *len, const char *word, const char *separator) |
int | pcmk__compress (const char *data, unsigned int length, unsigned int max, char **result, unsigned int *result_len) |
char * | crm_strdup_printf (char const *format,...) |
int | pcmk__parse_ll_range (const char *srcstring, long long *start, long long *end) |
gboolean | pcmk__str_in_list (const gchar *s, GList *lst, uint32_t flags) |
bool | pcmk__strcase_any_of (const char *s,...) |
bool | pcmk__str_any_of (const char *s,...) |
bool | pcmk__char_in_any_str (int ch,...) |
int | pcmk__numeric_strcasecmp (const char *s1, const char *s2) |
int | pcmk__strcmp (const char *s1, const char *s2, uint32_t flags) |
void | pcmk__str_update (char **str, const char *value) |
gboolean | safe_str_neq (const char *a, const char *b) |
gboolean | crm_str_eq (const char *a, const char *b, gboolean use_case) |
char * | crm_itoa_stack (int an_int, char *buffer, size_t len) |
guint | g_str_hash_traditional (gconstpointer v) |
gboolean | crm_strcase_equal (gconstpointer a, gconstpointer b) |
guint | crm_strcase_hash (gconstpointer v) |
GHashTable * | crm_str_table_dup (GHashTable *old_table) |
long long | crm_parse_ll (const char *text, const char *default_text) |
int | crm_parse_int (const char *text, const char *default_text) |
char * | crm_strip_trailing_newline (char *str) |
int | pcmk_numeric_strcasecmp (const char *s1, const char *s2) |
long long crm_get_msec | ( | const char * | input | ) |
Parse a time+units string and return milliseconds equivalent.
[in] | input | String with a number and optional unit (optionally with whitespace before and/or after the number). If missing, the unit defaults to seconds. |
char* crm_itoa_stack | ( | int | an_int, |
char * | buf, | ||
size_t | len | ||
) |
int crm_parse_int | ( | const char * | text, |
const char * | default_text | ||
) |
long long crm_parse_ll | ( | const char * | text, |
const char * | default_text | ||
) |
gboolean crm_str_eq | ( | const char * | a, |
const char * | b, | ||
gboolean | use_case | ||
) |
GHashTable* crm_str_table_dup | ( | GHashTable * | old_table | ) |
gboolean crm_strcase_equal | ( | gconstpointer | a, |
gconstpointer | b | ||
) |
guint crm_strcase_hash | ( | gconstpointer | v | ) |
char* crm_strip_trailing_newline | ( | char * | str | ) |
guint g_str_hash_traditional | ( | gconstpointer | v | ) |
void pcmk__add_separated_word | ( | char ** | list, |
size_t * | len, | ||
const char * | word, | ||
const char * | separator | ||
) |
int pcmk__compress | ( | const char * | data, |
unsigned int | length, | ||
unsigned int | max, | ||
char ** | result, | ||
unsigned int * | result_len | ||
) |
bool pcmk__ends_with | ( | const char * | s, |
const char * | match | ||
) |
bool pcmk__ends_with_ext | ( | const char * | s, |
const char * | match | ||
) |
int pcmk__guint_from_hash | ( | GHashTable * | table, |
const char * | key, | ||
guint | default_val, | ||
guint * | result | ||
) |
int pcmk__numeric_strcasecmp | ( | const char * | s1, |
const char * | s2 | ||
) |
int pcmk__parse_ll_range | ( | const char * | srcstring, |
long long * | start, | ||
long long * | end | ||
) |
int pcmk__scan_double | ( | const char * | text, |
double * | result, | ||
const char * | default_text, | ||
char ** | end_text | ||
) |
int pcmk__scan_ll | ( | const char * | text, |
long long * | result, | ||
long long | default_value | ||
) |
int pcmk__scan_min_int | ( | const char * | text, |
int * | result, | ||
int | minimum | ||
) |
bool pcmk__starts_with | ( | const char * | str, |
const char * | prefix | ||
) |
Check whether a string starts with a certain sequence.
[in] | str | String to check |
[in] | prefix | Sequence to match against beginning of str |
true
if str
begins with match, false
otherwise gboolean pcmk__str_in_list | ( | const gchar * | s, |
GList * | lst, | ||
uint32_t | flags | ||
) |
void pcmk__str_update | ( | char ** | str, |
const char * | value | ||
) |
int pcmk__strcmp | ( | const char * | s1, |
const char * | s2, | ||
uint32_t | flags | ||
) |
GHashTable* pcmk__strikey_table | ( | GDestroyNotify | key_destroy_func, |
GDestroyNotify | value_destroy_func | ||
) |
GHashTable* pcmk__strkey_table | ( | GDestroyNotify | key_destroy_func, |
GDestroyNotify | value_destroy_func | ||
) |
int pcmk_numeric_strcasecmp | ( | const char * | s1, |
const char * | s2 | ||
) |
gboolean safe_str_neq | ( | const char * | a, |
const char * | b | ||
) |