![]() |
Prusa Slicer 2.6.0
|
Include dependency graph for semver.c:Go to the source code of this file.
Macros | |
| #define | SLICE_SIZE 50 |
| #define | DELIMITER "." |
| #define | PR_DELIMITER "-" |
| #define | MT_DELIMITER "+" |
| #define | NUMBERS "0123456789" |
| #define | ALPHA "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| #define | DELIMITERS DELIMITER PR_DELIMITER MT_DELIMITER |
| #define | VALID_CHARS NUMBERS ALPHA DELIMITERS |
Enumerations | |
| enum | operators { SYMBOL_GT = 0x3e , SYMBOL_LT = 0x3c , SYMBOL_EQ = 0x3d , SYMBOL_TF = 0x7e , SYMBOL_CF = 0x5e } |
Variables | |
| static const size_t | MAX_SIZE = sizeof(char) * 255 |
| static const int | MAX_SAFE_INT = (unsigned int) -1 >> 1 |
| #define ALPHA "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| #define DELIMITER "." |
| #define DELIMITERS DELIMITER PR_DELIMITER MT_DELIMITER |
| #define MT_DELIMITER "+" |
| #define NUMBERS "0123456789" |
| #define PR_DELIMITER "-" |
| #define SLICE_SIZE 50 |
| #define VALID_CHARS NUMBERS ALPHA DELIMITERS |
| enum operators |
|
static |
Referenced by semver_compare_version().
Here is the caller graph for this function:
|
static |
References contains(), and VALID_CHARS.
Referenced by semver_numeric().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
References DELIMITER.
Referenced by semver_compare_prerelease().
Here is the caller graph for this function:
|
static |
References SLICE_SIZE.
Referenced by semver_render().
Here is the caller graph for this function:
|
static |
Renders
References SLICE_SIZE.
Referenced by semver_numeric(), and semver_render().
Here is the caller graph for this function:Referenced by char_to_int(), Slic3r::FFFTreeSupport::draw_areas(), Slic3r::find_nearby_points(), has_valid_chars(), Slic3r::FFFTreeSupport::move_inside_if_outside(), semver_clean(), and Slic3r::FFFTreeSupport::smooth_branch_areas().
Here is the caller graph for this function:References contains().
Referenced by parse_int(), and semver_is_valid().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Helpers
References MAX_SIZE.
Referenced by semver_clean(), and semver_is_valid().
Here is the caller graph for this function:
|
static |
References has_valid_chars(), MAX_SAFE_INT, and NUMBERS.
Referenced by semver_numeric().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Referenced by semver_parse().
Here is the caller graph for this function:| int semver_clean | ( | char * | s | ) |
Removes non-valid characters in the given string.
Returns:
0 - Valid -1 - Invalid input
References contains(), has_valid_length(), strcut(), and VALID_CHARS.
Here is the call graph for this function:Compare two semantic versions (x, y).
Returns:
1 if x is higher than y0 if x is equal to y-1 if x is lower than y References semver_compare_prerelease(), and semver_compare_version().
Referenced by semver_eq(), semver_gt(), semver_gte(), semver_lt(), semver_lte(), and semver_neq().
Here is the call graph for this function:
Here is the caller graph for this function:References compare_prerelease().
Referenced by semver_compare().
Here is the call graph for this function:
Here is the caller graph for this function:Performs a major, minor and patch binary comparison (x, y). This function is mostly used internally
Returns:
0 - If versiona are equal 1 - If x is higher than y -1 - If x is lower than y
References binary_comparison().
Referenced by semver_compare().
Here is the call graph for this function:
Here is the caller graph for this function:References semver_version_s::metadata, and semver_version_s::prerelease.
Referenced by Slic3r::Semver::operator=().
Here is the caller graph for this function:Performs a equality comparison
References semver_compare().
Referenced by semver_satisfies().
Here is the call graph for this function:
Here is the caller graph for this function:Free heep allocated memory of a given semver. This is just a convenient function that you should call when you're done.
References free().
Referenced by Slic3r::Semver::~Semver(), Slic3r::Semver::operator=(), and Slic3r::Semver::operator=().
Here is the call graph for this function:
Here is the caller graph for this function:Performs a greater than comparison
References semver_compare().
Referenced by semver_satisfies().
Here is the call graph for this function:
Here is the caller graph for this function:Performs a greater than or equal comparison
References semver_compare().
Referenced by semver_satisfies().
Here is the call graph for this function:
Here is the caller graph for this function:| int semver_is_valid | ( | const char * | s | ) |
Checks if a given semver string is valid
Returns:
1 - Valid expression 0 - Invalid
References has_valid_chars(), has_valid_length(), and VALID_CHARS.
Referenced by semver_parse().
Here is the call graph for this function:
Here is the caller graph for this function:Performs a lower than comparison
References semver_compare().
Referenced by semver_satisfies().
Here is the call graph for this function:
Here is the caller graph for this function:Performs a lower than or equal comparison
References semver_compare().
Referenced by semver_satisfies().
Here is the call graph for this function:
Here is the caller graph for this function:Performs a non equal to comparison
References semver_compare().
Here is the call graph for this function:| int semver_numeric | ( | semver_t * | x | ) |
Render a given semver as numeric value. Useful for ordering and filtering.
References char_to_int(), concat_num(), parse_int(), and SLICE_SIZE.
Here is the call graph for this function:Parses a string as semver expression.
Returns:
0 - Parsed successfully -1 - In case of error
References free(), semver_version_s::major, semver_version_s::metadata, semver_version_s::minor, MT_DELIMITER, parse_slice(), semver_version_s::patch, PR_DELIMITER, semver_version_s::prerelease, semver_is_valid(), and semver_parse_version().
Referenced by Slic3r::Semver::parse().
Here is the call graph for this function:
Here is the caller graph for this function:Parses a given string as semver expression.
Returns:
0 - Parsed successfully -1 - Parse error or invalid
References DELIMITER, semver_version_s::major, semver_version_s::minor, semver_version_s::patch, and SLICE_SIZE.
Referenced by semver_parse().
Here is the caller graph for this function:Render a given semver as string
References concat_char(), concat_num(), DELIMITER, MT_DELIMITER, and PR_DELIMITER.
Here is the call graph for this function:Checks if both versions can be satisfied based on the given comparison operator.
Allowed operators:
= - Equality>= - Higher or equal to<= - Lower or equal to< - Lower than> - Higher than^ - Caret comparison (see https://docs.npmjs.com/misc/semver#caret-ranges-1-2-3-0-2-5-0-0-4)~ - Tilde comparison (see https://docs.npmjs.com/misc/semver#tilde-ranges-1-2-3-1-2-1)Returns:
1 - Can be satisfied 0 - Cannot be satisfied
References semver_eq(), semver_gt(), semver_gte(), semver_lt(), semver_lte(), semver_satisfies_caret(), semver_satisfies_patch(), SYMBOL_CF, SYMBOL_EQ, SYMBOL_GT, SYMBOL_LT, and SYMBOL_TF.
Here is the call graph for this function:Checks if version x can be satisfied by y performing a comparison with caret operator.
See: https://docs.npmjs.com/misc/semver#caret-ranges-1-2-3-0-2-5-0-0-4
Returns:
1 - Can be satisfied 0 - Cannot be satisfied
Referenced by semver_satisfies().
Here is the caller graph for this function:Checks if version x can be satisfied by y performing a comparison with tilde operator.
See: https://docs.npmjs.com/misc/semver#tilde-ranges-1-2-3-1-2-1
Returns:
1 - Can be satisfied 0 - Cannot be satisfied
Referenced by semver_satisfies().
Here is the caller graph for this function:| char * semver_strdup | ( | const char * | src | ) |
|
static |
Private helpers
References MAX_SAFE_INT.
Referenced by semver_clean().
Here is the caller graph for this function:
|
static |
Referenced by parse_int(), and strcut().
|
static |
Referenced by has_valid_length().