14 #include <sys/types.h> 42 local_score = default_score;
44 if (score_s == NULL) {
62 long long score_ll = 0LL;
69 local_score = default_score;
78 local_score = (int) score_ll;
115 snprintf(score_s,
sizeof(score_s),
"%d", score);
164 int result = score1 + score2;
bool pcmk_str_is_minus_infinity(const char *s)
#define PCMK_VALUE_MINUS_INFINITY
bool pcmk_str_is_infinity(const char *s)
#define PCMK_VALUE_INFINITY
int pcmk__add_scores(int score1, int score2)
int char2score(const char *score)
#define PCMK_VALUE_PLUS_INFINITY
int pcmk__scan_ll(const char *text, long long *result, long long default_value)
int pcmk_parse_score(const char *score_s, int *score, int default_score)
Parse an integer score from a string.
const char * pcmk_readable_score(int score)
Return a displayable static string for a score value.
bool pcmk__str_any_of(const char *s,...) G_GNUC_NULL_TERMINATED
pcmk__action_result_t result
#define PCMK_VALUE_YELLOW
#define PCMK_SCORE_INFINITY
Integer score to use to represent "infinity".