pacemaker  2.1.9-49aab99839
Scalable High-Availability cluster resource manager
scores.h
Go to the documentation of this file.
1 /*
2  * Copyright 2004-2024 the Pacemaker project contributors
3  *
4  * The version control history for this file may have further details.
5  *
6  * This source code is licensed under the GNU Lesser General Public License
7  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8  */
9 
10 #ifndef PCMK__CRM_COMMON_SCORES__H
11 #define PCMK__CRM_COMMON_SCORES__H
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
23 #define PCMK_SCORE_INFINITY 1000000
25 
26 int pcmk_parse_score(const char *score_s, int *score, int default_score);
27 const char *pcmk_readable_score(int score);
28 int char2score(const char *score);
29 
30 #ifdef __cplusplus
31 }
32 #endif
33 
34 #endif // PCMK__CRM_COMMON_SCORES__H
const char * pcmk_readable_score(int score)
Return a displayable static string for a score value.
Definition: scores.c:137
int char2score(const char *score)
Get the integer value of a score string.
Definition: scores.c:115
int pcmk_parse_score(const char *score_s, int *score, int default_score)
Parse an integer score from a string.
Definition: scores.c:39