From e4f356b9592599ad91aac34bf2265c9bcdfbb81f Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Tue, 8 Apr 2025 15:16:21 +0200 Subject: Some minor changes to the interface. - Simplified logger to accept only a string, not a variadic list of args like printf(). This can still use some improvement, but now it is easier to use from other languages. - Fixed some misuses of the logger (wrong types etc) - Renamed some constants - Fixed some typos in comments. --- src/core/io_cube.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core') diff --git a/src/core/io_cube.h b/src/core/io_cube.h index 39f3545..f5668d4 100644 --- a/src/core/io_cube.h +++ b/src/core/io_cube.h @@ -269,9 +269,9 @@ writecube_B32(cube_t cube, size_t buf_size, char buf[buf_size]) uint8_t corner[8], edge[12]; if (buf_size < NISSY_SIZE_B32) { - LOG("Cannot write cube in B32 format: buffer size must be " - "at least %" PRIu64 " bytes, but the provided one is %" - PRIu64 " bytes.\n", NISSY_SIZE_B32, buf_size); + LOG("Cannot write cube in B32 format: buffer size must be at " + "least %u bytes, but the provided one is %zu bytes.\n", + NISSY_SIZE_B32, buf_size); return NISSY_ERROR_BUFFER_SIZE; } @@ -298,8 +298,8 @@ writecube_H48(cube_t cube, size_t buf_size, char buf[buf_size]) if (buf_size < NISSY_SIZE_H48) { LOG("Cannot write cube in H48 format: buffer size must be " - "at least %" PRIu64 " bytes, but the provided one is %" - PRIu64 " bytes.\n", NISSY_SIZE_H48, buf_size); + "at least %u bytes, but the provided one is %zu bytes.\n", + NISSY_SIZE_H48, buf_size); return NISSY_ERROR_BUFFER_SIZE; } -- cgit v1.3