From e986713657bc5f9880e91ed49dd9b0d0227f048d Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 17 Jun 2024 17:39:06 +0200 Subject: Use callback function to log to stderr --- src/io_cube.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/io_cube.h') diff --git a/src/io_cube.h b/src/io_cube.h index 3e7880e..72113ff 100644 --- a/src/io_cube.h +++ b/src/io_cube.h @@ -49,7 +49,7 @@ readcube(const char *format, const char *buf) if (!strcmp(format, ioformat[i].name)) return ioformat[i].read(buf); - DBG_LOG("Cannot read cube in the given format\n"); + _log("Cannot read cube in the given format\n"); return zero; } @@ -76,7 +76,7 @@ writecube(const char *format, cube_t cube, char *buf) errormsg = "ERROR: format"; writecube_error: - DBG_LOG("writecube error, see stdout for details\n"); + _log("writecube error, see stdout for details\n"); len = strlen(errormsg); memcpy(buf, errormsg, len); buf[len] = '\n'; @@ -93,7 +93,7 @@ readco(const char *str) if (*str == '2') return _ctwist_ccw; - DBG_LOG("Error reading CO\n"); + _log("Error reading CO\n"); return _error; } @@ -107,7 +107,7 @@ readcp(const char *str) !strncmp(str, cornerstralt[c], 3)) return c; - DBG_LOG("Error reading CP\n"); + _log("Error reading CP\n"); return _error; } @@ -119,7 +119,7 @@ readeo(const char *str) if (*str == '1') return _eflip; - DBG_LOG("Error reading EO\n"); + _log("Error reading EO\n"); return _error; } @@ -132,7 +132,7 @@ readep(const char *str) if (!strncmp(str, edgestr[e], 2)) return e; - DBG_LOG("Error reading EP\n"); + _log("Error reading EP\n"); return _error; } -- cgit v1.3