From 93522effba2f200257141189de5925a23fca93b8 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Tue, 22 Apr 2025 14:47:25 +0200 Subject: Remove compose from the public API --- src/nissy.c | 41 ----------------------------------------- 1 file changed, 41 deletions(-) (limited to 'src/nissy.c') diff --git a/src/nissy.c b/src/nissy.c index 8aa0334..bf56f40 100644 --- a/src/nissy.c +++ b/src/nissy.c @@ -141,47 +141,6 @@ my_strnlen(const char *str, size_t maxlen) return maxlen; } -long long -nissy_compose( - const char cube[static NISSY_SIZE_CUBE], - const char permutation[static NISSY_SIZE_CUBE], - char result[static NISSY_SIZE_CUBE] -) -{ - cube_t c, p, res; - long long err; - - c = readcube(cube); - - if (!isconsistent(c)) { - LOG("[compose] Error: the given cube is invalid\n"); - err = NISSY_ERROR_INVALID_CUBE; - goto nissy_compose_error; - } - - p = readcube(permutation); - - if (!isconsistent(p)) { - LOG("[compose] Error: given permutation is invalid\n"); - err = NISSY_ERROR_INVALID_CUBE; - goto nissy_compose_error; - } - - res = compose(c, p); - - if (!isconsistent(res)) { - LOG("[compose] Unknown error: resulting cube is invalid\n"); - err = NISSY_ERROR_UNKNOWN; - goto nissy_compose_error; - } - - return write_result(res, result); - -nissy_compose_error: - writecube(ZERO_CUBE, NISSY_SIZE_CUBE, result); - return err; -} - long long nissy_inverse( const char cube[static NISSY_SIZE_CUBE], -- cgit v1.3