diff options
Diffstat (limited to '')
| -rw-r--r-- | src/nissy.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/nissy.h b/src/nissy.h index add88e4..42429d3 100644 --- a/src/nissy.h +++ b/src/nissy.h | |||
| @@ -25,7 +25,7 @@ for example 'rotation UF' or 'mirrored BL'. | |||
| 25 | #define NISSY_SIZE_H48 88U | 25 | #define NISSY_SIZE_H48 88U |
| 26 | #define NISSY_SIZE_TRANSFORMATION 12U | 26 | #define NISSY_SIZE_TRANSFORMATION 12U |
| 27 | #define NISSY_SIZE_SOLVE_STATS 10U | 27 | #define NISSY_SIZE_SOLVE_STATS 10U |
| 28 | #define NISSY_DATAID_SIZE 255U | 28 | #define NISSY_SIZE_DATAID 255U |
| 29 | 29 | ||
| 30 | /* Flags for NISS options */ | 30 | /* Flags for NISS options */ |
| 31 | #define NISSY_NISSFLAG_NORMAL 1U | 31 | #define NISSY_NISSFLAG_NORMAL 1U |
| @@ -141,7 +141,7 @@ Parameters: | |||
| 141 | format_in - The input format. | 141 | format_in - The input format. |
| 142 | format_out - The output format. | 142 | format_out - The output format. |
| 143 | cube_string - The cube, in format_in format. | 143 | cube_string - The cube, in format_in format. |
| 144 | retult_size - The allocated size of the result array. | 144 | result_size - The allocated size of the result array. |
| 145 | result - Return parameter for the cube in format_out format. | 145 | result - Return parameter for the cube in format_out format. |
| 146 | 146 | ||
| 147 | Return values: | 147 | Return values: |
| @@ -198,7 +198,7 @@ the given solver, and other useful information. | |||
| 198 | Parameters: | 198 | Parameters: |
| 199 | solver - The name of the solver. | 199 | solver - The name of the solver. |
| 200 | dataid - An identifier for the data computed for the solver. Different | 200 | dataid - An identifier for the data computed for the solver. Different |
| 201 | solver may use equivalent data. This identifier can be used | 201 | solvers may use equivalent data. This identifier can be used |
| 202 | e.g. as a filename or database key to save and retrieve the | 202 | e.g. as a filename or database key to save and retrieve the |
| 203 | correct data for each solver, without duplication. | 203 | correct data for each solver, without duplication. |
| 204 | 204 | ||
| @@ -211,7 +211,7 @@ Return values: | |||
| 211 | long long | 211 | long long |
| 212 | nissy_solverinfo( | 212 | nissy_solverinfo( |
| 213 | const char *solver, | 213 | const char *solver, |
| 214 | char dataid[static NISSY_DATAID_SIZE] | 214 | char dataid[static NISSY_SIZE_DATAID] |
| 215 | ); | 215 | ); |
| 216 | 216 | ||
| 217 | /* | 217 | /* |
| @@ -219,8 +219,8 @@ Compute the data for the given solver and store it in generated_data. | |||
| 219 | 219 | ||
| 220 | Parameters: | 220 | Parameters: |
| 221 | solver - The name of the solver. | 221 | solver - The name of the solver. |
| 222 | data_size - The size of the data buffer. It is advised to use nissy_datasize | 222 | data_size - The size of the data buffer. It is advised to use |
| 223 | to check how much memory is needed. | 223 | nissy_solverinfo to check how much memory is needed. |
| 224 | data - The return parameter for the generated data. | 224 | data - The return parameter for the generated data. |
| 225 | This buffer must have 8-byte alignment. | 225 | This buffer must have 8-byte alignment. |
| 226 | 226 | ||
| @@ -324,18 +324,19 @@ nissy_countmoves( | |||
| 324 | ); | 324 | ); |
| 325 | 325 | ||
| 326 | /* | 326 | /* |
| 327 | Set a global logger function used by this library. | 327 | Set a global logger function used by this library. Setting the logger to NULL |
| 328 | disables logging. | ||
| 328 | 329 | ||
| 329 | Parameters: | 330 | Parameters: |
| 330 | write - A callback writer with the same signature as printf(3). | 331 | write - A callback writer with the same signature as printf(3). |
| 331 | 332 | ||
| 332 | Return values: | 333 | Return values: |
| 333 | NISSY_OK - Logger set succesfully. No warning or error is goind to be given | 334 | NISSY_OK - Logger set succesfully. No warning or error is going to be given |
| 334 | if the logger is NULL or invalid. | 335 | if the logger is invalid. |
| 335 | */ | 336 | */ |
| 336 | long long | 337 | long long |
| 337 | nissy_setlogger( | 338 | nissy_setlogger( |
| 338 | void (*logger_function)(const char *, ...) | 339 | void (*logger_function)(const char *) |
| 339 | ); | 340 | ); |
| 340 | 341 | ||
| 341 | 342 | ||
