|
@ -17,10 +17,12 @@ extern "C" { |
|
|
} |
|
|
} |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
/// klotski codec interface
|
|
|
/// -------------------------------- klotski codec interface --------------------------------
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
|
#ifdef __cplusplus |
|
|
extern "C" { |
|
|
extern "C" { |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
/// short code warm up api
|
|
|
extern void short_code_enable(); |
|
|
extern void short_code_enable(); |
|
|
extern void short_code_enable_fast(); |
|
|
extern void short_code_enable_fast(); |
|
|
extern bool is_short_code_available(); |
|
|
extern bool is_short_code_available(); |
|
@ -37,9 +39,13 @@ extern "C" { |
|
|
extern bool short_code_to_common_code(uint32_t short_code, uint64_t *common_code); |
|
|
extern bool short_code_to_common_code(uint32_t short_code, uint64_t *common_code); |
|
|
extern bool common_code_to_short_code(uint64_t common_code, uint32_t *short_code); |
|
|
extern bool common_code_to_short_code(uint64_t common_code, uint32_t *short_code); |
|
|
|
|
|
|
|
|
// TODO: short code string convert
|
|
|
/// output char[] buffer at least 6-bytes
|
|
|
|
|
|
extern const uint32_t short_code_string_size; |
|
|
|
|
|
extern bool short_code_to_string(uint32_t short_code, char short_code_str[]); |
|
|
|
|
|
extern bool short_code_from_string(const char short_code_str[], uint32_t *short_code); |
|
|
|
|
|
|
|
|
/// output char[] buffer at least 10-bytes
|
|
|
/// output char[] buffer at least 10-bytes
|
|
|
|
|
|
extern const uint32_t common_code_string_size; |
|
|
extern bool common_code_to_string(uint64_t common_code, char common_code_str[]); |
|
|
extern bool common_code_to_string(uint64_t common_code, char common_code_str[]); |
|
|
extern bool common_code_to_string_shorten(uint64_t common_code, char common_code_str[]); |
|
|
extern bool common_code_to_string_shorten(uint64_t common_code, char common_code_str[]); |
|
|
extern bool common_code_from_string(const char common_code_str[], uint64_t *common_code); |
|
|
extern bool common_code_from_string(const char common_code_str[], uint64_t *common_code); |
|
|