From 1f7e8e937d0e71e7eb3b5deab38b34d0a0159d88 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 17 Sep 2026 21:50:34 +0200 Subject: Added include guards --- src/core/constants.h | 5 +++++ src/core/core.h | 5 +++++ src/core/core_types.h | 5 +++++ src/core/cube.h | 5 +++++ src/core/moves.h | 5 +++++ src/core/oriented_cube.h | 5 +++++ src/core/transform.h | 5 +++++ 7 files changed, 35 insertions(+) (limited to 'src/core') diff --git a/src/core/constants.h b/src/core/constants.h index 076a483..7e51f67 100644 --- a/src/core/constants.h +++ b/src/core/constants.h @@ -1,3 +1,6 @@ +#ifndef CORE_CONSTANTS_H +#define CORE_CONSTANTS_H + #define ZERO_ORIENTED_CUBE ((oriented_cube_t) {0}) #define SOLVED_ORIENTED_CUBE \ ((oriented_cube_t) { .cube = SOLVED_CUBE, .orientation = 0 }) @@ -913,3 +916,5 @@ STATIC uint8_t basic_to_rotation[] = { [MOVE_B2] = MOVE_z2, [MOVE_B3] = MOVE_z, }; + +#endif /* CORE_CONSTANTS_H */ diff --git a/src/core/core.h b/src/core/core.h index 5e0faaa..d1c0ec1 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -1,6 +1,11 @@ +#ifndef CORE_CORE_H +#define CORE_CORE_H + #include "core_types.h" #include "constants.h" #include "cube.h" #include "moves.h" #include "transform.h" #include "oriented_cube.h" + +#endif /* CORE_CORE_H */ diff --git a/src/core/core_types.h b/src/core/core_types.h index 53cc95e..6f69a8b 100644 --- a/src/core/core_types.h +++ b/src/core/core_types.h @@ -1,3 +1,6 @@ +#ifndef CORE_CORE_TYPES_H +#define CORE_CORE_TYPES_H + typedef struct { cube_t cube; uint8_t orientation; @@ -9,3 +12,5 @@ typedef struct { uint8_t normal[NISSY_SIZE_MOVES]; uint8_t inverse[NISSY_SIZE_MOVES]; } moves_struct_t; + +#endif /* CORE_CORE_TYPES_H */ diff --git a/src/core/cube.h b/src/core/cube.h index 1c21ce1..1dc6b61 100644 --- a/src/core/cube.h +++ b/src/core/cube.h @@ -1,3 +1,6 @@ +#ifndef CORE_CUBE_H +#define CORE_CUBE_H + STATIC bool cube_true(cube_t); STATIC cube_t cubefromarray(uint8_t [SIZE(8)], uint8_t [SIZE(12)]); @@ -369,3 +372,5 @@ cornertob32(uint8_t corner) return val < 26 ? 'A' + (char)val : 'a' + (char)(val - 26); } + +#endif /* CORE_CUBE_H */ diff --git a/src/core/moves.h b/src/core/moves.h index 9f1f7cc..19314de 100644 --- a/src/core/moves.h +++ b/src/core/moves.h @@ -1,3 +1,6 @@ +#ifndef CORE_MOVES_H +#define CORE_MOVES_H + #define MOVE(M, c) compose(c, MOVE_CUBE_ ## M) #define PREMOVE(M, c) compose(MOVE_CUBE_ ## M, c) @@ -719,3 +722,5 @@ unniss_error: LOG("[variations] Error writing result.\n"); return NISSY_ERROR_BUFFER_SIZE; } + +#endif /* CORE_MOVES_H */ diff --git a/src/core/oriented_cube.h b/src/core/oriented_cube.h index 5449204..cc08736 100644 --- a/src/core/oriented_cube.h +++ b/src/core/oriented_cube.h @@ -1,3 +1,6 @@ +#ifndef CORE_ORIENTED_CUBE_H +#define CORE_ORIENTED_CUBE_H + STATIC oriented_cube_t solvedcube(void); STATIC oriented_cube_t move_extended(oriented_cube_t, uint8_t); @@ -75,3 +78,5 @@ applymoves(oriented_cube_t cube, const char *buf) cinv.cube = inverse(cinv.cube); return compose_oriented(cinv, c); } + +#endif /* CORE_ORIENTED_CUBE_H */ diff --git a/src/core/transform.h b/src/core/transform.h index af4634e..1c896e0 100644 --- a/src/core/transform.h +++ b/src/core/transform.h @@ -1,3 +1,6 @@ +#ifndef CORE_TRANSFORM_H +#define CORE_TRANSFORM_H + #define TRANS_EDGES_ROTATION(T, c) \ compose_edges(compose_edges(TRANS_CUBE_ ## T, c), \ TRANS_CUBE_ ## T ## _INVERSE) @@ -418,3 +421,5 @@ symmetry_mask(cube_t cube) return ret; } + +#endif /* CORE_TRANSFORM_H */ -- cgit v1.3