pacemaker
2.1.8-3980678f03
Scalable High-Availability cluster resource manager
|
#include <stdbool.h>
#include <glib.h>
Go to the source code of this file.
Macros | |
#define | PCMK__PARSE_INT_DEFAULT -1 |
#define | PCMK__PARSE_DBL_DEFAULT -1.0 |
#define | pcmk__str_copy(str) pcmk__str_copy_as(__FILE__, __func__, __LINE__, str) |
#define | pcmk__plural_alt(i, s1, s2) (((i) == 1)? (s1) : (s2)) |
#define | pcmk__plural_s(i) pcmk__plural_alt(i, "", "s") |
Enumerations | |
enum | pcmk__str_flags { pcmk__str_none = 0, pcmk__str_casei = 1 << 0, pcmk__str_null_matches = 1 << 1, pcmk__str_regex = 1 << 2, pcmk__str_star_matches = 1 << 3 } |
Functions | |
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) |
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) |
char * | pcmk__trim (char *str) |
void | pcmk__add_separated_word (GString **list, size_t init_size, const char *word, const char *separator) |
int | pcmk__compress (const char *data, unsigned int length, unsigned int max, char **result, unsigned int *result_len) |
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__parse_ll_range (const char *srcstring, long long *start, long long *end) |
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__insert_dup (GHashTable *table, const char *name, const char *value) |
gboolean | pcmk__str_in_list (const gchar *s, const GList *lst, uint32_t flags) |
bool | pcmk__strcase_any_of (const char *s,...) G_GNUC_NULL_TERMINATED |
bool | pcmk__str_any_of (const char *s,...) G_GNUC_NULL_TERMINATED |
bool | pcmk__char_in_any_str (int ch,...) G_GNUC_NULL_TERMINATED |
int | pcmk__strcmp (const char *s1, const char *s2, uint32_t flags) |
int | pcmk__numeric_strcasecmp (const char *s1, const char *s2) |
char * | pcmk__str_copy_as (const char *file, const char *function, uint32_t line, const char *str) |
void | pcmk__str_update (char **str, const char *value) |
void | pcmk__g_strcat (GString *buffer,...) G_GNUC_NULL_TERMINATED |
#define PCMK__PARSE_DBL_DEFAULT -1.0 |
Definition at line 20 of file strings_internal.h.
#define PCMK__PARSE_INT_DEFAULT -1 |
Definition at line 19 of file strings_internal.h.
#define pcmk__plural_alt | ( | i, | |
s1, | |||
s2 | |||
) | (((i) == 1)? (s1) : (s2)) |
Definition at line 196 of file strings_internal.h.
#define pcmk__plural_s | ( | i | ) | pcmk__plural_alt(i, "", "s") |
Definition at line 199 of file strings_internal.h.
#define pcmk__str_copy | ( | str | ) | pcmk__str_copy_as(__FILE__, __func__, __LINE__, str) |
Definition at line 159 of file strings_internal.h.
enum pcmk__str_flags |
Enumerator | |
---|---|
pcmk__str_none | |
pcmk__str_casei | |
pcmk__str_null_matches | |
pcmk__str_regex | |
pcmk__str_star_matches |
Definition at line 24 of file strings_internal.h.
void pcmk__add_separated_word | ( | GString ** | list, |
size_t | init_size, | ||
const char * | word, | ||
const char * | separator | ||
) |
bool pcmk__char_in_any_str | ( | int | ch, |
... | |||
) |
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 | ||
) |
void pcmk__insert_dup | ( | GHashTable * | table, |
const char * | name, | ||
const char * | value | ||
) |
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 char* pcmk__str_copy_as | ( | const char * | file, |
const char * | function, | ||
uint32_t | line, | ||
const char * | str | ||
) |
gboolean pcmk__str_in_list | ( | const gchar * | s, |
const 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 | ||
) |