Skip to content
Snippets Groups Projects
Commit adf54a41 authored by Philippe Canal's avatar Philippe Canal
Browse files

From Axel: use built-in vsnprintf on windows

git-svn-id: http://root.cern.ch/svn/root/trunk@15430 27541ba8-7e3a-0410-8455-c3a389f83636
parent 2a0f280a
No related branches found
No related tags found
No related merge requests found
/* @(#)root/base:$Name: $:$Id: RConfig.h,v 1.88 2006/05/31 15:24:46 rdm Exp $ */
/* @(#)root/base:$Name: $:$Id: RConfig.h,v 1.89 2006/05/31 15:52:04 rdm Exp $ */
/*************************************************************************
* Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
......@@ -408,6 +408,7 @@
# define NEED_STRING
# define NEED_STRCASECMP
# define NEED_SNPRINTF
# define DONTNEED_VSNPRINTF
# define ANSICPP
# define R__VECNEWDELETE /* supports overloading of new[] and delete[] */
# define R__PLACEMENTDELETE /* supports overloading placement delete */
......
/* @(#)root/clib:$Name: $:$Id: snprintf.h,v 1.1 2000/12/10 10:54:53 rdm Exp $ */
/* @(#)root/clib:$Name: $:$Id: snprintf.h,v 1.2 2002/07/09 15:29:54 rdm Exp $ */
/* Author: Fons Rademakers 10/12/2000 */
/*
......@@ -23,7 +23,9 @@
extern "C" {
#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 __cplusplus
......
/* @(#)root/clib:$Name: $:$Id: snprintf.c,v 1.7 2005/12/08 17:36:18 pcanal Exp $ */
/* @(#)root/clib:$Name: $:$Id: snprintf.c,v 1.8 2005/12/12 03:33:51 pcanal Exp $ */
/* Author: Tomi Salo & Fons Rademakers */
/*
......@@ -66,6 +66,8 @@ typedef unsigned long long ULong64_t; /* Portable unsigned long integer 8 bytes
#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. */
......@@ -333,7 +335,6 @@ static int snprintf_convert_float(char *buffer, size_t buf_size,
return print_buf_len;
}
int vsnprintf(char *str, size_t size, const char *format, va_list ap)
{
int status, left = (int) size - 1;
......@@ -576,7 +577,7 @@ int vsnprintf(char *str, size_t size, const char *format, va_list ap)
return size - left - 1;
}
#endif
int snprintf(char *str, size_t size, const char *format, ...)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment