aboutsummaryrefslogtreecommitdiff
path: root/src/nissy.c
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2026-04-04 12:02:56 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2026-04-04 12:02:56 +0200
commite6be287bbfa6beda038ec8b085300c5dc9c2ecd8 (patch)
tree55d0acb9efde811985157068f3656514b90344cf /src/nissy.c
parent2ac46cb4d4133e5d5de90bacfc9b6e979d1d6046 (diff)
downloadnissy-core-e6be287bbfa6beda038ec8b085300c5dc9c2ecd8.tar.gz
nissy-core-e6be287bbfa6beda038ec8b085300c5dc9c2ecd8.zip
Use macro for [static N]
Diffstat (limited to '')
-rw-r--r--src/nissy.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/nissy.c b/src/nissy.c
index 594bdc4..b9f2565 100644
--- a/src/nissy.c
+++ b/src/nissy.c
@@ -12,8 +12,8 @@
12#include "core/core.h" 12#include "core/core.h"
13#include "solvers/solvers.h" 13#include "solvers/solvers.h"
14 14
15STATIC long long write_result(oriented_cube_t, char [static NISSY_SIZE_CUBE]); 15STATIC long long write_result(oriented_cube_t, char [SIZE(NISSY_SIZE_CUBE)]);
16STATIC long long nissy_dataid(const char *, char [static NISSY_SIZE_DATAID]); 16STATIC long long nissy_dataid(const char *, char [SIZE(NISSY_SIZE_DATAID)]);
17STATIC long long nissy_gendata_unsafe( 17STATIC long long nissy_gendata_unsafe(
18 const char *, unsigned long long, unsigned char *); 18 const char *, unsigned long long, unsigned char *);
19 19
@@ -28,7 +28,7 @@ struct {
28}; 28};
29 29
30STATIC long long 30STATIC long long
31write_result(oriented_cube_t cube, char result[static NISSY_SIZE_CUBE]) 31write_result(oriented_cube_t cube, char result[SIZE(NISSY_SIZE_CUBE)])
32{ 32{
33 writecube(cube, NISSY_SIZE_CUBE, result); 33 writecube(cube, NISSY_SIZE_CUBE, result);
34 34
@@ -42,8 +42,8 @@ write_result(oriented_cube_t cube, char result[static NISSY_SIZE_CUBE])
42 42
43long long 43long long
44nissy_inverse( 44nissy_inverse(
45 const char cube[static NISSY_SIZE_CUBE], 45 const char cube[],
46 char result[static NISSY_SIZE_CUBE] 46 char result[]
47) 47)
48{ 48{
49 oriented_cube_t c, res; 49 oriented_cube_t c, res;
@@ -77,9 +77,9 @@ nissy_inverse_error:
77 77
78long long 78long long
79nissy_applymoves( 79nissy_applymoves(
80 const char cube[static NISSY_SIZE_CUBE], 80 const char cube[],
81 const char *moves, 81 const char *moves,
82 char result[static NISSY_SIZE_CUBE] 82 char result[]
83) 83)
84{ 84{
85 oriented_cube_t c, res; 85 oriented_cube_t c, res;
@@ -116,9 +116,9 @@ nissy_applymoves_error:
116 116
117long long 117long long
118nissy_applytrans( 118nissy_applytrans(
119 const char cube[static NISSY_SIZE_CUBE], 119 const char cube[],
120 const char transformation[static NISSY_SIZE_TRANSFORMATION], 120 const char transformation[],
121 char result[static NISSY_SIZE_CUBE] 121 char result[]
122) 122)
123{ 123{
124 oriented_cube_t c, res; 124 oriented_cube_t c, res;
@@ -181,7 +181,7 @@ nissy_getcube(
181 long long co, 181 long long co,
182 long long orient, 182 long long orient,
183 const char *options, 183 const char *options,
184 char result[static NISSY_SIZE_CUBE] 184 char result[]
185) 185)
186{ 186{
187 int i; 187 int i;
@@ -210,7 +210,7 @@ nissy_getcube(
210} 210}
211 211
212STATIC long long 212STATIC long long
213nissy_dataid(const char *solver, char dataid[static NISSY_SIZE_DATAID]) 213nissy_dataid(const char *solver, char dataid[SIZE(NISSY_SIZE_DATAID)])
214{ 214{
215 solver_dispatch_t dispatch; 215 solver_dispatch_t dispatch;
216 216
@@ -226,7 +226,7 @@ nissy_dataid(const char *solver, char dataid[static NISSY_SIZE_DATAID])
226long long 226long long
227nissy_solverinfo( 227nissy_solverinfo(
228 const char *solver, 228 const char *solver,
229 char dataid[static NISSY_SIZE_DATAID] 229 char dataid[]
230) 230)
231{ 231{
232 long long err; 232 long long err;
@@ -295,7 +295,7 @@ nissy_checkdata(
295 295
296long long 296long long
297nissy_solve( 297nissy_solve(
298 const char cube[static NISSY_SIZE_CUBE], 298 const char cube[],
299 const char *solver, 299 const char *solver,
300 unsigned nissflag, 300 unsigned nissflag,
301 unsigned minmoves, 301 unsigned minmoves,
@@ -307,7 +307,7 @@ nissy_solve(
307 const unsigned char *data, 307 const unsigned char *data,
308 unsigned sols_size, 308 unsigned sols_size,
309 char *sols, 309 char *sols,
310 long long stats[static NISSY_SIZE_SOLVE_STATS], 310 long long stats[],
311 int (*poll_status)(void *), 311 int (*poll_status)(void *),
312 void *poll_status_data 312 void *poll_status_data
313) 313)

Generated with cgit - Back to sebastiano.tronto.net