diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-08 15:16:21 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-04-08 15:16:21 +0200 |
| commit | e4f356b9592599ad91aac34bf2265c9bcdfbb81f (patch) | |
| tree | 5a95908f9cb9cf5ad7d7802661e1d0c3bc2a0e3a /src/core/io_cube.h | |
| parent | c5a6ff0443fc9e5e890fe72cb13ea78d4fe2bbcb (diff) | |
| download | nissy-core-e4f356b9592599ad91aac34bf2265c9bcdfbb81f.tar.gz nissy-core-e4f356b9592599ad91aac34bf2265c9bcdfbb81f.zip | |
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.
Diffstat (limited to '')
| -rw-r--r-- | src/core/io_cube.h | 10 |
1 files changed, 5 insertions, 5 deletions
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]) | |||
| 269 | uint8_t corner[8], edge[12]; | 269 | uint8_t corner[8], edge[12]; |
| 270 | 270 | ||
| 271 | if (buf_size < NISSY_SIZE_B32) { | 271 | if (buf_size < NISSY_SIZE_B32) { |
| 272 | LOG("Cannot write cube in B32 format: buffer size must be " | 272 | LOG("Cannot write cube in B32 format: buffer size must be at " |
| 273 | "at least %" PRIu64 " bytes, but the provided one is %" | 273 | "least %u bytes, but the provided one is %zu bytes.\n", |
| 274 | PRIu64 " bytes.\n", NISSY_SIZE_B32, buf_size); | 274 | NISSY_SIZE_B32, buf_size); |
| 275 | return NISSY_ERROR_BUFFER_SIZE; | 275 | return NISSY_ERROR_BUFFER_SIZE; |
| 276 | } | 276 | } |
| 277 | 277 | ||
| @@ -298,8 +298,8 @@ writecube_H48(cube_t cube, size_t buf_size, char buf[buf_size]) | |||
| 298 | 298 | ||
| 299 | if (buf_size < NISSY_SIZE_H48) { | 299 | if (buf_size < NISSY_SIZE_H48) { |
| 300 | LOG("Cannot write cube in H48 format: buffer size must be " | 300 | LOG("Cannot write cube in H48 format: buffer size must be " |
| 301 | "at least %" PRIu64 " bytes, but the provided one is %" | 301 | "at least %u bytes, but the provided one is %zu bytes.\n", |
| 302 | PRIu64 " bytes.\n", NISSY_SIZE_H48, buf_size); | 302 | NISSY_SIZE_H48, buf_size); |
| 303 | return NISSY_ERROR_BUFFER_SIZE; | 303 | return NISSY_ERROR_BUFFER_SIZE; |
| 304 | } | 304 | } |
| 305 | 305 | ||
