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/solvers/coord/checkdata.h | 5 +++++ src/solvers/coord/common.h | 5 +++++ src/solvers/coord/coord.h | 5 +++++ src/solvers/coord/corners.h | 5 +++++ src/solvers/coord/cornersx.h | 5 +++++ src/solvers/coord/cpepe.h | 5 +++++ src/solvers/coord/dr.h | 5 +++++ src/solvers/coord/dreo.h | 5 +++++ src/solvers/coord/drfin.h | 5 +++++ src/solvers/coord/drfinnoe.h | 5 +++++ src/solvers/coord/drslice.h | 5 +++++ src/solvers/coord/eo.h | 5 +++++ src/solvers/coord/gendata.h | 5 +++++ src/solvers/coord/htr.h | 5 +++++ src/solvers/coord/list.h | 5 +++++ src/solvers/coord/multisolve.h | 5 +++++ src/solvers/coord/solve.h | 5 +++++ src/solvers/coord/types_macros.h | 5 +++++ src/solvers/coord/utils.h | 5 +++++ src/solvers/dispatch.h | 5 +++++ src/solvers/distribution.h | 5 +++++ src/solvers/h48/checkdata.h | 5 +++++ src/solvers/h48/coordinate.h | 5 +++++ src/solvers/h48/coordinate_types_macros.h | 5 +++++ src/solvers/h48/distribution_h48.h | 5 +++++ src/solvers/h48/gendata_cocsep.h | 5 +++++ src/solvers/h48/gendata_eoesep.h | 5 +++++ src/solvers/h48/gendata_h48.h | 5 +++++ src/solvers/h48/gendata_types_macros.h | 5 +++++ src/solvers/h48/h48.h | 5 +++++ src/solvers/h48/map.h | 5 +++++ src/solvers/h48/map_types_macros.h | 5 +++++ src/solvers/h48/solve.h | 5 +++++ src/solvers/h48/utils.h | 5 +++++ src/solvers/solutions.h | 5 +++++ src/solvers/solutions_types_macros.h | 5 +++++ src/solvers/solvers.h | 5 +++++ src/solvers/tables.h | 5 +++++ src/solvers/tables_types_macros.h | 5 +++++ 39 files changed, 195 insertions(+) (limited to 'src/solvers') diff --git a/src/solvers/coord/checkdata.h b/src/solvers/coord/checkdata.h index 51265a8..a5d5316 100644 --- a/src/solvers/coord/checkdata.h +++ b/src/solvers/coord/checkdata.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_COORD_CHECKDATA_H +#define SOLVERS_COORD_CHECKDATA_H + STATIC long long checkdata_coord_dispatch( const char *, unsigned long long, const unsigned char *); STATIC long long checkdata_coord( @@ -120,3 +123,5 @@ checkdata_multicoord( return NISSY_OK; } + +#endif /* SOLVERS_COORD_CHECKDATA_H */ diff --git a/src/solvers/coord/common.h b/src/solvers/coord/common.h index 3a62e85..8e6db20 100644 --- a/src/solvers/coord/common.h +++ b/src/solvers/coord/common.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_COORD_COMMON_H +#define SOLVERS_COORD_COMMON_H + STATIC uint64_t coord_coord_generic( const coord_t [NON_NULL], cube_t, const unsigned char *); STATIC cube_t coord_cube_generic( @@ -229,3 +232,5 @@ coordinate_merge_cpco(cube_t cp, cube_t co) return merged; } + +#endif /* SOLVERS_COORD_COMMON_H */ diff --git a/src/solvers/coord/coord.h b/src/solvers/coord/coord.h index 98f4d05..6c4cc1b 100644 --- a/src/solvers/coord/coord.h +++ b/src/solvers/coord/coord.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_COORD_COORD_H +#define SOLVERS_COORD_COORD_H + #include "types_macros.h" #include "common.h" #include "eo.h" @@ -16,3 +19,5 @@ #include "checkdata.h" #include "solve.h" #include "multisolve.h" + +#endif /* SOLVERS_COORD_COORD_H */ diff --git a/src/solvers/coord/corners.h b/src/solvers/coord/corners.h index cc0d9a5..6dd60b5 100644 --- a/src/solvers/coord/corners.h +++ b/src/solvers/coord/corners.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_COORD_CORNERS_H +#define SOLVERS_COORD_CORNERS_H + #define CLASSES_CP_48 984 STATIC uint64_t coordinate_corners_coord(const cube_t, const unsigned char *); @@ -70,3 +73,5 @@ coordinate_corners_gendata(unsigned char *data) { return coord_gendata_generic(&coordinate_corners, data); } + +#endif /* SOLVERS_COORD_CORNERS_H */ diff --git a/src/solvers/coord/cornersx.h b/src/solvers/coord/cornersx.h index 788db8d..f4b564f 100644 --- a/src/solvers/coord/cornersx.h +++ b/src/solvers/coord/cornersx.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_COORD_CORNERSX_H +#define SOLVERS_COORD_CORNERSX_H + STATIC bool is_cornersx_solved(uint64_t, const unsigned char *); STATIC coord_t coordinate_cornersx = { @@ -74,3 +77,5 @@ is_cornersx_solved(uint64_t coord, const unsigned char *data) return false; } + +#endif /* SOLVERS_COORD_CORNERSX_H */ diff --git a/src/solvers/coord/cpepe.h b/src/solvers/coord/cpepe.h index 7035400..1ad80dd 100644 --- a/src/solvers/coord/cpepe.h +++ b/src/solvers/coord/cpepe.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_COORD_CPEPE_H +#define SOLVERS_COORD_CPEPE_H + STATIC uint64_t coordinate_cpepe_coord(const cube_t, const unsigned char *); STATIC cube_t coordinate_cpepe_cube(uint64_t, const unsigned char *); STATIC bool coordinate_cpepe_isnasty(uint64_t, const unsigned char *); @@ -71,3 +74,5 @@ coordinate_cpepe_gendata(unsigned char *data) { return coord_gendata_generic(&coordinate_cpepe, data); } + +#endif /* SOLVERS_COORD_CPEPE_H */ diff --git a/src/solvers/coord/dr.h b/src/solvers/coord/dr.h index 8100910..c5c73c2 100644 --- a/src/solvers/coord/dr.h +++ b/src/solvers/coord/dr.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_COORD_DR_H +#define SOLVERS_COORD_DR_H + #define DREOESEP_CLASSES UINT64_C(64430) #define DREOESEP_MAX (POW_2_11 * COMB_12_4) @@ -117,3 +120,5 @@ is_eoco_solvable(cube_t cube) { return cocount % 3 == 0 && eocount % 2 == 0; } + +#endif /* SOLVERS_COORD_DR_H */ diff --git a/src/solvers/coord/dreo.h b/src/solvers/coord/dreo.h index c5cacac..a201ae6 100644 --- a/src/solvers/coord/dreo.h +++ b/src/solvers/coord/dreo.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_COORD_DREO_H +#define SOLVERS_COORD_DREO_H + #define DRESEP_CLASSES 81 STATIC uint64_t coord_dresep_nosym(cube_t); @@ -101,3 +104,5 @@ is_dreo_solvable(cube_t cube) { return cocount % 3 == 0; } + +#endif /* SOLVERS_COORD_DREO_H */ diff --git a/src/solvers/coord/drfin.h b/src/solvers/coord/drfin.h index 569419b..ec645a2 100644 --- a/src/solvers/coord/drfin.h +++ b/src/solvers/coord/drfin.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_COORD_DRFIN_H +#define SOLVERS_COORD_DRFIN_H + STATIC bool is_drfin_solvable(cube_t); STATIC multicoord_t multicoordinate_drfin = { @@ -15,3 +18,5 @@ is_drfin_solvable(cube_t cube) coord_co(cube) == 0 && issolvable((oriented_cube_t){.cube = cube, .orientation = 0}); } + +#endif /* SOLVERS_COORD_DRFIN_H */ diff --git a/src/solvers/coord/drfinnoe.h b/src/solvers/coord/drfinnoe.h index 63f4edf..5ffffc3 100644 --- a/src/solvers/coord/drfinnoe.h +++ b/src/solvers/coord/drfinnoe.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_COORD_DRFINNOE_H +#define SOLVERS_COORD_DRFINNOE_H + /* TODO @@ -96,3 +99,5 @@ is_drfinnoe_solvable(cube_t cube) { coord_eo(transform_edges(cube, TRANS_URr)) == 0 && coord_co(cube) == 0; } + +#endif /* SOLVERS_COORD_DRFINNOE_H */ diff --git a/src/solvers/coord/drslice.h b/src/solvers/coord/drslice.h index 42699f8..87bf87e 100644 --- a/src/solvers/coord/drslice.h +++ b/src/solvers/coord/drslice.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_COORD_DRSLICE_H +#define SOLVERS_COORD_DRSLICE_H + /* The DRSLICE coordinate is almost identical to DRFINNOE, but it allows for the centers of the E layer to be off by a rotation. For this reason we reuse @@ -95,3 +98,5 @@ is_drslice_solved(uint64_t i, const unsigned char *data) /* Pre-computed coordinates of U D' (= U' D up to trans) and U2 D2 */ return i == 0 || i == 109779816 || i == 68468527; } + +#endif /* SOLVERS_COORD_DRSLICE_H */ diff --git a/src/solvers/coord/eo.h b/src/solvers/coord/eo.h index 42196af..a5a0e85 100644 --- a/src/solvers/coord/eo.h +++ b/src/solvers/coord/eo.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_COORD_EO_H +#define SOLVERS_COORD_EO_H + STATIC uint64_t coordinate_eo_coord(cube_t, const unsigned char *); STATIC cube_t coordinate_eo_cube(uint64_t, const unsigned char *); STATIC bool coordinate_eo_isnasty(uint64_t, const unsigned char *); @@ -57,3 +60,5 @@ coordinate_eo_gendata(unsigned char *data) { return 0; } + +#endif /* SOLVERS_COORD_EO_H */ diff --git a/src/solvers/coord/gendata.h b/src/solvers/coord/gendata.h index edf6ce6..0acf9c0 100644 --- a/src/solvers/coord/gendata.h +++ b/src/solvers/coord/gendata.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_COORD_GENDATA_H +#define SOLVERS_COORD_GENDATA_H + STATIC size_t gendata_coord(const coord_t [NON_NULL], unsigned char *); STATIC size_t gendata_multicoord( const multicoord_t [NON_NULL], unsigned char *); @@ -353,3 +356,5 @@ set_coord_pval( table[COORD_INDEX(i)] = (table[COORD_INDEX(i)] & (~COORD_MASK(i))) | (val << COORD_SHIFT(i)); } + +#endif /* SOLVERS_COORD_GENDATA_H */ diff --git a/src/solvers/coord/htr.h b/src/solvers/coord/htr.h index 602625b..d6fc311 100644 --- a/src/solvers/coord/htr.h +++ b/src/solvers/coord/htr.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_COORD_HTR_H +#define SOLVERS_COORD_HTR_H + STATIC uint64_t coordinate_htr_coord(cube_t, const unsigned char *); STATIC cube_t coordinate_htr_cube(uint64_t, const unsigned char *); STATIC bool coordinate_htr_isnasty(uint64_t, const unsigned char *); @@ -123,3 +126,5 @@ is_cp_htr(uint64_t i, const unsigned char *data) return e == 0 && is_cp16_htr_table[c / 8] & (UINT8_C(1) << (c % 8)); } + +#endif /* SOLVERS_COORD_HTR_H */ diff --git a/src/solvers/coord/list.h b/src/solvers/coord/list.h index 6856c13..71f7920 100644 --- a/src/solvers/coord/list.h +++ b/src/solvers/coord/list.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_COORD_LIST_H +#define SOLVERS_COORD_LIST_H + coord_t *all_coordinates[] = { &coordinate_eo, &coordinate_dr, @@ -15,3 +18,5 @@ multicoord_t *all_multicoordinates[] = { &multicoordinate_drfin, NULL }; + +#endif /* SOLVERS_COORD_LIST_H */ diff --git a/src/solvers/coord/multisolve.h b/src/solvers/coord/multisolve.h index efd287d..4990a39 100644 --- a/src/solvers/coord/multisolve.h +++ b/src/solvers/coord/multisolve.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_COORD_MULTISOLVE_H +#define SOLVERS_COORD_MULTISOLVE_H + /* For now the only multicoordinate is DRFIN, and this solver reflects this. For example, NISS is not available. @@ -297,3 +300,5 @@ solve_multicoord_error_unsolvable: LOG("[%s solve] Error: cube not ready\n", mcoord->name); return NISSY_ERROR_UNSOLVABLE_CUBE; } + +#endif /* SOLVERS_COORD_MULTISOLVE_H */ diff --git a/src/solvers/coord/solve.h b/src/solvers/coord/solve.h index 6bb9af2..9a0c63c 100644 --- a/src/solvers/coord/solve.h +++ b/src/solvers/coord/solve.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_COORD_SOLVE_H +#define SOLVERS_COORD_SOLVE_H + typedef struct { cube_t cube; cube_t inverse; @@ -400,3 +403,5 @@ solve_coord_error_unsolvable: LOG("[%s solve] Error: cube not ready\n", coord->name); return NISSY_ERROR_UNSOLVABLE_CUBE; } + +#endif /* SOLVERS_COORD_SOLVE_H */ diff --git a/src/solvers/coord/types_macros.h b/src/solvers/coord/types_macros.h index 81db9d4..b042788 100644 --- a/src/solvers/coord/types_macros.h +++ b/src/solvers/coord/types_macros.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_COORD_TYPES_MACROS_H +#define SOLVERS_COORD_TYPES_MACROS_H + #define COORD_INDEX(i) ((i)/2) #define COORD_SHIFT(i) (UINT8_C(4) * (uint8_t)((i) % 2)) #define COORD_MASK(i) (UINT8_C(0xF) << COORD_SHIFT(i)) @@ -53,3 +56,5 @@ typedef struct { uint64_t moves_mask; bool (*is_solvable)(cube_t); } multicoord_t; + +#endif /* SOLVERS_COORD_TYPES_MACROS_H */ diff --git a/src/solvers/coord/utils.h b/src/solvers/coord/utils.h index 0062587..232d6f8 100644 --- a/src/solvers/coord/utils.h +++ b/src/solvers/coord/utils.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_COORD_UTILS_H +#define SOLVERS_COORD_UTILS_H + STATIC coord_t *parse_coord(size_t, const char *); STATIC multicoord_t *parse_multicoord(size_t, const char *); STATIC void parse_coord_and_trans( @@ -80,3 +83,5 @@ dataid_coord(const char *ca, char dataid[SIZE(NISSY_SIZE_DATAID)]) LOG("Error: cannot parse coordinate from '%s'\n", ca); return NISSY_ERROR_INVALID_SOLVER; } + +#endif /* SOLVERS_COORD_UTILS_H */ diff --git a/src/solvers/dispatch.h b/src/solvers/dispatch.h index 810247f..d484736 100644 --- a/src/solvers/dispatch.h +++ b/src/solvers/dispatch.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_DISPATCH_H +#define SOLVERS_DISPATCH_H + typedef struct { const char *solvername; const char *prefix; @@ -92,3 +95,5 @@ match_solver(const char *name) return solver_dispatchers[i]; } + +#endif /* SOLVERS_DISPATCH_H */ diff --git a/src/solvers/distribution.h b/src/solvers/distribution.h index a996e3db..1ed7453 100644 --- a/src/solvers/distribution.h +++ b/src/solvers/distribution.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_DISTRIBUTION_H +#define SOLVERS_DISTRIBUTION_H + #define ENTRIES_PER_BYTE(k) (UINT64_C(8) / (uint64_t)(k)) #define TABLE_SHIFT(i, k) ((uint8_t)(k) * (uint8_t)((i) % ENTRIES_PER_BYTE(k))) #define TABLE_MASK(i, k) ((UINT8_BIT(k) - UINT8_C(1)) << TABLE_SHIFT(i, k)) @@ -99,3 +102,5 @@ distribution_equal( return wrong == 0; } + +#endif /* SOLVERS_DISTRIBUTION_H */ diff --git a/src/solvers/h48/checkdata.h b/src/solvers/h48/checkdata.h index 948ac67..e2fa38c 100644 --- a/src/solvers/h48/checkdata.h +++ b/src/solvers/h48/checkdata.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_H48_CHECKDATA_H +#define SOLVERS_H48_CHECKDATA_H + STATIC long long checkdata_h48( const char *, unsigned long long, const unsigned char *); @@ -194,3 +197,5 @@ checkdata_h48( return NISSY_OK; } + +#endif /* SOLVERS_H48_CHECKDATA_H */ diff --git a/src/solvers/h48/coordinate.h b/src/solvers/h48/coordinate.h index 695efc3..acbb9c0 100644 --- a/src/solvers/h48/coordinate.h +++ b/src/solvers/h48/coordinate.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_H48_COORDINATE_H +#define SOLVERS_H48_COORDINATE_H + STATIC_INLINE uint64_t coord_h48( cube_t, const uint32_t [SIZE(COCSEP_TABLESIZE)], uint8_t); STATIC_INLINE uint64_t coord_h48_edges(cube_t, uint64_t, uint8_t, uint8_t); @@ -68,3 +71,5 @@ invcoord_h48( return ret; } + +#endif /* SOLVERS_H48_COORDINATE_H */ diff --git a/src/solvers/h48/coordinate_types_macros.h b/src/solvers/h48/coordinate_types_macros.h index cf24e47..6ddd3e8 100644 --- a/src/solvers/h48/coordinate_types_macros.h +++ b/src/solvers/h48/coordinate_types_macros.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_H48_COORDINATE_TYPES_MACROS_H +#define SOLVERS_H48_COORDINATE_TYPES_MACROS_H + #define H48_ESIZE(h) ((COMB_12_4 * COMB_8_4) << (uint64_t)(h)) #define COCLASS_MASK (UINT32_C(0xFFFF) << UINT32_C(16)) @@ -5,3 +8,5 @@ #define ECLASS(x) COCLASS(x) #define TTREP_MASK (UINT32_C(0xFF) << UINT32_C(8)) #define TTREP(x) (((x) & TTREP_MASK) >> UINT32_C(8)) + +#endif /* SOLVERS_H48_COORDINATE_TYPES_MACROS_H */ diff --git a/src/solvers/h48/distribution_h48.h b/src/solvers/h48/distribution_h48.h index 2cb50aa..b7f3811 100644 --- a/src/solvers/h48/distribution_h48.h +++ b/src/solvers/h48/distribution_h48.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_H48_DISTRIBUTION_H48_H +#define SOLVERS_H48_DISTRIBUTION_H48_H + /* This file is very similar to ../distibution.h, but some adaptations are needed for H48 because of the intertwined fallback table, and it is easier @@ -74,3 +77,5 @@ getdistribution_h48( c = H48_LINE_EXT(H48_COORDMAX(info->h48h)) % H48_LINE_ALLCOORDS; distr[3] -= H48_LINE_COORDS - c; } + +#endif /* SOLVERS_H48_DISTRIBUTION_H48_H */ diff --git a/src/solvers/h48/gendata_cocsep.h b/src/solvers/h48/gendata_cocsep.h index f83207b..1cea52e 100644 --- a/src/solvers/h48/gendata_cocsep.h +++ b/src/solvers/h48/gendata_cocsep.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_H48_GENDATA_COCSEP_H +#define SOLVERS_H48_GENDATA_COCSEP_H + STATIC size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *); STATIC uint32_t gendata_cocsep_dfs(cocsep_dfs_arg_t [NON_NULL]); @@ -164,3 +167,5 @@ get_h48_cdata( return CBOUND(*cdata); } + +#endif /* SOLVERS_H48_GENDATA_COCSEP_H */ diff --git a/src/solvers/h48/gendata_eoesep.h b/src/solvers/h48/gendata_eoesep.h index 81bbd43..55097c9 100644 --- a/src/solvers/h48/gendata_eoesep.h +++ b/src/solvers/h48/gendata_eoesep.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_H48_GENDATA_EOESEP_H +#define SOLVERS_H48_GENDATA_EOESEP_H + STATIC uint64_t coord_eoesep_sym(cube_t, const uint32_t [SIZE(ESEP_MAX)]); STATIC size_t gendata_esep_classes( uint32_t [SIZE(ESEP_MAX)], uint16_t [SIZE(ESEP_CLASSES)]); @@ -280,3 +283,5 @@ set_eoesep_pval( table[EOESEP_INDEX(i)] = (table[EOESEP_INDEX(i)] & (~EOESEP_MASK(i))) | (val << EOESEP_SHIFT(i)); } + +#endif /* SOLVERS_H48_GENDATA_EOESEP_H */ diff --git a/src/solvers/h48/gendata_h48.h b/src/solvers/h48/gendata_h48.h index 53b1fad..0b85e49 100644 --- a/src/solvers/h48/gendata_h48.h +++ b/src/solvers/h48/gendata_h48.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_H48_GENDATA_H48_H +#define SOLVERS_H48_GENDATA_H48_H + STATIC long long gendata_h48_dispatch( const char *, unsigned long long, unsigned char *); STATIC uint64_t gendata_h48short(gendata_h48short_arg_t [NON_NULL]); @@ -547,3 +550,5 @@ get_h48_pval_and_min( *pval_min = tmin >> UINT8_C(4); return (t & H48_MASK(iext)) >> H48_SHIFT(iext); } + +#endif /* SOLVERS_H48_GENDATA_H48_H */ diff --git a/src/solvers/h48/gendata_types_macros.h b/src/solvers/h48/gendata_types_macros.h index 9bce2c9..e81acc5 100644 --- a/src/solvers/h48/gendata_types_macros.h +++ b/src/solvers/h48/gendata_types_macros.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_H48_GENDATA_TYPES_MACROS_H +#define SOLVERS_H48_GENDATA_TYPES_MACROS_H + #define COCSEP_CLASSES ((size_t)3393) #define COCSEP_TABLESIZE ((size_t)POW_3_7 << (size_t)7) #define COCSEP_VISITEDSIZE DIV_ROUND_UP(COCSEP_TABLESIZE, (size_t)8) @@ -116,3 +119,5 @@ typedef struct { wrapthread_atomic unsigned char *table_atomic; wrapthread_define_struct_mutex_t(**table_mutex); } gendata_h48_mark_t; + +#endif /* SOLVERS_H48_GENDATA_TYPES_MACROS_H */ diff --git a/src/solvers/h48/h48.h b/src/solvers/h48/h48.h index f7ba8b7..e05fc2b 100644 --- a/src/solvers/h48/h48.h +++ b/src/solvers/h48/h48.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_H48_H48_H +#define SOLVERS_H48_H48_H + #include "utils.h" #include "coordinate_types_macros.h" #include "map_types_macros.h" @@ -10,3 +13,5 @@ #include "gendata_h48.h" #include "checkdata.h" #include "solve.h" + +#endif /* SOLVERS_H48_H48_H */ diff --git a/src/solvers/h48/map.h b/src/solvers/h48/map.h index c9cfb06..75b5236 100644 --- a/src/solvers/h48/map.h +++ b/src/solvers/h48/map.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_H48_MAP_H +#define SOLVERS_H48_MAP_H + STATIC void h48map_create(h48map_t [NON_NULL], uint64_t, uint64_t); STATIC void h48map_clear(h48map_t [NON_NULL]); STATIC void h48map_destroy(h48map_t [NON_NULL]); @@ -82,3 +85,5 @@ h48map_nextkvpair(h48map_t map[NON_NULL], uint64_t p[NON_NULL]) return kv; } + +#endif /* SOLVERS_H48_MAP_H */ diff --git a/src/solvers/h48/map_types_macros.h b/src/solvers/h48/map_types_macros.h index b77c68a..a4e3c75 100644 --- a/src/solvers/h48/map_types_macros.h +++ b/src/solvers/h48/map_types_macros.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_H48_MAP_TYPES_MACROS_H +#define SOLVERS_H48_MAP_TYPES_MACROS_H + #define MAP_UNSET UINT64_C(0xFFFFFFFFFFFFFFFF) #define MAP_KEYMASK UINT64_C(0xFFFFFFFFFF) #define MAP_KEYSHIFT UINT64_C(40) @@ -14,3 +17,5 @@ typedef struct { uint64_t key; uint64_t val; } kvpair_t; + +#endif /* SOLVERS_H48_MAP_TYPES_MACROS_H */ diff --git a/src/solvers/h48/solve.h b/src/solvers/h48/solve.h index ebc5208..36fefa1 100644 --- a/src/solvers/h48/solve.h +++ b/src/solvers/h48/solve.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_H48_SOLVE_H +#define SOLVERS_H48_SOLVE_H + #define H48_STARTING_MOVES 4 #define H48_STARTING_CUBES 43254 #define H48_SORT_TASKS_MIN_DEPTH 16 @@ -758,3 +761,5 @@ solve_h48_error_data: solve_h48_error_solutions_buffer: return NISSY_ERROR_BUFFER_SIZE; } + +#endif /* SOLVERS_H48_SOLVE_H */ diff --git a/src/solvers/h48/utils.h b/src/solvers/h48/utils.h index 6d91108..81c6451 100644 --- a/src/solvers/h48/utils.h +++ b/src/solvers/h48/utils.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_H48_UTILS_H +#define SOLVERS_H48_UTILS_H + #if SIZE_MAX == UINT64_MAX #define H48_HMAX UINT8_C(11) #else @@ -63,3 +66,5 @@ dataid_h48(const char *str, char buf[SIZE(NISSY_SIZE_DATAID)]) sprintf(buf, "h48h%" PRIu8, h); return NISSY_OK; } + +#endif /* SOLVERS_H48_UTILS_H */ diff --git a/src/solvers/solutions.h b/src/solvers/solutions.h index b7a848b..f9bed75 100644 --- a/src/solvers/solutions.h +++ b/src/solvers/solutions.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_SOLUTIONS_H +#define SOLVERS_SOLUTIONS_H + STATIC void solution_moves_reset(solution_moves_t [NON_NULL]); STATIC void solution_moves_transform(solution_moves_t [NON_NULL], size_t, uint8_t); @@ -338,3 +341,5 @@ solutions_done( depth > list->shortest_sol + settings->optimal || list->nsols >= settings->maxsolutions; } + +#endif /* SOLVERS_SOLUTIONS_H */ diff --git a/src/solvers/solutions_types_macros.h b/src/solvers/solutions_types_macros.h index 4727e5a..8454a21 100644 --- a/src/solvers/solutions_types_macros.h +++ b/src/solvers/solutions_types_macros.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_SOLUTIONS_TYPES_MACROS_H +#define SOLVERS_SOLUTIONS_TYPES_MACROS_H + #define SOLUTION_MAXLEN 20 typedef struct { @@ -22,3 +25,5 @@ typedef struct { size_t used; char *buf; } solution_list_t; + +#endif /* SOLVERS_SOLUTIONS_TYPES_MACROS_H */ diff --git a/src/solvers/solvers.h b/src/solvers/solvers.h index e19b08a..78180aa 100644 --- a/src/solvers/solvers.h +++ b/src/solvers/solvers.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_SOLVERS_H +#define SOLVERS_SOLVERS_H + #include "solutions_types_macros.h" #include "solutions.h" #include "tables_types_macros.h" @@ -6,3 +9,5 @@ #include "coord/coord.h" #include "h48/h48.h" #include "dispatch.h" + +#endif /* SOLVERS_SOLVERS_H */ diff --git a/src/solvers/tables.h b/src/solvers/tables.h index 3db1d1e..f850793 100644 --- a/src/solvers/tables.h +++ b/src/solvers/tables.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_TABLES_H +#define SOLVERS_TABLES_H + STATIC uint64_t read_unaligned_u64( const unsigned char [SIZE(sizeof(uint64_t))]); STATIC void write_unaligned_u64( @@ -147,3 +150,5 @@ append_name(tableinfo_t info[NON_NULL], const char *str) info->solver[j] = '\0'; } + +#endif /* SOLVERS_TABLES_H */ diff --git a/src/solvers/tables_types_macros.h b/src/solvers/tables_types_macros.h index b2809b7..8ae18d3 100644 --- a/src/solvers/tables_types_macros.h +++ b/src/solvers/tables_types_macros.h @@ -1,3 +1,6 @@ +#ifndef SOLVERS_TABLES_TYPES_MACROS_H +#define SOLVERS_TABLES_TYPES_MACROS_H + #define OFFSET(B, K) (((unsigned char *)B) + K) #define INFOSIZE INT64_C(512) @@ -37,3 +40,5 @@ typedef struct { uint8_t base; uint8_t maxvalue; } tableinfo_t; + +#endif /* SOLVERS_TABLES_TYPES_MACROS_H */ -- cgit v1.3