Tue, 20 Dec 2022 14:14:09 +0100
change prefix of UCX_PRINTF_BUFSIZE to CX
src/printf.c | file | annotate | diff | comparison | revisions |
--- a/src/printf.c Tue Dec 20 14:12:36 2022 +0100 +++ b/src/printf.c Tue Dec 20 14:14:09 2022 +0100 @@ -31,7 +31,7 @@ #include <stdio.h> #include <string.h> -#define UCX_PRINTF_BUFSIZE 256 +#define CX_PRINTF_BUFSIZE 256 int cx_fprintf(void *stream, cx_write_func wfc, char const *fmt, ...) { int ret; @@ -43,13 +43,13 @@ } int cx_vfprintf(void *stream, cx_write_func wfc, char const *fmt, va_list ap) { - char buf[UCX_PRINTF_BUFSIZE]; + char buf[CX_PRINTF_BUFSIZE]; va_list ap2; va_copy(ap2, ap); - int ret = vsnprintf(buf, UCX_PRINTF_BUFSIZE, fmt, ap); + int ret = vsnprintf(buf, CX_PRINTF_BUFSIZE, fmt, ap); if (ret < 0) { return ret; - } else if (ret < UCX_PRINTF_BUFSIZE) { + } else if (ret < CX_PRINTF_BUFSIZE) { return (int) wfc(buf, 1, ret, stream); } else { int len = ret + 1; @@ -80,11 +80,11 @@ cxmutstr s; s.ptr = NULL; s.length = 0; - char buf[UCX_PRINTF_BUFSIZE]; + char buf[CX_PRINTF_BUFSIZE]; va_list ap2; va_copy(ap2, ap); - int ret = vsnprintf(buf, UCX_PRINTF_BUFSIZE, fmt, ap); - if (ret > 0 && ret < UCX_PRINTF_BUFSIZE) { + int ret = vsnprintf(buf, CX_PRINTF_BUFSIZE, fmt, ap); + if (ret > 0 && ret < CX_PRINTF_BUFSIZE) { s.ptr = cxMalloc(a, ret + 1); if (s.ptr) { s.length = (size_t) ret;