diff --git a/README/ReleaseNotes/v642/index.md b/README/ReleaseNotes/v642/index.md index 8eb3d7de6b291..9728bcc84408e 100644 --- a/README/ReleaseNotes/v642/index.md +++ b/README/ReleaseNotes/v642/index.md @@ -66,8 +66,9 @@ Users are encouraged to export their models to ONNX and use the retained ONNX pa * The **RooStats::DebuggingSampler** and **RooStats::DebuggingTestStat** classes are removed. They were mock implementations of the `TestStatSampler` and `TestStatistic` interfaces that returned uniform random numbers independent of the data, only meant for debugging the RooStats framework itself during its initial development. * The `RooTrace` class is deprecated and will be removed in ROOT 6.44. It was a RooFit-specific memory tracer whose instrumentation hooks are compiled out by default, so it has been inert and untested for years. For memory debugging, please use general-purpose tools such as AddressSanitizer or Valgrind instead. * Support for the AIX operating system has been removed from the codebase. This support has not been tested since the late v5 releases and the LLVM JIT is not yet supporting AIX. -* The headers Htypes.h and Gtypes.h that were deprecated in ROOT 6.20 will now emit warnings and will be fully removed in ROOT 6.44. -* The header GLConstants.h is no longer part of ROOT installed headers. +* The headers `Htypes.h` and `Gtypes.h` that were deprecated in ROOT 6.20 will now emit warnings and will be fully removed in ROOT 6.44. Use instead `Rtypes.h`. +* The header `GLConstants.h` is no longer part of ROOT installed headers. +* The header `snprintf.h` is no longer part of ROOT installed headers. Use instead ``. ## Build System diff --git a/cmake/modules/RootMacros.cmake b/cmake/modules/RootMacros.cmake index 7d938f6883548..87080dc7a5ba9 100644 --- a/cmake/modules/RootMacros.cmake +++ b/cmake/modules/RootMacros.cmake @@ -858,7 +858,7 @@ function (ROOT_CXXMODULES_APPEND_TO_MODULEMAP library library_headers) DllImport.h ESTLType.h Varargs.h ThreadLocalStorage.h TBranchProxyTemplate.h - snprintf.h strlcpy.h) + strlcpy.h) # Deprecated header files. set (excluded_headers "${excluded_headers}") diff --git a/cmake/unix/module.modulemap b/cmake/unix/module.modulemap index 0c013e9e85c54..b3cb9b146bf12 100644 --- a/cmake/unix/module.modulemap +++ b/cmake/unix/module.modulemap @@ -3,7 +3,6 @@ module ROOT_Foundation_C { module "ThreadLocalStorage.h" { header "ThreadLocalStorage.h" export * } module "strlcpy.h" { header "strlcpy.h" export * } - module "snprintf.h" { header "snprintf.h" export * } export * } diff --git a/core/base/inc/Rtypes.h b/core/base/inc/Rtypes.h index ed7b386c249c8..f76760d381178 100644 --- a/core/base/inc/Rtypes.h +++ b/core/base/inc/Rtypes.h @@ -27,7 +27,6 @@ #include #include "strtok.h" // provides R__STRTOK_R with include #include "strlcpy.h" // part of string.h on systems that have it -#include "snprintf.h" // part of stdio.h on systems that have it #include #endif diff --git a/core/base/inc/TString.h b/core/base/inc/TString.h index e8692333a02c6..ebb0d5c5d3c20 100644 --- a/core/base/inc/TString.h +++ b/core/base/inc/TString.h @@ -27,7 +27,6 @@ #include #include "ROOT/TypeTraits.hxx" -#include "snprintf.h" #include #include diff --git a/core/base/src/TColor.cxx b/core/base/src/TColor.cxx index 14c5b2246aafe..c2dbfc9f4e197 100644 --- a/core/base/src/TColor.cxx +++ b/core/base/src/TColor.cxx @@ -19,10 +19,10 @@ #include "TMathBase.h" #include "TApplication.h" #include "TColorGradient.h" -#include "snprintf.h" #include #include +#include #include #include #include diff --git a/core/base/src/TDatime.cxx b/core/base/src/TDatime.cxx index fdb38429fcc0d..b29e284388914 100644 --- a/core/base/src/TDatime.cxx +++ b/core/base/src/TDatime.cxx @@ -35,13 +35,12 @@ required, use TTimeStamp. #include "TBuffer.h" #include "Strlen.h" -#include "snprintf.h" #include "TDatime.h" #include "TError.h" #include "Bytes.h" #include "TString.h" - +#include //////////////////////////////////////////////////////////////////////////////// /// Create a TDatime and set it to the current time. diff --git a/core/base/src/TObject.cxx b/core/base/src/TObject.cxx index 394ee5142facb..8cf24354d95a7 100644 --- a/core/base/src/TObject.cxx +++ b/core/base/src/TObject.cxx @@ -36,20 +36,7 @@ class hierarchies (watch out for overlaps). that the object was allocated on the heap). */ -#include -#if !defined(WIN32) && !defined(__MWERKS__) && !defined(R__SOLARIS) -#include -#endif -#include -#include -#include -#include -#include -#include -#include - #include "Varargs.h" -#include "snprintf.h" #include "TObject.h" #include "TBuffer.h" #include "TClass.h" @@ -64,6 +51,18 @@ class hierarchies (watch out for overlaps). #include "TRefTable.h" #include "TProcessID.h" +#include +#if !defined(WIN32) && !defined(__MWERKS__) && !defined(R__SOLARIS) +#include +#endif +#include +#include +#include +#include +#include +#include +#include + Longptr_t TObject::fgDtorOnly = 0; Bool_t TObject::fgObjectStat = kTRUE; diff --git a/core/base/src/TProcessID.cxx b/core/base/src/TProcessID.cxx index a789694e856f7..68ec81feca946 100644 --- a/core/base/src/TProcessID.cxx +++ b/core/base/src/TProcessID.cxx @@ -50,7 +50,8 @@ of TUUIDs. #include "TExMap.h" #include "TVirtualMutex.h" #include "TError.h" -#include "snprintf.h" + +#include TObjArray *TProcessID::fgPIDs = nullptr; //pointer to the list of TProcessID TProcessID *TProcessID::fgPID = nullptr; //pointer to the TProcessID of the current session diff --git a/core/clib/CMakeLists.txt b/core/clib/CMakeLists.txt index 64a874c3bc8f5..47836cf32fe68 100644 --- a/core/clib/CMakeLists.txt +++ b/core/clib/CMakeLists.txt @@ -10,7 +10,6 @@ set_property(TARGET Core APPEND PROPERTY DICT_HEADERS strlcpy.h - snprintf.h strtok.h ) @@ -26,7 +25,6 @@ ROOT_OBJECT_LIBRARY(Clib src/mmcheck.c src/mrealloc.c src/sbrksup.c - src/snprintf.c src/strlcat.c src/strlcpy.c ) diff --git a/core/clib/inc/snprintf.h b/core/clib/inc/snprintf.h deleted file mode 100644 index c31413db0b959..0000000000000 --- a/core/clib/inc/snprintf.h +++ /dev/null @@ -1,43 +0,0 @@ -/* @(#)root/clib:$Id$ */ -/* Author: Fons Rademakers 10/12/2000 */ - -/* - Write formatted text to buffer 'string', using format string 'format'. - Returns number of characters written, or -1 if truncated. - Format string is understood as defined in ANSI C. -*/ - -#ifndef ROOT_snprintf -#define ROOT_snprintf - -#include -#include -#ifdef NEED_SNPRINTF - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef WIN32 -#pragma warning( push ) -#pragma warning (disable: 4273) -#endif - -#ifndef DONTNEED_VSNPRINTF -int vsnprintf(char *string, size_t length, const char *format, va_list args); -#endif -int snprintf(char *string, size_t length, const char *format, ...); - -#ifdef WIN32 -#pragma warning( pop ) -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* NEED_SNPRINTF */ - -#endif /* ROOT_snprintf */ diff --git a/core/clib/src/snprintf.c b/core/clib/src/snprintf.c deleted file mode 100644 index 972b2b351ec94..0000000000000 --- a/core/clib/src/snprintf.c +++ /dev/null @@ -1,766 +0,0 @@ -/* @(#)root/clib:$Id$ */ -/* Author: Tomi Salo & Fons Rademakers */ - -/* - Portable snprintf and vsnprintf implementation. - - Format: - snprintf(holder, sizeof_holder, format, ...) - vsnprintf(holder, sizeof_holder, format, args) - - Return values: - number of characters written or -1 if truncated or -2 if there is an - error in format specification - - Author: - Tomi Salo - Original code - - Modified: - Fons Rademakers - Return -1 in case of truncation - Added test program. - M.Asokan - Return -2 in case of error in format specification - Distinguish between missing precision and a specified precision of 0 - - To test snprintf and vsnprintf compile this file with: - cc -g -DSNTEST `root-config --cflags` snprintf.c -o snprintf -*/ - -#include -#include -#include -#include -#include - -#include /* for NEED_SNPRINTF */ - -#if defined(NEED_SNPRINTF) || defined(SNTEST) - -/* to be able to test this code on machines that have snprintf */ -#ifndef NEED_SNPRINTF -#define snprintf r__snprintf -#define vsnprintf r__vsnprintf -#endif - -#if defined(R__WIN32) -typedef __int64 Long64_t; /* Portable signed long integer 8 bytes */ -typedef unsigned __int64 ULong64_t; /* Portable unsigned long integer 8 bytes */ -#else -typedef long long Long64_t; /* Portable signed long integer 8 bytes */ -typedef unsigned long long ULong64_t; /* Portable unsigned long integer 8 bytes */ -#endif - -#undef isdigit -#define isdigit(ch) ((ch) >= '0' && (ch) <= '9') - -#define MINUS_FLAG 0x1 -#define PLUS_FLAG 0x2 -#define SPACE_FLAG 0x4 -#define HASH_FLAG 0x8 -#define CONV_TO_SHORT 0x10 -#define IS_LONG_INT 0x20 -#define IS_LONG_DOUBLE 0x40 -#define X_UPCASE 0x80 -#define IS_NEGATIVE 0x100 -#define UNSIGNED_DEC 0x200 -#define ZERO_PADDING 0x400 -#define IS_LONG_LONG_INT 0x800 - -#ifndef DONTNEED_VSNPRINTF - -/* Extract a formatting directive from str. Str must point to a '%'. - Returns number of characters used or zero if extraction failed. */ - -static int snprintf_get_directive(const char *str, int *flags, int *width, - int *precision, char *format_char, - va_list *ap) -{ - int length, value; - const char *orig_str = str; - - *flags = 0; - *width = 0; - *precision = -1; /* Assume unspecified */ - *format_char = (char) 0; - - if (*str == '%') { - /* Get the flags */ - str++; - while (*str == '-' || *str == '+' || *str == ' ' - || *str == '#' || *str == '0') { - switch (*str) { - case '-': - *flags |= MINUS_FLAG; - break; - case '+': - *flags |= PLUS_FLAG; - break; - case ' ': - *flags |= SPACE_FLAG; - break; - case '#': - *flags |= HASH_FLAG; - break; - case '0': - *flags |= ZERO_PADDING; - break; - } - str++; - } - - /* Don't pad left-justified numbers withs zeros */ - if ((*flags & MINUS_FLAG) && (*flags & ZERO_PADDING)) - *flags &= ~ZERO_PADDING; - - /* Is width field present? */ - if (isdigit(*str)) { - for (value = 0; *str && isdigit(*str); str++) - value = 10 * value + *str - '0'; - *width = value; - } else if (*str == '*') { - *width = va_arg(*ap, int); - str++; - } - - /* Is the precision field present? */ - if (*str == '.') { - str++; - if (isdigit(*str)) { - for (value = 0; *str && isdigit(*str); str++) - value = 10 * value + *str - '0'; - *precision = value; - } else if (*str == '*') { - *precision = va_arg(*ap, int); - str++; - } else - *precision = 0; - } - - /* Get the optional type character */ - if (*str == 'h') { - *flags |= CONV_TO_SHORT; - str++; - } else { - if (*str == 'l') { - if (*(str+1)=='l') { - *flags |= IS_LONG_LONG_INT; - str++; - } else { - *flags |= IS_LONG_INT; - } - str++; - } else { - /* Support Win32 I64 type specifier, i.e. %I64d or %I64u */ - if (*str == 'I' && *(str+1)=='6' && *(str+2)=='4') { - *flags |= IS_LONG_LONG_INT; - str += 3; - } else if (*str == 'L') { - *flags |= IS_LONG_DOUBLE; - str++; - } - } - } - - /* Get and check the formatting character */ - - *format_char = *str; - str++; - length = str - orig_str; - - switch (*format_char) { - case 'i': - case 'd': - case 'o': - case 'u': - case 'x': - case 'X': - case 'f': - case 'e': - case 'E': - case 'g': - case 'G': - case 'c': - case 's': - case 'p': - case 'n': - if (*format_char == 'X') - *flags |= X_UPCASE; - if (*format_char == 'o') - *flags |= UNSIGNED_DEC; - return length; - - default: - return 0; - } - } else { - return 0; - } -} - -/* - Convert a integer from unsigned long int representation - to string representation. This will insert prefixes if needed - (leading zero for octal and 0x or 0X for hexadecimal) and - will write at most buf_size characters to buffer. - tmp_buf is used because we want to get correctly truncated - results. -*/ -static int snprintf_convert_ulong(char *buffer, size_t buf_size, int base, - char *digits, ULong64_t ulong_val, - int flags, int width, int precision) -{ - int tmp_buf_len = 100 + width, len; - char *tmp_buf, *tmp_buf_ptr, prefix[2]; - tmp_buf = malloc(tmp_buf_len); - - prefix[0] = '\0'; - prefix[1] = '\0'; - - /* Make tmp_buf_ptr point just past the last char of buffer */ - tmp_buf_ptr = tmp_buf + tmp_buf_len; - - /* Main conversion loop */ - do { - *--tmp_buf_ptr = digits[ulong_val % base]; - ulong_val /= base; - precision--; - } - while ((ulong_val != 0 || precision > 0) && tmp_buf_ptr > tmp_buf); - - /* Get the prefix */ - if (!(flags & IS_NEGATIVE)) { - if (base == 16 && (flags & HASH_FLAG)) { - if (flags && X_UPCASE) { - prefix[0] = 'x'; - prefix[1] = '0'; - } else { - prefix[0] = 'X'; - prefix[1] = '0'; - } - } - - if (base == 8 && (flags & HASH_FLAG)) - prefix[0] = '0'; - - if (base == 10 && !(flags & UNSIGNED_DEC) && (flags & PLUS_FLAG)) - prefix[0] = '+'; - else - if (base == 10 && !(flags & UNSIGNED_DEC) - && (flags & SPACE_FLAG)) prefix[0] = ' '; - } else - prefix[0] = '-'; - - if (prefix[0] != '\0' && tmp_buf_ptr > tmp_buf) { - *--tmp_buf_ptr = prefix[0]; - if (prefix[1] != '\0' && tmp_buf_ptr > tmp_buf) - *--tmp_buf_ptr = prefix[1]; - } - - len = (tmp_buf + tmp_buf_len) - tmp_buf_ptr; - - if (len <= (int)buf_size) { - if (len < width) { - if (width > (tmp_buf_ptr - tmp_buf)) - width = (tmp_buf_ptr - tmp_buf); - if (flags & MINUS_FLAG) { - memcpy(buffer, tmp_buf_ptr, len); - memset(buffer + len, (flags & ZERO_PADDING) ? '0' : ' ', - width - len); - len = width; - } else { - memset(buffer, (flags & ZERO_PADDING) ? '0' : ' ', - width - len); - memcpy(buffer + width - len, tmp_buf_ptr, len); - len = width; - } - } else { - memcpy(buffer, tmp_buf_ptr, len); - } - free(tmp_buf); - return len; - } else { - memcpy(buffer, tmp_buf_ptr, buf_size); - free(tmp_buf); - return buf_size; - } -} - - -static int snprintf_convert_float(char *buffer, size_t buf_size, - double dbl_val, int flags, int width, - int precision, char format_char) -{ - char print_buf[160], print_buf_len = 0; - char format_str[80], *format_str_ptr; - - format_str_ptr = format_str; - - if (width > 155) - width = 155; - if (precision <= 0) - precision = 6; - if (precision > 120) - precision = 120; - - /* Construct the formatting string and let system's sprintf - do the real work. */ - - *format_str_ptr++ = '%'; - - if (flags & MINUS_FLAG) - *format_str_ptr++ = '-'; - if (flags & PLUS_FLAG) - *format_str_ptr++ = '+'; - if (flags & SPACE_FLAG) - *format_str_ptr++ = ' '; - if (flags & ZERO_PADDING) - *format_str_ptr++ = '0'; - if (flags & HASH_FLAG) - *format_str_ptr++ = '#'; - - sprintf(format_str_ptr, "%d.%d", width, precision); - format_str_ptr += strlen(format_str_ptr); - - if (flags & IS_LONG_DOUBLE) - *format_str_ptr++ = 'L'; - *format_str_ptr++ = format_char; - *format_str_ptr++ = '\0'; - - sprintf(print_buf, format_str, dbl_val); - print_buf_len = strlen(print_buf); - - if (print_buf_len > (int)buf_size) - print_buf_len = buf_size; - strncpy(buffer, print_buf, print_buf_len); - return print_buf_len; -} - -int vsnprintf(char *str, size_t size, const char *format, va_list ap) -{ - int status, left = (int) size - 1; - const char *format_ptr = format; - int flags, width, precision, i; - char format_char, *orig_str = str; - int *int_ptr; - Long64_t long_val; - ULong64_t ulong_val; - char *str_val; - double dbl_val; - int precision_specified = 0; - - if (size <= 0 || str == NULL || format == NULL) - return -1; - - flags = 0; - while (format_ptr < format + strlen(format)) { - if (*format_ptr == '%') { - if (format_ptr[1] == '%' && left > 0) { - *str++ = '%'; - left--; - format_ptr += 2; - } else { - if (left <= 0) { - *str = '\0'; - return -1; /* size; */ - } else { - status = snprintf_get_directive(format_ptr, &flags, &width, - &precision, &format_char, - &ap); - if (status == 0) { - *str = '\0'; - return -2; - } else { - if (precision >= 0) { - precision_specified = 1; - } else { - precision_specified = 0; - precision = 0; - } - format_ptr += status; - /* Print a formatted argument */ - switch (format_char) { - case 'i': - case 'd': - /* Convert to unsigned long int before - actual conversion to string */ - if (flags & IS_LONG_LONG_INT) - long_val = va_arg(ap, Long64_t); - else if (flags & IS_LONG_INT) - long_val = (Long64_t) va_arg(ap, long int); - else - long_val = (Long64_t) va_arg(ap, int); - - if (long_val < 0) { - ulong_val = (ULong64_t) -long_val; - flags |= IS_NEGATIVE; - } else { - ulong_val = (ULong64_t) long_val; - } - status = snprintf_convert_ulong(str, left, 10, - "0123456789", - ulong_val, flags, - width, precision); - str += status; - left -= status; - break; - - case 'x': - if (flags & IS_LONG_LONG_INT) - ulong_val = va_arg(ap, ULong64_t); - else if (flags & IS_LONG_INT) - ulong_val = (ULong64_t) va_arg(ap, unsigned long int); - else - ulong_val = (ULong64_t) va_arg(ap, unsigned int); - - status = snprintf_convert_ulong(str, left, 16, - "0123456789abcdef", - ulong_val, flags, - width, precision); - str += status; - left -= status; - break; - - case 'X': - if (flags & IS_LONG_LONG_INT) - ulong_val = va_arg(ap, ULong64_t); - else if (flags & IS_LONG_INT) - ulong_val = (ULong64_t) va_arg(ap, unsigned long int); - else - ulong_val = (ULong64_t) va_arg(ap, unsigned int); - - status = snprintf_convert_ulong(str, left, 16, - "0123456789ABCDEF", - ulong_val, flags, - width, precision); - str += status; - left -= status; - break; - - case 'o': - if (flags & IS_LONG_LONG_INT) - ulong_val = va_arg(ap, ULong64_t); - else if (flags & IS_LONG_INT) - ulong_val = (ULong64_t) va_arg(ap, unsigned long int); - else - ulong_val = (ULong64_t) va_arg(ap, unsigned int); - - status = snprintf_convert_ulong(str, left, 8, - "01234567", - ulong_val, flags, - width, precision); - str += status; - left -= status; - break; - - case 'u': - if (flags & IS_LONG_LONG_INT) - ulong_val = va_arg(ap, ULong64_t); - else if (flags & IS_LONG_INT) - ulong_val = (ULong64_t) va_arg(ap, unsigned long int); - else - ulong_val = (ULong64_t) va_arg(ap, unsigned int); - - status = snprintf_convert_ulong(str, left, 10, - "0123456789", - ulong_val, flags, - width, precision); - str += status; - left -= status; - break; - - case 'p': - *str++ = '0'; - *str++ = 'x'; - ulong_val = (ULong64_t) va_arg(ap, unsigned long int); - - status = snprintf_convert_ulong(str, left, 16, - "0123456789abcdef", - ulong_val, flags, - width, precision); - str += status; - left -= status; - break; - - case 'c': - if (flags & IS_LONG_LONG_INT) - ulong_val = va_arg(ap, ULong64_t); - else if (flags & IS_LONG_INT) - ulong_val = (ULong64_t) va_arg(ap, unsigned long int); - else - ulong_val = (ULong64_t) va_arg(ap, unsigned int); - - if (width==0) { - *str++ = (unsigned char) ulong_val; - --left; - } else { - if (width > left) - width = left; - i = width - 1; - - if (flags & MINUS_FLAG) { - *str = (unsigned char) ulong_val; - memset(str + 1, - (flags & ZERO_PADDING) ? '0' : ' ', i); - } else { - memset(str, (flags & ZERO_PADDING) ? '0' : ' ', i); - *(str+i) = (unsigned char) ulong_val; - } - str += width; - left -= width; - } - break; - - case 's': - str_val = va_arg(ap, char *); - - if (str_val == NULL || ((long)str_val) == -1) - str_val = "(null)"; - - if (!precision_specified) - precision = strlen(str_val); - else { - if (memchr(str_val, 0, precision) != NULL) - precision = strlen(str_val); - } - if (precision > left) - precision = left; - - if (width > left) - width = left; - if (width < precision) - width = precision; - i = width - precision; - - if (flags & MINUS_FLAG) { - strncpy(str, str_val, precision); - memset(str + precision, - (flags & ZERO_PADDING) ? '0' : ' ', i); - } else { - memset(str, (flags & ZERO_PADDING) ? '0' : ' ', i); - strncpy(str + i, str_val, precision); - } - str += width; - left -= width; - break; - - case 'n': - int_ptr = va_arg(ap, int *); - *int_ptr = str - orig_str; - break; - - case 'f': - case 'e': - case 'E': - case 'g': - case 'G': - if (flags & IS_LONG_DOUBLE) - dbl_val = (double) va_arg(ap, long double); - else - dbl_val = va_arg(ap, double); - status = - snprintf_convert_float(str, left, dbl_val, flags, - width, precision, - format_char); - str += status; - left -= status; - break; - - default: - break; - } - } - } - } - } else { - if (left > 0) { - *str++ = *format_ptr++; - left--; - } else { - *str = '\0'; - return -1; /* size; */ - } - } - } - *str = '\0'; - - if (left <= 0) - return -1; - - return size - left - 1; -} -#endif - -int snprintf(char *str, size_t size, const char *format, ...) -{ - int ret; - va_list ap; - va_start(ap, format); - ret = vsnprintf(str, size, format, ap); - va_end(ap); - - return ret; -} - - - -#ifdef SNTEST - -#include - -/* set of small tests for snprintf() */ -int main() -{ - char holder[100]; - int i; - -/* - printf("Suite of test for snprintf:\n"); - printf("a_format\n"); - printf("printf() format\n"); - printf("snprintf() format\n\n"); -*/ - - /* Checking the field widths */ - printf("/%%d/, 336\n"); - snprintf(holder, sizeof holder, "/%d/\n", 336); - printf("/%d/\n", 336); - printf("%s\n", holder); - - printf("/%%2d/, 336\n"); - snprintf(holder, sizeof holder, "/%2d/\n", 336); - printf("/%2d/\n", 336); - printf("%s\n", holder); - - printf("/%%10d/, 336\n"); - snprintf(holder, sizeof holder, "/%10d/\n", 336); - printf("/%10d/\n", 336); - printf("%s\n", holder); - - printf("/%%-10d/, 336\n"); - snprintf(holder, sizeof holder, "/%-10d/\n", 336); - printf("/%-10d/\n", 336); - printf("%s\n", holder); - - /* floating points */ - printf("/%%f/, 1234.56\n"); - snprintf(holder, sizeof holder, "/%f/\n", 1234.56); - printf("/%f/\n", 1234.56); - printf("%s\n", holder); - - printf("/%%e/, 1234.56\n"); - snprintf(holder, sizeof holder, "/%e/\n", 1234.56); - printf("/%e/\n", 1234.56); - printf("%s\n", holder); - - printf("/%%4.2f/, 1234.56\n"); - snprintf(holder, sizeof holder, "/%4.2f/\n", 1234.56); - printf("/%4.2f/\n", 1234.56); - printf("%s\n", holder); - - printf("/%%3.1f/, 1234.56\n"); - snprintf(holder, sizeof holder, "/%3.1f/\n", 1234.56); - printf("/%3.1f/\n", 1234.56); - printf("%s\n", holder); - - printf("/%%10.3f/, 1234.56\n"); - snprintf(holder, sizeof holder, "/%10.3f/\n", 1234.56); - printf("/%10.3f/\n", 1234.56); - printf("%s\n", holder); - - printf("/%%10.3e/, 1234.56\n"); - snprintf(holder, sizeof holder, "/%10.3e/\n", 1234.56); - printf("/%10.3e/\n", 1234.56); - printf("%s\n", holder); - - printf("/%%+4.2f/, 1234.56\n"); - snprintf(holder, sizeof holder, "/%+4.2f/\n", 1234.56); - printf("/%+4.2f/\n", 1234.56); - printf("%s\n", holder); - - printf("/%%010.2f/, 1234.56\n"); - snprintf(holder, sizeof holder, "/%010.2f/\n", 1234.56); - printf("/%010.2f/\n", 1234.56); - printf("%s\n", holder); - -#define BLURB "Outstanding acting !" - /* strings precisions */ - printf("/%%2s/, \"%s\"\n", BLURB); - snprintf(holder, sizeof holder, "/%2s/\n", BLURB); - printf("/%2s/\n", BLURB); - printf("%s\n", holder); - - printf("/%%22s/ %s\n", BLURB); - snprintf(holder, sizeof holder, "/%22s/\n", BLURB); - printf("/%22s/\n", BLURB); - printf("%s\n", holder); - - printf("/%%22.5s/ %s\n", BLURB); - snprintf(holder, sizeof holder, "/%22.5s/\n", BLURB); - printf("/%22.5s/\n", BLURB); - printf("%s\n", holder); - - printf("/%%-22.5s/ %s\n", BLURB); - snprintf(holder, sizeof holder, "/%-22.5s/\n", BLURB); - printf("/%-22.5s/\n", BLURB); - printf("%s\n", holder); - - /* see some flags */ - printf("%%x %%X %%#x, 31, 31, 31\n"); - snprintf(holder, sizeof holder, "%x %X %#x\n", 31, 31, 31); - printf("%x %X %#x\n", 31, 31, 31); - printf("%s\n", holder); - - printf("**%%d**%% d**%% d**, 42, 42, -42\n"); - snprintf(holder, sizeof holder, "**%d**% d**% d**\n", 42, 42, -42); - printf("**%d**% d**% d**\n", 42, 42, -42); - printf("%s\n", holder); - - /* other flags */ - printf("/%%g/, 31.4\n"); - snprintf(holder, sizeof holder, "/%g/\n", 31.4); - printf("/%g/\n", 31.4); - printf("%s\n", holder); - - printf("/%%.6g/, 31.4\n"); - snprintf(holder, sizeof holder, "/%.6g/\n", 31.4); - printf("/%.6g/\n", 31.4); - printf("%s\n", holder); - - printf("/%%.1G/, 31.4\n"); - snprintf(holder, sizeof holder, "/%.1G/\n", 31.4); - printf("/%.1G/\n", 31.4); - printf("%s\n", holder); - - printf("abc%%n\n"); - printf("abc%n", &i); - printf("%d\n", i); - snprintf(holder, sizeof holder, "abc%n", &i); - printf("%s", holder); - printf("%d\n\n", i); - - printf("%%*.*s --> 10.10\n"); - snprintf(holder, sizeof holder, "%*.*s\n", 10, 10, BLURB); - printf("%*.*s\n", 10, 10, BLURB); - printf("%s\n", holder); - - printf("%%%%%%%%\n"); - snprintf(holder, sizeof holder, "%%%%\n"); - printf("%%%%\n"); - printf("%s\n", holder); - -#define BIG "Hello this is a too big string for the buffer" - /* printf("A buffer of size 10, trying to put this:\n");*/ - printf("<%%s>, %s\n", BIG); - i = snprintf(holder, 10, "%s", BIG); - printf("<%s>\n", BIG); - printf("<%s> i = %d\n", holder, i); - i = snprintf(holder, sizeof holder, "%s", BIG); - printf("<%s> i = %d\n", holder, i); - - return 0; -} -#endif - -#endif /* defined(NEED_SNPRINTF) || defined(SNTEST) */ diff --git a/core/cont/src/TClonesArray.cxx b/core/cont/src/TClonesArray.cxx index a81ecff411dce..6d464ffa81aec 100644 --- a/core/cont/src/TClonesArray.cxx +++ b/core/cont/src/TClonesArray.cxx @@ -131,8 +131,8 @@ When investigating misuse of TClonesArray, please make sure of the following: #include "TClass.h" #include "TObject.h" #include "TObjectTable.h" -#include "snprintf.h" +#include #include diff --git a/core/dictgen/src/rootcling_impl.cxx b/core/dictgen/src/rootcling_impl.cxx index ca014811df3fc..59581197d6182 100644 --- a/core/dictgen/src/rootcling_impl.cxx +++ b/core/dictgen/src/rootcling_impl.cxx @@ -15,7 +15,6 @@ #include "RConversionRuleParser.h" #include #include -#include "snprintf.h" #include #include @@ -23,7 +22,6 @@ #include #include #include - #include #include #include diff --git a/core/foundation/inc/ROOT/RConfig.hxx b/core/foundation/inc/ROOT/RConfig.hxx index 6f49eedae02f9..4747b8fbc5601 100644 --- a/core/foundation/inc/ROOT/RConfig.hxx +++ b/core/foundation/inc/ROOT/RConfig.hxx @@ -62,9 +62,6 @@ # ifdef __LP64__ # define R__B64 # endif -# ifdef R__HPUX10 -# define NEED_SNPRINTF -# endif #endif #if defined(__linux) || defined(__linux__) @@ -253,7 +250,6 @@ # define ANSICPP # define NEED_SIGJMP # define NEED_STRCASECMP -# define NEED_SNPRINTF #endif #if defined(__FreeBSD__) @@ -318,7 +314,6 @@ # define R__HIUX # define R__UNIX # define NEED_SIGJMP -# define NEED_SNPRINTF # define ANSICPP #endif @@ -386,7 +381,6 @@ # if defined(WIN32) # define NEED_STRING # define NEED_STRCASECMP -# define NEED_SNPRINTF # define ANSICPP # else # define MSDOS @@ -399,13 +393,7 @@ # define R__VISUAL_CPLUSPLUS # define NEED_STRING # define NEED_STRCASECMP -# if _MSC_VER < 1900 -# define NEED_SNPRINTF -# endif # define ANSICPP -# if _MSC_VER >= 1400 -# define DONTNEED_VSNPRINTF -# endif # if _MSC_VER < 1310 # define R__NO_CLASS_TEMPLATE_SPECIALIZATION # endif diff --git a/core/gui/src/TToggle.cxx b/core/gui/src/TToggle.cxx index 93be5fedfb8f7..836a90dc0df15 100644 --- a/core/gui/src/TToggle.cxx +++ b/core/gui/src/TToggle.cxx @@ -31,8 +31,8 @@ with name GetXXX, IsXXX or HasXXX for given object. #include "TMethodCall.h" #include "TToggle.h" #include "TDataMember.h" -#include "snprintf.h" +#include //////////////////////////////////////////////////////////////////////////////// /// TToggle default constructor. You have to initialize it before using diff --git a/core/meta/src/TClass.cxx b/core/meta/src/TClass.cxx index 272ec5cf10ed1..53efdc205b1c2 100644 --- a/core/meta/src/TClass.cxx +++ b/core/meta/src/TClass.cxx @@ -42,7 +42,6 @@ In order to access the name of a class within the ROOT type system, the method T #include "TClass.h" #include "strlcpy.h" -#include "snprintf.h" #include "TBaseClass.h" #include "TBrowser.h" #include "TBuffer.h" diff --git a/core/meta/src/TMethod.cxx b/core/meta/src/TMethod.cxx index e57d69ed28db4..cba24db06de86 100644 --- a/core/meta/src/TMethod.cxx +++ b/core/meta/src/TMethod.cxx @@ -20,7 +20,6 @@ #include "strtok.h" #include "strlcpy.h" -#include "snprintf.h" #include "TClass.h" #include "TList.h" #include "TMethod.h" @@ -30,7 +29,7 @@ #include "Strlen.h" #include "TDataMember.h" - +#include //////////////////////////////////////////////////////////////////////////////// /// Default TMethod ctor. TMethods are constructed in TClass. diff --git a/core/meta/src/TStreamerElement.cxx b/core/meta/src/TStreamerElement.cxx index 71eaa795daca9..7147929f3699b 100644 --- a/core/meta/src/TStreamerElement.cxx +++ b/core/meta/src/TStreamerElement.cxx @@ -32,8 +32,8 @@ #include "TVirtualMutex.h" #include "TVirtualCollectionProxy.h" #include "strlcpy.h" -#include "snprintf.h" +#include #include using std::string; diff --git a/core/metacling/src/TCling.cxx b/core/metacling/src/TCling.cxx index 32c8187c59694..dc4491a0ac83f 100644 --- a/core/metacling/src/TCling.cxx +++ b/core/metacling/src/TCling.cxx @@ -63,7 +63,6 @@ clang/LLVM technology. #include "RConfigure.h" #include "compiledata.h" #include "strlcpy.h" -#include "snprintf.h" #include "TClingUtils.h" #include "TVirtualCollectionProxy.h" #include "TVirtualStreamerInfo.h" @@ -136,6 +135,7 @@ clang/LLVM technology. #include #include #include +#include #include #include #include diff --git a/core/rint/src/TRint.cxx b/core/rint/src/TRint.cxx index 7b27ae32ee655..d083487881191 100644 --- a/core/rint/src/TRint.cxx +++ b/core/rint/src/TRint.cxx @@ -44,8 +44,8 @@ #include #include "Getline.h" #include "strlcpy.h" -#include "snprintf.h" +#include #ifdef R__UNIX #include #include diff --git a/core/thread/src/TThread.cxx b/core/thread/src/TThread.cxx index 0c67a37fa422d..7d7766cb0be6e 100644 --- a/core/thread/src/TThread.cxx +++ b/core/thread/src/TThread.cxx @@ -39,7 +39,8 @@ TPosixThread or TWin32Thread). #include "ThreadLocalStorage.h" #include "TThreadSlots.h" #include "TRWMutexImp.h" -#include "snprintf.h" + +#include TThreadImp *TThread::fgThreadImp = nullptr; Long_t TThread::fgMainId = 0; diff --git a/core/unix/src/TUnixSystem.cxx b/core/unix/src/TUnixSystem.cxx index 5fe7ac64446e5..cc2e7743f1414 100644 --- a/core/unix/src/TUnixSystem.cxx +++ b/core/unix/src/TUnixSystem.cxx @@ -35,8 +35,9 @@ #include "TVirtualMutex.h" #include "ThreadLocalStorage.h" #include "TObjArray.h" -#include "snprintf.h" #include "strlcpy.h" + +#include #include #include #include diff --git a/core/winnt/src/TWinNTSystem.cxx b/core/winnt/src/TWinNTSystem.cxx index 98d10a5319893..da6337d5678eb 100644 --- a/core/winnt/src/TWinNTSystem.cxx +++ b/core/winnt/src/TWinNTSystem.cxx @@ -39,7 +39,6 @@ #include "TVirtualX.h" #include "TUrl.h" #include "ThreadLocalStorage.h" -#include "snprintf.h" #include "strlcpy.h" #include diff --git a/graf2d/asimage/src/TASImage.cxx b/graf2d/asimage/src/TASImage.cxx index 45761ecc22bc8..bc874b274973b 100644 --- a/graf2d/asimage/src/TASImage.cxx +++ b/graf2d/asimage/src/TASImage.cxx @@ -88,8 +88,7 @@ ROOT tutorials: `$ROOTSYS/tutorials/visualisation/image/` #include #include #include - -#include "snprintf.h" +#include #ifndef WIN32 #ifndef R__HAS_COCOA diff --git a/graf2d/asimage/src/TASPaletteEditor.cxx b/graf2d/asimage/src/TASPaletteEditor.cxx index 0ea09d1d6ce67..ce11d5aa09c1b 100644 --- a/graf2d/asimage/src/TASPaletteEditor.cxx +++ b/graf2d/asimage/src/TASPaletteEditor.cxx @@ -32,7 +32,8 @@ It is called by a pull down menu item of TASImage. #include "RConfigure.h" #include "TVirtualX.h" #include "strlcpy.h" -#include "snprintf.h" + +#include #ifdef R__HAS_COCOA # define X_DISPLAY_MISSING 1 diff --git a/graf2d/gpad/src/TCanvas.cxx b/graf2d/gpad/src/TCanvas.cxx index ee2b1a0819f32..41e916b43f613 100644 --- a/graf2d/gpad/src/TCanvas.cxx +++ b/graf2d/gpad/src/TCanvas.cxx @@ -47,10 +47,11 @@ #include "TMath.h" #include "TView.h" #include "strlcpy.h" -#include "snprintf.h" #include "TVirtualMutex.h" +#include + class TCanvasInit { public: TCanvasInit() { TApplication::NeedGraphicsLibs(); } diff --git a/graf2d/gpad/src/TClassTree.cxx b/graf2d/gpad/src/TClassTree.cxx index e567a82233089..e4dd5745e8108 100644 --- a/graf2d/gpad/src/TClassTree.cxx +++ b/graf2d/gpad/src/TClassTree.cxx @@ -27,8 +27,8 @@ #include "TSystem.h" #include "TObjString.h" #include "strlcpy.h" -#include "snprintf.h" +#include #include #include diff --git a/graf2d/gpad/src/TColorWheel.cxx b/graf2d/gpad/src/TColorWheel.cxx index 1ea7215cf6306..11a7a5f0775fa 100644 --- a/graf2d/gpad/src/TColorWheel.cxx +++ b/graf2d/gpad/src/TColorWheel.cxx @@ -18,7 +18,8 @@ #include "TLine.h" #include "TColor.h" #include "TMath.h" -#include "snprintf.h" + +#include /** \class TColorWheel diff --git a/graf2d/gpad/src/TGroupButton.cxx b/graf2d/gpad/src/TGroupButton.cxx index a11a55a00da2f..a4bbcd576fa90 100644 --- a/graf2d/gpad/src/TGroupButton.cxx +++ b/graf2d/gpad/src/TGroupButton.cxx @@ -17,8 +17,8 @@ #include "TText.h" #include "TInterpreter.h" #include "strlcpy.h" -#include "snprintf.h" +#include #include #include diff --git a/graf2d/gpad/src/TInspectCanvas.cxx b/graf2d/gpad/src/TInspectCanvas.cxx index a71c85b9e722d..7f28e7ce1db68 100644 --- a/graf2d/gpad/src/TInspectCanvas.cxx +++ b/graf2d/gpad/src/TInspectCanvas.cxx @@ -21,8 +21,8 @@ #include "TDataType.h" #include "TRealData.h" #include "strlcpy.h" -#include "snprintf.h" +#include /** \class TInspectorObject diff --git a/graf2d/gpad/src/TPad.cxx b/graf2d/gpad/src/TPad.cxx index 85497b4c92e64..55959ec00b95c 100644 --- a/graf2d/gpad/src/TPad.cxx +++ b/graf2d/gpad/src/TPad.cxx @@ -61,10 +61,11 @@ #include "TAtt3D.h" #include "TVirtualPadPainter.h" #include "strlcpy.h" -#include "snprintf.h" #include "TVirtualMutex.h" +#include + static Int_t gReadLevel = 0; Int_t TPad::fgMaxPickDistance = 5; diff --git a/graf2d/graf/src/TGaxis.cxx b/graf2d/graf/src/TGaxis.cxx index 13b9bfd3d3fc9..9c41e545b2e4a 100644 --- a/graf2d/graf/src/TGaxis.cxx +++ b/graf2d/graf/src/TGaxis.cxx @@ -9,12 +9,6 @@ * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ -#include -#include -#include -#include -#include - #include "TROOT.h" #include "TBuffer.h" #include "TGaxis.h" @@ -33,7 +27,13 @@ #include "TColor.h" #include "TTimeStamp.h" #include "strlcpy.h" -#include "snprintf.h" + +#include +#include +#include +#include +#include +#include const Int_t kHori = BIT(9); diff --git a/graf2d/graf/src/TLatex.cxx b/graf2d/graf/src/TLatex.cxx index 0a09a75fb41b1..cacbd43884ef3 100644 --- a/graf2d/graf/src/TLatex.cxx +++ b/graf2d/graf/src/TLatex.cxx @@ -9,7 +9,6 @@ * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ -#include #include "TROOT.h" #include "TLatex.h" #include "TMathText.h" @@ -17,7 +16,9 @@ #include "TVirtualPad.h" #include "TVirtualPadPainter.h" #include "TVirtualPS.h" -#include "snprintf.h" + +#include +#include const Double_t kPI = TMath::Pi(); diff --git a/graf2d/graf/src/TLink.cxx b/graf2d/graf/src/TLink.cxx index cbe6c34c7132f..39bc5bf9ef8b2 100644 --- a/graf2d/graf/src/TLink.cxx +++ b/graf2d/graf/src/TLink.cxx @@ -9,13 +9,11 @@ * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ -#include - #include "TVirtualPad.h" #include "TClass.h" #include "TLink.h" -#include "snprintf.h" +#include /** \class TLink \ingroup BasicGraphics diff --git a/graf2d/graf/src/TMarker.cxx b/graf2d/graf/src/TMarker.cxx index 5f6531d107c22..8c97a0b1f4d38 100644 --- a/graf2d/graf/src/TMarker.cxx +++ b/graf2d/graf/src/TMarker.cxx @@ -9,9 +9,6 @@ * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ -#include -#include - #include "TROOT.h" #include "TBuffer.h" #include "TVirtualPad.h" @@ -20,8 +17,10 @@ #include "TMath.h" #include "TPoint.h" #include "TText.h" -#include "snprintf.h" +#include +#include +#include /** \class TMarker diff --git a/graf2d/postscript/src/TPDF.cxx b/graf2d/postscript/src/TPDF.cxx index 3d67b69be8d97..082fdd67735c2 100644 --- a/graf2d/postscript/src/TPDF.cxx +++ b/graf2d/postscript/src/TPDF.cxx @@ -53,11 +53,6 @@ the table of contents. #pragma optimize("",off) #endif -#include -#include -#include -#include - #include "TROOT.h" #include "TDatime.h" #include "TColor.h" @@ -73,7 +68,12 @@ the table of contents. #include "zlib.h" #include "TObjString.h" #include "TObjArray.h" -#include "snprintf.h" + +#include +#include +#include +#include +#include // To scale fonts to the same size as the old TT version const Float_t kScale = 0.93376068; diff --git a/graf2d/postscript/src/TPostScript.cxx b/graf2d/postscript/src/TPostScript.cxx index 08ea96937c50b..904b774bbd20c 100644 --- a/graf2d/postscript/src/TPostScript.cxx +++ b/graf2d/postscript/src/TPostScript.cxx @@ -229,14 +229,7 @@ To change the color model use `gStyle->SetColorModelPS(c)`. #pragma optimize("",off) #endif -#include -#include -#include -#include -#include - #include "strlcpy.h" -#include "snprintf.h" #include "Byteswap.h" #include "TROOT.h" #include "TDatime.h" @@ -252,6 +245,13 @@ To change the color model use `gStyle->SetColorModelPS(c)`. #include "TSystem.h" #include "TEnv.h" +#include +#include +#include +#include +#include +#include + #include "mathtext/fontembed.h" // to scale fonts to the same size as the old TT version diff --git a/graf2d/postscript/src/TSVG.cxx b/graf2d/postscript/src/TSVG.cxx index 435371d594955..5f13852084930 100644 --- a/graf2d/postscript/src/TSVG.cxx +++ b/graf2d/postscript/src/TSVG.cxx @@ -13,12 +13,6 @@ #pragma optimize("",off) #endif -#include -#include -#include -#include -#include - #include "TROOT.h" #include "TDatime.h" #include "TBase64.h" @@ -32,7 +26,13 @@ #include "TMath.h" #include "TObjString.h" #include "TObjArray.h" -#include "snprintf.h" + +#include +#include +#include +#include +#include +#include Int_t TSVG::fgLineJoin = 0; Int_t TSVG::fgLineCap = 0; diff --git a/graf3d/gl/src/TGLSAViewer.cxx b/graf3d/gl/src/TGLSAViewer.cxx index e0d4271fd4552..82141e8d7f857 100644 --- a/graf3d/gl/src/TGLSAViewer.cxx +++ b/graf3d/gl/src/TGLSAViewer.cxx @@ -9,8 +9,6 @@ * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ -#include - #include "TRootHelpDialog.h" #include "TPluginManager.h" #include "TApplication.h" @@ -24,7 +22,6 @@ #include "TGMenu.h" #include "TGSplitter.h" #include "TGButton.h" -#include "snprintf.h" #include "TVirtualPad.h" #include "TGedEditor.h" @@ -51,6 +48,8 @@ #include "TGLSAFrame.h" #include "TGLEventHandler.h" +#include +#include const char * TGLSAViewer::fgHelpText1 = "\ DIRECT SCENE INTERACTIONS\n\n\ diff --git a/graf3d/x3d/src/TViewerX3D.cxx b/graf3d/x3d/src/TViewerX3D.cxx index 62b5a5b46681e..b1675d0e85f46 100644 --- a/graf3d/x3d/src/TViewerX3D.cxx +++ b/graf3d/x3d/src/TViewerX3D.cxx @@ -22,7 +22,6 @@ #include "TView.h" #include "TMath.h" #include "TROOT.h" -#include "snprintf.h" #include "TRootHelpDialog.h" #include "TGClient.h" @@ -38,6 +37,7 @@ #include "HelpText.h" #include +#include const char gHelpX3DViewer[] = "\ PRESS \n\ diff --git a/gui/browsable/src/RSysFile.cxx b/gui/browsable/src/RSysFile.cxx index f6d45bfb7e598..7160c8067e151 100644 --- a/gui/browsable/src/RSysFile.cxx +++ b/gui/browsable/src/RSysFile.cxx @@ -23,8 +23,8 @@ #include "TROOT.h" #include "TList.h" #include "TBase64.h" -#include "snprintf.h" +#include #include #include #include diff --git a/gui/ged/src/TAttTextEditor.cxx b/gui/ged/src/TAttTextEditor.cxx index 5e5afdc52e648..475e10363b48d 100644 --- a/gui/ged/src/TAttTextEditor.cxx +++ b/gui/ged/src/TAttTextEditor.cxx @@ -30,7 +30,8 @@ Implements GUI for editing text attributes. #include "TGNumberEntry.h" #include "TCanvas.h" #include "TROOT.h" -#include "snprintf.h" + +#include enum ETextWid { diff --git a/gui/ged/src/TGedPatternSelect.cxx b/gui/ged/src/TGedPatternSelect.cxx index 6a7761d717d8a..3cb7f69145e3f 100644 --- a/gui/ged/src/TGedPatternSelect.cxx +++ b/gui/ged/src/TGedPatternSelect.cxx @@ -75,8 +75,8 @@ is a popup window. #include "TGButton.h" #include "RStipples.h" #include "TVirtualX.h" -#include "snprintf.h" +#include #include diff --git a/gui/ged/src/TPieEditor.cxx b/gui/ged/src/TPieEditor.cxx index bb4aac5cbfb9d..aab776a536165 100644 --- a/gui/ged/src/TPieEditor.cxx +++ b/gui/ged/src/TPieEditor.cxx @@ -33,7 +33,8 @@ Implements GUI for pie-chart attributes. #include "TBox.h" #include "TPaveLabel.h" #include "TVirtualX.h" -#include "snprintf.h" + +#include enum EPieWid { diff --git a/gui/ged/src/TStyleManager.cxx b/gui/ged/src/TStyleManager.cxx index 8c4c837afde41..af96c9d878ada 100644 --- a/gui/ged/src/TStyleManager.cxx +++ b/gui/ged/src/TStyleManager.cxx @@ -129,13 +129,14 @@ Provides a help of the currently selected tab. #include #include #include -#include #include #include #include #include #include +#include + TStyleManager *TStyleManager::fgStyleManager = nullptr; diff --git a/gui/gui/src/TGClient.cxx b/gui/gui/src/TGClient.cxx index 6782670e813b4..9d9079994c489 100644 --- a/gui/gui/src/TGClient.cxx +++ b/gui/gui/src/TGClient.cxx @@ -49,7 +49,8 @@ class is used to make the initial connection to the window server. #include "TGIdleHandler.h" #include "TError.h" #include "TGlobal.h" -#include "snprintf.h" + +#include // Global pointer to the TGClient object static TGClient *gClientGlobal = nullptr; diff --git a/gui/gui/src/TGColorDialog.cxx b/gui/gui/src/TGColorDialog.cxx index cc5e0c85450f1..1191601025816 100644 --- a/gui/gui/src/TGColorDialog.cxx +++ b/gui/gui/src/TGColorDialog.cxx @@ -55,9 +55,6 @@ It uses 2 TGColorPalette's and the TGColorPick widgets. */ - -#include - #include "TGLabel.h" #include "TGMsgBox.h" // for ID_OK, ID_CANCEL #include "TGLayout.h" @@ -76,9 +73,9 @@ It uses 2 TGColorPalette's and the TGColorPick widgets. #include "TROOT.h" #include "TMath.h" #include "TVirtualX.h" -#include "snprintf.h" - +#include +#include // TODO: // - implement "custom" colors. diff --git a/gui/gui/src/TGFSContainer.cxx b/gui/gui/src/TGFSContainer.cxx index 779d7124c0326..26f9c883215fe 100644 --- a/gui/gui/src/TGFSContainer.cxx +++ b/gui/gui/src/TGFSContainer.cxx @@ -54,8 +54,8 @@ Utility class used by the file selection dialog (TGFSDialog). #include "TRemoteObject.h" #include "TBufferFile.h" #include "TImage.h" -#include "snprintf.h" +#include #include #include #include diff --git a/gui/gui/src/TGFileBrowser.cxx b/gui/gui/src/TGFileBrowser.cxx index 5729132166c7b..f7179b0ee4995 100644 --- a/gui/gui/src/TGFileBrowser.cxx +++ b/gui/gui/src/TGFileBrowser.cxx @@ -36,10 +36,6 @@ #include "TKeyMapFile.h" #include "TVirtualPad.h" #include "Getline.h" -#include "snprintf.h" -#include -#include -#include #include "TGFileBrowser.h" #include "TRootBrowser.h" @@ -52,6 +48,11 @@ #include "RConfigure.h" +#include +#include +#include +#include + #ifdef WIN32 const char rootdir[] = "\\"; #else diff --git a/gui/gui/src/TGFont.cxx b/gui/gui/src/TGFont.cxx index 4449482cf04ab..71b551c5d9415 100644 --- a/gui/gui/src/TGFont.cxx +++ b/gui/gui/src/TGFont.cxx @@ -53,8 +53,8 @@ It can be displayed with respect to any origin. #include "TError.h" #include "TMath.h" #include "strlcpy.h" -#include "snprintf.h" +#include #include #include #include diff --git a/gui/gui/src/TGListTree.cxx b/gui/gui/src/TGListTree.cxx index 8a187dad730d7..6cd8e8928b1aa 100644 --- a/gui/gui/src/TGListTree.cxx +++ b/gui/gui/src/TGListTree.cxx @@ -37,10 +37,6 @@ A list tree can generate the following events: */ - -#include -#include - #include "TClass.h" #include "TGListTree.h" #include "TGPicture.h" @@ -62,7 +58,10 @@ A list tree can generate the following events: #include "TVirtualX.h" #include "RConfigure.h" #include "strlcpy.h" -#include "snprintf.h" + +#include +#include +#include Pixel_t TGListTree::fgGrayPixel = 0; const TGFont *TGListTree::fgDefaultFont = nullptr; diff --git a/gui/gui/src/TGMenu.cxx b/gui/gui/src/TGMenu.cxx index bf55f92d07eaa..f46f85fe99675 100644 --- a/gui/gui/src/TGMenu.cxx +++ b/gui/gui/src/TGMenu.cxx @@ -73,8 +73,8 @@ kC_COMMAND, kCM_MENU, menu id, user data. #include "TParameter.h" #include "RConfigure.h" #include "TVirtualX.h" -#include "snprintf.h" +#include #include const TGGC *TGPopupMenu::fgDefaultGC = nullptr; diff --git a/gui/gui/src/TGNumberEntry.cxx b/gui/gui/src/TGNumberEntry.cxx index 037004ec7943c..73d08dee51099 100644 --- a/gui/gui/src/TGNumberEntry.cxx +++ b/gui/gui/src/TGNumberEntry.cxx @@ -84,8 +84,8 @@ Hitting the tab key will generate: #include "TMath.h" #include "TVirtualX.h" #include "strlcpy.h" -#include "snprintf.h" +#include #include #include diff --git a/gui/gui/src/TGSpeedo.cxx b/gui/gui/src/TGSpeedo.cxx index 01099c31fe6b2..95c7ededd2bdd 100644 --- a/gui/gui/src/TGSpeedo.cxx +++ b/gui/gui/src/TGSpeedo.cxx @@ -33,9 +33,9 @@ Two signals are available: #include "TImage.h" #include "TMath.h" #include "TVirtualX.h" -#include "snprintf.h" - #include "TGSpeedo.h" + +#include #include diff --git a/gui/gui/src/TGSplitFrame.cxx b/gui/gui/src/TGSplitFrame.cxx index f5ffc1b4d6446..3d6fb35d25e26 100644 --- a/gui/gui/src/TGSplitFrame.cxx +++ b/gui/gui/src/TGSplitFrame.cxx @@ -23,8 +23,8 @@ #include "TClass.h" #include "TList.h" #include "TVirtualX.h" -#include "snprintf.h" +#include #include /** \class TGSplitFrame diff --git a/gui/gui/src/TGTextEditDialogs.cxx b/gui/gui/src/TGTextEditDialogs.cxx index 4732a2ebfa057..b5a53e69a4c9f 100644 --- a/gui/gui/src/TGTextEditDialogs.cxx +++ b/gui/gui/src/TGTextEditDialogs.cxx @@ -43,8 +43,8 @@ and TGPrintDialog. #include "TObjArray.h" #include "TVirtualX.h" #include "strlcpy.h" -#include "snprintf.h" +#include #include diff --git a/gui/gui/src/TRootBrowser.cxx b/gui/gui/src/TRootBrowser.cxx index b63b7330de349..e85ba54768025 100644 --- a/gui/gui/src/TRootBrowser.cxx +++ b/gui/gui/src/TRootBrowser.cxx @@ -93,7 +93,8 @@ Here is the list of available options: #include "Getline.h" #include "TVirtualX.h" #include "strlcpy.h" -#include "snprintf.h" + +#include #ifdef WIN32 #include diff --git a/gui/gui/src/TRootBrowserLite.cxx b/gui/gui/src/TRootBrowserLite.cxx index 6c836fb3c6143..c46f19fb88d2e 100644 --- a/gui/gui/src/TRootBrowserLite.cxx +++ b/gui/gui/src/TRootBrowserLite.cxx @@ -67,7 +67,6 @@ Explorer). The widgets used are the new native ROOT GUI widgets. #include "TBufferFile.h" #include "TFolder.h" #include "Getline.h" -#include "snprintf.h" #include "TVirtualX.h" #include "HelpText.h" @@ -76,6 +75,7 @@ Explorer). The widgets used are the new native ROOT GUI widgets. #include "TWin32SplashThread.h" #endif +#include // Browser menu command ids enum ERootBrowserCommands { kFileNewBrowserLite, diff --git a/gui/gui/src/TRootContextMenu.cxx b/gui/gui/src/TRootContextMenu.cxx index 5852e042d39e4..756976bb89355 100644 --- a/gui/gui/src/TRootContextMenu.cxx +++ b/gui/gui/src/TRootContextMenu.cxx @@ -47,7 +47,8 @@ The picture below shows a canvas with a pop-up menu. #include "KeySymbols.h" #include "RConfigure.h" #include "strlcpy.h" -#include "snprintf.h" + +#include enum EContextMenu { kToggleStart = 1000, // first id of toggle menu items diff --git a/gui/guibuilder/src/TGuiBldDragManager.cxx b/gui/guibuilder/src/TGuiBldDragManager.cxx index 16693bf7febb9..37d096771ae54 100644 --- a/gui/guibuilder/src/TGuiBldDragManager.cxx +++ b/gui/guibuilder/src/TGuiBldDragManager.cxx @@ -53,7 +53,8 @@ #include "TGScrollBar.h" #include "TVirtualX.h" #include "strlcpy.h" -#include "snprintf.h" + +#include #undef DEBUG_LOCAL diff --git a/gui/guihtml/src/TGHtml.cxx b/gui/guihtml/src/TGHtml.cxx index 2ce76e9751f49..deb1d42d714ae 100644 --- a/gui/guihtml/src/TGHtml.cxx +++ b/gui/guihtml/src/TGHtml.cxx @@ -31,11 +31,6 @@ **************************************************************************/ -#include -#include -#include -#include - #include "TGHtml.h" #include "THashTable.h" #include "TObjString.h" @@ -50,7 +45,12 @@ #include "TGMenu.h" #include "TVirtualX.h" #include "strlcpy.h" -#include "snprintf.h" + +#include +#include +#include +#include +#include /** \class TGHtml diff --git a/gui/guihtml/src/TGHtmlForm.cxx b/gui/guihtml/src/TGHtmlForm.cxx index 09202ab24dd35..de082b7d7ae52 100644 --- a/gui/guihtml/src/TGHtmlForm.cxx +++ b/gui/guihtml/src/TGHtmlForm.cxx @@ -33,17 +33,17 @@ // Routines used for processing HTML makeup for forms. -#include -#include -#include - #include "TGHtml.h" #include "TGButton.h" #include "TGTextEntry.h" #include "TGListBox.h" #include "TGTextEdit.h" #include "TGComboBox.h" -#include "snprintf.h" + +#include +#include +#include +#include //////////////////////////////////////////////////////////////////////////////// /// Unmap any input control that is currently mapped. diff --git a/gui/guihtml/src/TGHtmlImage.cxx b/gui/guihtml/src/TGHtmlImage.cxx index 81e9baa8cdf32..682b358c1b862 100644 --- a/gui/guihtml/src/TGHtmlImage.cxx +++ b/gui/guihtml/src/TGHtmlImage.cxx @@ -33,17 +33,17 @@ // Routines used for processing markup -#include -#include - #include "TGHtml.h" -#include "snprintf.h" #include "TImage.h" #include "TUrl.h" #include "TSocket.h" #include "TSystem.h" #include "TError.h" +#include +#include +#include + //////////////////////////////////////////////////////////////////////////////// /// ctor. diff --git a/gui/guihtml/src/TGHtmlParse.cxx b/gui/guihtml/src/TGHtmlParse.cxx index f332fc16102fe..c0a139f867483 100644 --- a/gui/guihtml/src/TGHtmlParse.cxx +++ b/gui/guihtml/src/TGHtmlParse.cxx @@ -33,16 +33,15 @@ // A tokenizer that converts raw HTML into a linked list of HTML elements. +#include "TGHtml.h" +#include "TGHtmlTokens.h" +#include "strlcpy.h" + #include #include #include #include -#include "TGHtml.h" -#include "TGHtmlTokens.h" -#include "strlcpy.h" -#include "snprintf.h" - //---------------------------------------------------------------------- extern SHtmlTokenMap_t HtmlMarkupMap[]; diff --git a/gui/guihtml/src/TGHtmlSizer.cxx b/gui/guihtml/src/TGHtmlSizer.cxx index d0dc3ac3d2b1b..1bff78afe18ad 100644 --- a/gui/guihtml/src/TGHtmlSizer.cxx +++ b/gui/guihtml/src/TGHtmlSizer.cxx @@ -25,14 +25,14 @@ // Routines used to compute the style and size of individual elements. -#include -#include -#include - #include "TGHtml.h" #include "TImage.h" #include "TVirtualX.h" -#include "snprintf.h" + +#include +#include +#include +#include //////////////////////////////////////////////////////////////////////////////// /// Get the current rendering style. In other words, get the style diff --git a/gui/guihtml/src/TGHtmlTable.cxx b/gui/guihtml/src/TGHtmlTable.cxx index 089c3eded2805..c99c0aa3f528a 100644 --- a/gui/guihtml/src/TGHtmlTable.cxx +++ b/gui/guihtml/src/TGHtmlTable.cxx @@ -25,13 +25,13 @@ // Routines for doing layout of HTML tables +#include "TGHtml.h" + #include #include #include #include - -#include "TGHtml.h" -#include "snprintf.h" +#include // Default values for various table style parameters diff --git a/hist/hbook/src/THbookFile.cxx b/hist/hbook/src/THbookFile.cxx index 91212285f389b..613a7c8432547 100644 --- a/hist/hbook/src/THbookFile.cxx +++ b/hist/hbook/src/THbookFile.cxx @@ -31,10 +31,6 @@ THbookFile can be browsed via TBrowser. */ -#include -#include -#include - #include "TROOT.h" #include "THbookFile.h" #include "TH2.h" @@ -49,7 +45,11 @@ #include "TSystem.h" #include "TMath.h" #include "strlcpy.h" -#include "snprintf.h" + +#include +#include +#include +#include // NOTE: THe following comments and declarations are a duplicate // of those in main/src/h2root.cxx diff --git a/hist/hbook/src/THbookKey.cxx b/hist/hbook/src/THbookKey.cxx index 5daf4acc6baca..c175dd40fd863 100644 --- a/hist/hbook/src/THbookKey.cxx +++ b/hist/hbook/src/THbookKey.cxx @@ -12,7 +12,8 @@ #include "THbookKey.h" #include "THbookTree.h" #include "TBrowser.h" -#include "snprintf.h" + +#include /** \class THbookKey diff --git a/hist/hist/src/TAxis.cxx b/hist/hist/src/TAxis.cxx index f642288ebaf00..f6f6e9154d82c 100644 --- a/hist/hist/src/TAxis.cxx +++ b/hist/hist/src/TAxis.cxx @@ -24,10 +24,10 @@ #include "TMath.h" #include "THLimitsFinder.h" #include "strlcpy.h" -#include "snprintf.h" #include #include +#include #include #include diff --git a/hist/hist/src/TF1.cxx b/hist/hist/src/TF1.cxx index 740b7c4a4492f..8ca357fde9959 100644 --- a/hist/hist/src/TF1.cxx +++ b/hist/hist/src/TF1.cxx @@ -9,10 +9,7 @@ * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ -#include -#include #include "strlcpy.h" -#include "snprintf.h" #include "TROOT.h" #include "TBuffer.h" #include "TMath.h" @@ -57,6 +54,10 @@ #include "AnalyticalIntegrals.h" +#include +#include +#include + std::atomic TF1::fgAbsValue(kFALSE); Bool_t TF1::fgRejectPoint = kFALSE; std::atomic TF1::fgAddToGlobList(kTRUE); diff --git a/hist/hist/src/TF2.cxx b/hist/hist/src/TF2.cxx index 04f99ec0085e2..8959e7d7dce5c 100644 --- a/hist/hist/src/TF2.cxx +++ b/hist/hist/src/TF2.cxx @@ -16,11 +16,12 @@ #include "TBuffer.h" #include "TH2.h" #include "TVirtualPad.h" -#include #include "TColor.h" #include "TVirtualFitter.h" #include "Math/IntegratorOptions.h" -#include "snprintf.h" + +#include +#include /** \class TF2 diff --git a/hist/hist/src/TFormula_v5.cxx b/hist/hist/src/TFormula_v5.cxx index 0ed1fe608ad96..172b4ec207722 100644 --- a/hist/hist/src/TFormula_v5.cxx +++ b/hist/hist/src/TFormula_v5.cxx @@ -9,8 +9,6 @@ * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ -#include - #include "TROOT.h" #include "TClass.h" #include "TBuffer.h" @@ -25,7 +23,9 @@ #include "TInterpreter.h" #include "TVirtualMutex.h" #include "strlcpy.h" -#include "snprintf.h" + +#include +#include #ifdef WIN32 #pragma optimize("",off) diff --git a/hist/hist/src/TGraph2D.cxx b/hist/hist/src/TGraph2D.cxx index 6ab1ab073c1df..2ebe52a599a9a 100644 --- a/hist/hist/src/TGraph2D.cxx +++ b/hist/hist/src/TGraph2D.cxx @@ -24,8 +24,8 @@ #include "TPluginManager.h" #include "TSystem.h" #include "strtok.h" -#include "snprintf.h" +#include #include #include #include diff --git a/hist/hist/src/TH2.cxx b/hist/hist/src/TH2.cxx index dfd5df93f51be..50118f3914083 100644 --- a/hist/hist/src/TH2.cxx +++ b/hist/hist/src/TH2.cxx @@ -26,7 +26,8 @@ #include "TObjString.h" #include "TObjArray.h" #include "TVirtualHistPainter.h" -#include "snprintf.h" + +#include /** \addtogroup Histograms diff --git a/hist/hist/src/TLimitDataSource.cxx b/hist/hist/src/TLimitDataSource.cxx index bc5a426596015..7800d72187a62 100644 --- a/hist/hist/src/TLimitDataSource.cxx +++ b/hist/hist/src/TLimitDataSource.cxx @@ -14,7 +14,8 @@ #include "TH1.h" #include "TVectorD.h" #include "TRandom3.h" -#include "snprintf.h" + +#include //////////////////////////////////////////////////////////////////////////////// diff --git a/hist/hist/src/TSpline.cxx b/hist/hist/src/TSpline.cxx index a90c40c1013f0..0053f8ecf502e 100644 --- a/hist/hist/src/TSpline.cxx +++ b/hist/hist/src/TSpline.cxx @@ -24,7 +24,8 @@ #include "TSystem.h" #include "TMath.h" #include "strlcpy.h" -#include "snprintf.h" + +#include #include #include diff --git a/hist/histpainter/src/TGraphPainter.cxx b/hist/histpainter/src/TGraphPainter.cxx index 06b0db1a16569..43665f4ceaeae 100644 --- a/hist/histpainter/src/TGraphPainter.cxx +++ b/hist/histpainter/src/TGraphPainter.cxx @@ -40,7 +40,8 @@ #include "TVirtualX.h" #include "TRegexp.h" #include "strlcpy.h" -#include "snprintf.h" + +#include #include Int_t TGraphPainter::fgMaxPointsPerLine = 50; diff --git a/hist/histpainter/src/TPaletteAxis.cxx b/hist/histpainter/src/TPaletteAxis.cxx index 4a80548c86078..2fa63970e3c43 100644 --- a/hist/histpainter/src/TPaletteAxis.cxx +++ b/hist/histpainter/src/TPaletteAxis.cxx @@ -19,8 +19,8 @@ #include "TH1.h" #include "TGaxis.h" #include "TLatex.h" -#include "snprintf.h" +#include #include diff --git a/hist/spectrum/src/TSpectrum.cxx b/hist/spectrum/src/TSpectrum.cxx index bb5455d5d9aab..2164df699dce8 100644 --- a/hist/spectrum/src/TSpectrum.cxx +++ b/hist/spectrum/src/TSpectrum.cxx @@ -7,7 +7,8 @@ #include "TList.h" #include "TH1.h" #include "TMath.h" -#include "snprintf.h" + +#include /** \class TSpectrum \ingroup Spectrum diff --git a/io/io/src/TBufferJSON.cxx b/io/io/src/TBufferJSON.cxx index eddd1089b3c61..9cf5c4ddb472c 100644 --- a/io/io/src/TBufferJSON.cxx +++ b/io/io/src/TBufferJSON.cxx @@ -133,7 +133,8 @@ class Container { #include "TVirtualMutex.h" #include "TInterpreter.h" #include "TEmulatedCollectionProxy.h" -#include "snprintf.h" + +#include #include diff --git a/io/io/src/TBufferText.cxx b/io/io/src/TBufferText.cxx index d1961bc841320..0afac88799087 100644 --- a/io/io/src/TBufferText.cxx +++ b/io/io/src/TBufferText.cxx @@ -30,7 +30,8 @@ actions list for both are the same. #include "TInterpreter.h" #include "TExMap.h" #include "TError.h" -#include "snprintf.h" + +#include #include diff --git a/io/io/src/TFile.cxx b/io/io/src/TFile.cxx index d3450dc3ee791..be08dd0c1f83e 100644 --- a/io/io/src/TFile.cxx +++ b/io/io/src/TFile.cxx @@ -129,7 +129,6 @@ The structure of a directory is shown in TDirectoryFile::TDirectoryFile #include "RConfigure.h" #include "Strlen.h" #include "strlcpy.h" -#include "snprintf.h" #include "TArrayC.h" #include "TBuffer.h" #include "TClass.h" @@ -163,17 +162,19 @@ The structure of a directory is shown in TDirectoryFile::TDirectoryFile #include "TObjString.h" #include "TStopwatch.h" #include "compiledata.h" -#include -#include -#include #include "TSchemaRule.h" #include "TSchemaRuleSet.h" #include "TThreadSlots.h" #include "TGlobal.h" #include "ROOT/RConcurrentHashColl.hxx" #include "ROOT/InternalIOUtils.hxx" + +#include +#include +#include #include #include +#include #ifdef R__FBSD #include diff --git a/io/io/src/TStreamerInfo.cxx b/io/io/src/TStreamerInfo.cxx index ba7f6ae80eb65..8140301c73475 100644 --- a/io/io/src/TStreamerInfo.cxx +++ b/io/io/src/TStreamerInfo.cxx @@ -56,7 +56,6 @@ element type. #include "TProcessID.h" #include "TSystem.h" #include "TObjString.h" -#include "snprintf.h" #include "TStreamer.h" #include "TContainerConverters.h" @@ -76,6 +75,7 @@ element type. #include "TStreamerInfoActions.h" #include "ROOT/BitUtils.hxx" +#include #include #include #include diff --git a/io/sql/src/TBufferSQL2.cxx b/io/sql/src/TBufferSQL2.cxx index 6874364da81f7..8b2bae414c7fa 100644 --- a/io/sql/src/TBufferSQL2.cxx +++ b/io/sql/src/TBufferSQL2.cxx @@ -36,8 +36,8 @@ few other, which can not be converted to SQL (yet). #include "TMemberStreamer.h" #include "TStreamer.h" #include "TStreamerInfoActions.h" -#include "snprintf.h" +#include #include #include #include diff --git a/io/xml/src/TBufferXML.cxx b/io/xml/src/TBufferXML.cxx index 12f7420cd7999..81453a08a213e 100644 --- a/io/xml/src/TBufferXML.cxx +++ b/io/xml/src/TBufferXML.cxx @@ -46,8 +46,8 @@ There are limitations for complex objects like TTree, which can not be converted #include "TMemberStreamer.h" #include "TStreamer.h" #include "RZip.h" -#include "snprintf.h" +#include #include #include diff --git a/io/xml/src/TXMLEngine.cxx b/io/xml/src/TXMLEngine.cxx index 59cc081b1f52b..e556e2c202eb0 100644 --- a/io/xml/src/TXMLEngine.cxx +++ b/io/xml/src/TXMLEngine.cxx @@ -25,8 +25,8 @@ #include "TNamed.h" #include "TObjArray.h" #include "strlcpy.h" -#include "snprintf.h" +#include #include #include #include diff --git a/main/src/h2root.cxx b/main/src/h2root.cxx index bd1f67996852a..3b41cbc88f474 100644 --- a/main/src/h2root.cxx +++ b/main/src/h2root.cxx @@ -19,11 +19,6 @@ // converted to lower case ///////////////////////////////////////////////////////////////////////// -#include -#include -#include -#include - #include "TFile.h" #include "TDirectoryFile.h" #include "TTree.h" @@ -35,7 +30,12 @@ #include "TGraph.h" #include "TMath.h" #include "strlcpy.h" -#include "snprintf.h" + +#include +#include +#include +#include +#include // Define the names of the Fortran common blocks for the different OSs // Note that with gcc3.4 or above the size of PAWC_SIZE must be the same diff --git a/main/src/rmain.cxx b/main/src/rmain.cxx index a4236e028216f..3e0e0fe5c2dea 100644 --- a/main/src/rmain.cxx +++ b/main/src/rmain.cxx @@ -19,7 +19,8 @@ #include "TRint.h" #include "RConfigure.h" -#include "snprintf.h" + +#include #ifdef _MSC_VER #include #define execv _execv diff --git a/math/matrix/src/TMatrixTBase.cxx b/math/matrix/src/TMatrixTBase.cxx index a7fe22da92848..b3cd7b59b0651 100644 --- a/math/matrix/src/TMatrixTBase.cxx +++ b/math/matrix/src/TMatrixTBase.cxx @@ -27,7 +27,8 @@ of the derived classes #include "TBuffer.h" #include "TROOT.h" #include "TMath.h" -#include "snprintf.h" + +#include #include Int_t gMatrixCheck = 1; diff --git a/math/mlp/src/TMLPAnalyzer.cxx b/math/mlp/src/TMLPAnalyzer.cxx index afe7851f69062..4fab40b344064 100644 --- a/math/mlp/src/TMLPAnalyzer.cxx +++ b/math/mlp/src/TMLPAnalyzer.cxx @@ -33,7 +33,8 @@ the network structure. #include "TVirtualPad.h" #include "TRegexp.h" #include "TMath.h" -#include "snprintf.h" + +#include #include #include diff --git a/math/splot/src/TSPlot.cxx b/math/splot/src/TSPlot.cxx index 35c5258e3fc14..c6673632d0283 100644 --- a/math/splot/src/TSPlot.cxx +++ b/math/splot/src/TSPlot.cxx @@ -17,8 +17,8 @@ #include "TBrowser.h" #include "TClass.h" #include "TMath.h" -#include "snprintf.h" +#include #include #include diff --git a/montecarlo/eg/src/TGenerator.cxx b/montecarlo/eg/src/TGenerator.cxx index dfeb2e51243e9..0d8c41702e26e 100644 --- a/montecarlo/eg/src/TGenerator.cxx +++ b/montecarlo/eg/src/TGenerator.cxx @@ -149,8 +149,8 @@ This is especially useful for example with TVirtualMC or similar. #include "TPaveText.h" #include "TClonesArray.h" #include "strlcpy.h" -#include "snprintf.h" +#include #include diff --git a/montecarlo/eg/src/TPrimary.cxx b/montecarlo/eg/src/TPrimary.cxx index 25991c16836b5..e54746f567591 100644 --- a/montecarlo/eg/src/TPrimary.cxx +++ b/montecarlo/eg/src/TPrimary.cxx @@ -27,7 +27,8 @@ This class is now obsolete. Use TParticle instead. #include "TView.h" #include "TVirtualPad.h" #include "X3DBuffer.h" -#include "snprintf.h" + +#include //////////////////////////////////////////////////////////////////////////////// diff --git a/net/davix/src/TDavixFile.cxx b/net/davix/src/TDavixFile.cxx index 7533d77aff034..c989a12846683 100644 --- a/net/davix/src/TDavixFile.cxx +++ b/net/davix/src/TDavixFile.cxx @@ -41,8 +41,8 @@ #include "TVirtualPerfStats.h" #include "TDavixFileInternal.h" #include "utils.h" -#include "snprintf.h" +#include #include #include #include diff --git a/net/net/src/TApplicationRemote.cxx b/net/net/src/TApplicationRemote.cxx index c5af17d21eecf..327cd6aa401f7 100644 --- a/net/net/src/TApplicationRemote.cxx +++ b/net/net/src/TApplicationRemote.cxx @@ -20,9 +20,6 @@ // // ////////////////////////////////////////////////////////////////////////// -#include -#include - #include "TApplicationRemote.h" #include "TBrowser.h" @@ -34,7 +31,10 @@ #include "TServerSocket.h" #include "TSystem.h" #include "TRemoteObject.h" -#include "snprintf.h" + +#include +#include +#include #ifdef WIN32 #include #include diff --git a/net/net/src/TApplicationServer.cxx b/net/net/src/TApplicationServer.cxx index 7121b71cdd805..4fb54f2691f56 100644 --- a/net/net/src/TApplicationServer.cxx +++ b/net/net/src/TApplicationServer.cxx @@ -20,9 +20,9 @@ #include "RConfigure.h" #include -#include "snprintf.h" -#include +#include +#include #ifdef WIN32 #include typedef long off_t; diff --git a/roofit/roofit/src/RooKeysPdf.cxx b/roofit/roofit/src/RooKeysPdf.cxx index a9033eed84e01..bc43fb11693d3 100644 --- a/roofit/roofit/src/RooKeysPdf.cxx +++ b/roofit/roofit/src/RooKeysPdf.cxx @@ -55,18 +55,20 @@ of options. For a multi-dimensional version of this pdf, see RooNDKeysPdf. **/ -#include -#include -#include -#include #include "TMath.h" -#include "snprintf.h" #include "RooKeysPdf.h" #include "RooRealVar.h" #include "RooRandom.h" #include "RooDataSet.h" #include "TError.h" +#include "TMath.h" + +#include +#include +#include +#include +#include const double RooKeysPdf::_nSigma = std::sqrt(-2. * diff --git a/roofit/roofitcore/src/RooDataSet.cxx b/roofit/roofitcore/src/RooDataSet.cxx index 250522732c600..5272438c61fc9 100644 --- a/roofit/roofitcore/src/RooDataSet.cxx +++ b/roofit/roofitcore/src/RooDataSet.cxx @@ -107,8 +107,8 @@ the new `RooAbsData::uniqueId()`. #include "TFile.h" #include "TBuffer.h" #include "strlcpy.h" -#include "snprintf.h" +#include #include #include #include diff --git a/roofit/roofitcore/src/RooMCStudy.cxx b/roofit/roofitcore/src/RooMCStudy.cxx index 1bf0310ae5c0b..0230e16569324 100644 --- a/roofit/roofitcore/src/RooMCStudy.cxx +++ b/roofit/roofitcore/src/RooMCStudy.cxx @@ -74,8 +74,8 @@ for usage examples. #include -#include +#include #include #include diff --git a/roottest/scripts/utils.cc b/roottest/scripts/utils.cc index 90714740a48dc..1cd98f7239d20 100644 --- a/roottest/scripts/utils.cc +++ b/roottest/scripts/utils.cc @@ -1,14 +1,12 @@ // Utilities to be used by some scripts. // To load them up copy the rootlogon_template.C into the current directory. -#include -#include -#include -#include "snprintf.h" - #include "TError.h" #include "TSystem.h" +#include +#include +#include // This redirect the root warning to be on stdout instead of stderr. diff --git a/rootx/CMakeLists.txt b/rootx/CMakeLists.txt index d6ceb48cedb86..5e28edf0d5903 100644 --- a/rootx/CMakeLists.txt +++ b/rootx/CMakeLists.txt @@ -19,7 +19,7 @@ target_include_directories(root PRIVATE ${CMAKE_SOURCE_DIR}/core/foundation/inc ${CMAKE_SOURCE_DIR}/core/base/inc ${CMAKE_SOURCE_DIR}/core/base/res - ${CMAKE_SOURCE_DIR}/core/clib/inc # for snprintf.h + ${CMAKE_SOURCE_DIR}/core/clib/inc # for strtok.h ${CMAKE_SOURCE_DIR}/core/meta/inc # for TGenericClassInfo.h ${CMAKE_BINARY_DIR}/ginclude # for RConfigure.h and rootCommandLineOptionsHelp.h ) diff --git a/rootx/src/rootx.cxx b/rootx/src/rootx.cxx index 2c640e05183bb..e4bf49b8781d1 100644 --- a/rootx/src/rootx.cxx +++ b/rootx/src/rootx.cxx @@ -13,7 +13,6 @@ #include "RConfigure.h" #include "Rtypes.h" -#include "snprintf.h" #include "TApplicationCmdlineHelp.h" #include diff --git a/test/Event.cxx b/test/Event.cxx index 45af8214e893a..5eb715edbdcf8 100644 --- a/test/Event.cxx +++ b/test/Event.cxx @@ -82,11 +82,10 @@ #include "TRandom.h" #include "TDirectory.h" #include "TProcessID.h" -#include "snprintf.h" #include "Event.h" - +#include TClonesArray *Event::fgTracks = 0; TH1F *Event::fgHist = 0; diff --git a/test/EventMT.cxx b/test/EventMT.cxx index 6a86b1a7f1a2b..17cb70350ba76 100644 --- a/test/EventMT.cxx +++ b/test/EventMT.cxx @@ -79,11 +79,10 @@ #include "TRandom.h" #include "TDirectory.h" #include "TProcessID.h" -#include "snprintf.h" #include "Event.h" - +#include //////////////////////////////////////////////////////////////////////////////// /// Create an Event object. diff --git a/test/Tetris.cxx b/test/Tetris.cxx index c2e05833eeb45..683c1e623e8d5 100644 --- a/test/Tetris.cxx +++ b/test/Tetris.cxx @@ -21,9 +21,10 @@ #include #include #include -#include #include "Tetris.h" +#include + static Tetris *gTetris; // game manager static const UInt_t gBoxPixelSize = 20; // size of TetrisBox in pixels diff --git a/test/bench.cxx b/test/bench.cxx index cb3efee566448..5e84219efcdd7 100644 --- a/test/bench.cxx +++ b/test/bench.cxx @@ -26,10 +26,10 @@ #include "TStopwatch.h" #include "TSystem.h" #include "TStreamerInfo.h" -#include "snprintf.h" - #include "TBench.h" +#include + using std::vector; struct TBenchData { diff --git a/test/histviewer/canvsave.cxx b/test/histviewer/canvsave.cxx index 6036fbe38db13..eccd331d3b46b 100644 --- a/test/histviewer/canvsave.cxx +++ b/test/histviewer/canvsave.cxx @@ -12,9 +12,8 @@ #include #include #include -#include - +#include CanvSave::CanvSave(const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h, UInt_t options) : diff --git a/test/histviewer/histaction.cxx b/test/histviewer/histaction.cxx index 685fe101e355e..fb4bf9cbc463d 100644 --- a/test/histviewer/histaction.cxx +++ b/test/histviewer/histaction.cxx @@ -18,7 +18,8 @@ #include "canvsave.h" #include #include -#include + +#include #if !defined S_ISDIR #define S_ISDIR(m) (((m)&(0170000)) == (0040000)) diff --git a/test/stress.cxx b/test/stress.cxx index 51c814e2ff9a7..acb70efa6d01d 100644 --- a/test/stress.cxx +++ b/test/stress.cxx @@ -96,9 +96,9 @@ #include #include #include -#include #include "Event.h" +#include #include #include diff --git a/test/stressFit.cxx b/test/stressFit.cxx index c52997a7c0234..da8a6a670daee 100644 --- a/test/stressFit.cxx +++ b/test/stressFit.cxx @@ -53,7 +53,6 @@ // // //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*_*// -#include #include "TSystem.h" #include "TROOT.h" #include "TBenchmark.h" @@ -62,7 +61,6 @@ #include "Riostream.h" #include "TVectorD.h" #include "TMatrixD.h" -#include "snprintf.h" #include "Math/Factory.h" #include "Math/Functor.h" @@ -70,6 +68,9 @@ #include "Math/MinimizerOptions.h" #include "Math/Minimizer.h" +#include +#include + Int_t stressFit(const char *type = "Minuit", const char *algo = "Migrad", Int_t N = 2000); Int_t gVerbose = -1; Double_t gToleranceMult = 1.e-3; diff --git a/test/stressGUI.cxx b/test/stressGUI.cxx index 25dfc1c533716..371e1614138ac 100644 --- a/test/stressGUI.cxx +++ b/test/stressGUI.cxx @@ -16,10 +16,6 @@ // stressGUI -help // -#include -#include -#include -#include #include #include #include @@ -83,6 +79,11 @@ #include +#include +#include +#include +#include + // Global variables. RedirectHandle_t gRH; Int_t gTestNum = 0; diff --git a/test/stressHistoFit.cxx b/test/stressHistoFit.cxx index db33e8ef91b6d..a8002a80abb96 100644 --- a/test/stressHistoFit.cxx +++ b/test/stressHistoFit.cxx @@ -81,7 +81,6 @@ #include "TF1.h" #include "TF2.h" #include "TFile.h" -#include "snprintf.h" #include "Math/IFunction.h" #include "Math/IParamFunction.h" @@ -110,6 +109,7 @@ #include "TCanvas.h" #include "TApplication.h" +#include #include #include #include diff --git a/test/stressIOPlugins.cxx b/test/stressIOPlugins.cxx index a8562a2e59017..d0b94870f16d3 100644 --- a/test/stressIOPlugins.cxx +++ b/test/stressIOPlugins.cxx @@ -55,8 +55,6 @@ //_____________________________batch only_____________________ #ifndef __CLING__ -#include -#include #include #include #include @@ -76,6 +74,9 @@ #include #include "Event.h" +#include +#include + R__LOAD_LIBRARY( libEvent ) void stressIOPlugins(); diff --git a/test/stressLinear.cxx b/test/stressLinear.cxx index 270950876c261..9c4628e0d3dcf 100644 --- a/test/stressLinear.cxx +++ b/test/stressLinear.cxx @@ -88,9 +88,6 @@ // // ////////////////////////////////////////////////////////////////////////// -#include -#include -#include #include #include #include @@ -120,6 +117,10 @@ #include "TMatrixDEigen.h" #include "TMatrixDSymEigen.h" +#include +#include +#include + #ifdef __CLING__ const auto tmp_vmatrix_file_name = "stress-vmatrix_interpreted.root"; const auto tmp_vvector_file_name = "stress-vvector_interpreted.root"; diff --git a/test/stressShapes.cxx b/test/stressShapes.cxx index 607a3774a88f1..f868f64d1cba1 100644 --- a/test/stressShapes.cxx +++ b/test/stressShapes.cxx @@ -2,7 +2,6 @@ #ifndef __CLING__ #include #include -#include #include #include #include @@ -12,6 +11,8 @@ #include #include +#include + void stressShapes(); int main(int argc, char **argv) diff --git a/test/stressSpectrum.cxx b/test/stressSpectrum.cxx index c7616f3119611..9411812f2bc06 100644 --- a/test/stressSpectrum.cxx +++ b/test/stressSpectrum.cxx @@ -43,9 +43,6 @@ //* ROOTMARKS = 810.9 * Root5.09/01 20051216/1229 //**************************************************************************** -#include -#include -#include "snprintf.h" #include "TApplication.h" #include "TBenchmark.h" #include "TCanvas.h" @@ -58,6 +55,10 @@ #include "TROOT.h" #include "TMath.h" +#include +#include +#include + Int_t npeaks; Double_t fpeaks(Double_t *x, Double_t *par) { Double_t result = par[0] + par[1]*x[0]; diff --git a/test/tcollbm.cxx b/test/tcollbm.cxx index 7cbbb196f7985..38eb55cc38ea9 100644 --- a/test/tcollbm.cxx +++ b/test/tcollbm.cxx @@ -1,9 +1,6 @@ // @(#)root/test:$Id$ // Author: Nikolay Root 05/07/98 -#include -#include -#include "snprintf.h" #include "TCollection.h" #include "TSortedList.h" #include "TObjArray.h" @@ -15,6 +12,11 @@ #include "TStopwatch.h" #include "TRandom.h" + +#include +#include +#include + // // This program benchmarks access time to objects by name or index // for TObjArray,TOrdCollection,TList,TSortedList,THashList,TBtree, diff --git a/test/vmatrix.cxx b/test/vmatrix.cxx index e40432ee616db..e6ac75ff64e62 100644 --- a/test/vmatrix.cxx +++ b/test/vmatrix.cxx @@ -30,8 +30,6 @@ //_____________________________batch only_____________________ #ifndef __CLING__ -#include -#include "snprintf.h" #include "TFile.h" #include "TMatrixD.h" #include "TMatrixDSym.h" @@ -44,6 +42,9 @@ #include "TDecompQRH.h" #include "TDecompSVD.h" +#include +#include + void stress_matrix (Int_t verbose); void StatusPrint (Int_t id,const TString &title,Int_t status); diff --git a/test/vvector.cxx b/test/vvector.cxx index b83e13db080fe..6724225fe2b4a 100644 --- a/test/vvector.cxx +++ b/test/vvector.cxx @@ -23,11 +23,12 @@ #ifndef __CLING__ #include "TFile.h" -#include -#include "snprintf.h" #include "TVectorD.h" #include "TMath.h" +#include +#include + void stress_vector (Int_t verbose); void stress_allocation (); void stress_element_op (Int_t vsize); diff --git a/tree/dataframe/src/RArrowDS.cxx b/tree/dataframe/src/RArrowDS.cxx index 8708b73f9b960..d573309206311 100644 --- a/tree/dataframe/src/RArrowDS.cxx +++ b/tree/dataframe/src/RArrowDS.cxx @@ -29,8 +29,8 @@ arrow::Schema. #include #include #include -#include +#include #include #include #include diff --git a/tree/tree/src/TBranch.cxx b/tree/tree/src/TBranch.cxx index 1f6bd5a1dafb6..a1fb7f556a5b0 100644 --- a/tree/tree/src/TBranch.cxx +++ b/tree/tree/src/TBranch.cxx @@ -47,7 +47,6 @@ #include "TVirtualPad.h" #include "TVirtualPerfStats.h" #include "strlcpy.h" -#include "snprintf.h" #include "TBranchIMTHelper.h" diff --git a/tree/tree/src/TBranchObject.cxx b/tree/tree/src/TBranchObject.cxx index 7f77edee333ee..60a2889bc555f 100644 --- a/tree/tree/src/TBranchObject.cxx +++ b/tree/tree/src/TBranchObject.cxx @@ -30,7 +30,8 @@ A Branch for the case of an object. #include "TRealData.h" #include "TStreamerInfo.h" #include "TTree.h" -#include "snprintf.h" + +#include //////////////////////////////////////////////////////////////////////////////// diff --git a/tree/tree/src/TChain.cxx b/tree/tree/src/TChain.cxx index 134a468afba82..03d1c8feaa191 100644 --- a/tree/tree/src/TChain.cxx +++ b/tree/tree/src/TChain.cxx @@ -62,8 +62,8 @@ the trees in the chain. #include "TVirtualMutex.h" #include "TVirtualPerfStats.h" #include "strlcpy.h" -#include "snprintf.h" +#include #include #include "ROOT/StringUtils.hxx" diff --git a/tree/tree/src/TNtupleD.cxx b/tree/tree/src/TNtupleD.cxx index 1aa334611895c..4e34ca0349a74 100644 --- a/tree/tree/src/TNtupleD.cxx +++ b/tree/tree/src/TNtupleD.cxx @@ -17,7 +17,8 @@ #include "TBuffer.h" #include "TreeUtils.h" #include "strlcpy.h" -#include "snprintf.h" + +#include /** \class TNtupleD diff --git a/tree/tree/src/TTree.cxx b/tree/tree/src/TTree.cxx index 48191b86c5b85..eaa8433ddc2e2 100644 --- a/tree/tree/src/TTree.cxx +++ b/tree/tree/src/TTree.cxx @@ -451,7 +451,6 @@ End_Macro #include "ROOT/StringConv.hxx" #include "TVirtualMutex.h" #include "strlcpy.h" -#include "snprintf.h" #include "TBranchIMTHelper.h" #include "TNotifyLink.h" diff --git a/tree/tree/src/TTreeCloner.cxx b/tree/tree/src/TTreeCloner.cxx index ccce19af0f8e5..2863658a52a62 100644 --- a/tree/tree/src/TTreeCloner.cxx +++ b/tree/tree/src/TTreeCloner.cxx @@ -34,8 +34,8 @@ Class implementing or helping the various TTree cloning method #include "TLeafC.h" #include "TFileCacheRead.h" #include "TTreeCache.h" -#include "snprintf.h" +#include #include //////////////////////////////////////////////////////////////////////////////// diff --git a/tree/treeplayer/src/TTreeFormula.cxx b/tree/treeplayer/src/TTreeFormula.cxx index 6f98a272c38e8..99555bccce8ba 100644 --- a/tree/treeplayer/src/TTreeFormula.cxx +++ b/tree/treeplayer/src/TTreeFormula.cxx @@ -42,7 +42,6 @@ #include "TMethod.h" #include "TFormLeafInfoReference.h" #include "strlcpy.h" -#include "snprintf.h" #include "TEntryList.h" #include diff --git a/tree/treeplayer/src/TTreePlayer.cxx b/tree/treeplayer/src/TTreePlayer.cxx index c603d1e777758..8d21badbd5de7 100644 --- a/tree/treeplayer/src/TTreePlayer.cxx +++ b/tree/treeplayer/src/TTreePlayer.cxx @@ -26,13 +26,6 @@ extra libraries (Histogram, display, etc). #include "TTreePlayer.h" -#include -#include -#include -#include -#include -#include - #include "TROOT.h" #include "TApplication.h" #include "TSystem.h" @@ -89,13 +82,18 @@ extra libraries (Histogram, display, etc). #include "TVirtualMutex.h" #include "ThreadLocalStorage.h" #include "strlcpy.h" -#include "snprintf.h" #include "HFitInterface.h" #include "Fit/BinData.h" #include "Fit/UnBinData.h" #include "Math/MinimizerOptions.h" +#include +#include +#include +#include +#include +#include R__EXTERN Foption_t Foption; diff --git a/tree/treeviewer/src/TParallelCoordVar.cxx b/tree/treeviewer/src/TParallelCoordVar.cxx index 1277d6cc6623e..f9891e87f95b0 100644 --- a/tree/treeviewer/src/TParallelCoordVar.cxx +++ b/tree/treeviewer/src/TParallelCoordVar.cxx @@ -13,8 +13,6 @@ #include "TParallelCoord.h" #include "TParallelCoordRange.h" -#include - #include "TLatex.h" #include "TLine.h" #include "TVirtualPad.h" @@ -28,8 +26,9 @@ #include "TFrame.h" #include "TCanvas.h" #include "TMarker.h" -#include "snprintf.h" +#include +#include /** \class TParallelCoordVar diff --git a/tree/treeviewer/src/TTVLVContainer.cxx b/tree/treeviewer/src/TTVLVContainer.cxx index 6471ce1559920..f07f778531931 100644 --- a/tree/treeviewer/src/TTVLVContainer.cxx +++ b/tree/treeviewer/src/TTVLVContainer.cxx @@ -18,8 +18,8 @@ #include "TGToolTip.h" #include "TList.h" #include "TVirtualX.h" -#include "snprintf.h" +#include /** \class TGItemContext diff --git a/tree/treeviewer/src/TTVSession.cxx b/tree/treeviewer/src/TTVSession.cxx index 2c8bb49fc513b..72bc87d5eba79 100644 --- a/tree/treeviewer/src/TTVSession.cxx +++ b/tree/treeviewer/src/TTVSession.cxx @@ -17,8 +17,8 @@ #include "TTVLVContainer.h" #include "TClonesArray.h" #include "TInterpreter.h" -#include "snprintf.h" +#include /** \class TTVRecord diff --git a/tree/treeviewer/src/TTreeViewer.cxx b/tree/treeviewer/src/TTreeViewer.cxx index 4ba4b7fb54e62..5f0becb1bdb93 100644 --- a/tree/treeviewer/src/TTreeViewer.cxx +++ b/tree/treeviewer/src/TTreeViewer.cxx @@ -198,8 +198,6 @@ more complex cuts such as (~e1) && (~e2), or (~e1) || !(~e2). Parentheses are im #include "RConfigure.h" -#include -#include #include "TTreeViewer.h" #include "HelpText.h" #include "HelpTextTV.h" @@ -246,9 +244,11 @@ more complex cuts such as (~e1) && (~e2), or (~e1) || !(~e2). Parentheses are im #include "TGProgressBar.h" #include "TSpider.h" #include "strlcpy.h" -#include "snprintf.h" +#include #include +#include +#include #ifdef WIN32 #include "TWin32SplashThread.h"