# HG changeset patch # User Mike Becker # Date 1671542049 -3600 # Node ID f78d3b77d4563dc6adbb90b6c2ed95938698522a # Parent 63a692642aa2bb0c916de285968661225e79c43c change prefix of UCX_PRINTF_BUFSIZE to CX diff -r 63a692642aa2 -r f78d3b77d456 src/printf.c --- 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 #include -#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;