mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
7c0aa811ec
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
26 lines
877 B
C
26 lines
877 B
C
#ifndef __REFIT_STRING_H__
|
|
#define __REFIT_STRING_H__
|
|
|
|
/**
|
|
Convert a Null-terminated ASCII string representing version number (separate by dots)
|
|
to a UINT64 value.
|
|
|
|
If Version is NULL, then result is 0.
|
|
|
|
@param Version The pointer to a Null-terminated ASCII version string. Like 10.9.4
|
|
@param MaxDigitByPart Is the maximum number of digits between the dot separators
|
|
@param MaxParts Is the maximum number of parts (blocks between dot separators)
|
|
the version is composed. For a string like 143.5.77.26 the
|
|
MaxParts is 4
|
|
|
|
@return Result
|
|
|
|
**/
|
|
UINT64 AsciiStrVersionToUint64(const CHAR8 *Version, UINT8 MaxDigitByPart, UINT8 MaxParts);
|
|
|
|
|
|
/* Macro to use the AsciiStrVersionToUint64 for OSX Version strings */
|
|
#define AsciiOSVersionToUint64(version) AsciiStrVersionToUint64(version, 2, 3)
|
|
|
|
#endif
|