Tue, 20 Dec 2022 14:14:09 +0100
change prefix of UCX_PRINTF_BUFSIZE to CX
src/printf.c | file | annotate | diff | comparison | revisions |
1.1 --- a/src/printf.c Tue Dec 20 14:12:36 2022 +0100 1.2 +++ b/src/printf.c Tue Dec 20 14:14:09 2022 +0100 1.3 @@ -31,7 +31,7 @@ 1.4 #include <stdio.h> 1.5 #include <string.h> 1.6 1.7 -#define UCX_PRINTF_BUFSIZE 256 1.8 +#define CX_PRINTF_BUFSIZE 256 1.9 1.10 int cx_fprintf(void *stream, cx_write_func wfc, char const *fmt, ...) { 1.11 int ret; 1.12 @@ -43,13 +43,13 @@ 1.13 } 1.14 1.15 int cx_vfprintf(void *stream, cx_write_func wfc, char const *fmt, va_list ap) { 1.16 - char buf[UCX_PRINTF_BUFSIZE]; 1.17 + char buf[CX_PRINTF_BUFSIZE]; 1.18 va_list ap2; 1.19 va_copy(ap2, ap); 1.20 - int ret = vsnprintf(buf, UCX_PRINTF_BUFSIZE, fmt, ap); 1.21 + int ret = vsnprintf(buf, CX_PRINTF_BUFSIZE, fmt, ap); 1.22 if (ret < 0) { 1.23 return ret; 1.24 - } else if (ret < UCX_PRINTF_BUFSIZE) { 1.25 + } else if (ret < CX_PRINTF_BUFSIZE) { 1.26 return (int) wfc(buf, 1, ret, stream); 1.27 } else { 1.28 int len = ret + 1; 1.29 @@ -80,11 +80,11 @@ 1.30 cxmutstr s; 1.31 s.ptr = NULL; 1.32 s.length = 0; 1.33 - char buf[UCX_PRINTF_BUFSIZE]; 1.34 + char buf[CX_PRINTF_BUFSIZE]; 1.35 va_list ap2; 1.36 va_copy(ap2, ap); 1.37 - int ret = vsnprintf(buf, UCX_PRINTF_BUFSIZE, fmt, ap); 1.38 - if (ret > 0 && ret < UCX_PRINTF_BUFSIZE) { 1.39 + int ret = vsnprintf(buf, CX_PRINTF_BUFSIZE, fmt, ap); 1.40 + if (ret > 0 && ret < CX_PRINTF_BUFSIZE) { 1.41 s.ptr = cxMalloc(a, ret + 1); 1.42 if (s.ptr) { 1.43 s.length = (size_t) ret;