Move all of the sprtf includes into tidyplatform.h

This commit is contained in:
Jim Derry 2017-10-03 20:42:29 -04:00
parent 1cd0438849
commit 4e3c1a1562
13 changed files with 14 additions and 47 deletions

View file

@ -26,17 +26,12 @@
# include <windows.h> /* Force console to UTF8. */
#endif
#if !defined(NDEBUG) && defined(_MSC_VER)
# include "sprtf.h"
# ifdef _CRTDBG_MAP_ALLOC
# include <stdlib.h>
# include <crtdbg.h>
# endif
#endif
#ifndef SPRTF
# define SPRTF printf
#endif
/** Tidy will send errors to this file, which will be stderr later. */
static FILE* errout = NULL;

View file

@ -647,6 +647,20 @@ opaque_type( TidyIterator );
} /* extern "C" */
#endif
/*=============================================================================
* Debugging
*===========================================================================*/
#if !defined(NDEBUG)
# include "sprtf.h"
#endif
#ifndef SPRTF
# define SPRTF printf
#endif
#endif /* __TIDY_PLATFORM_H__ */

View file

@ -9,9 +9,6 @@
#include "tidy.h"
#include "forward.h"
#ifdef DEBUG_MEMORY
# include "sprtf.h"
#endif
static TidyMalloc g_malloc = NULL;
static TidyRealloc g_realloc = NULL;

View file

@ -13,9 +13,6 @@
#include "forward.h"
#include "fileio.h"
#include "tidy.h"
#if !defined(NDEBUG) && defined(_MSC_VER)
# include "sprtf.h"
#endif
typedef struct _fp_input_source
{

View file

@ -10,9 +10,6 @@
#include "attrs.h"
#include "streamio.h"
#include "tmbstr.h"
#if !defined(NDEBUG) && defined(_MSC_VER)
# include "sprtf.h"
#endif
/* duplicate attributes */
AttVal *TY_(DupAttrs)( TidyDocImpl* doc, AttVal *attrs)

View file

@ -39,13 +39,6 @@
#include "clean.h"
#include "utf8.h"
#include "streamio.h"
#ifdef _MSC_VER
# include "sprtf.h"
#endif
#ifndef SPRTF
# define SPRTF printf
#endif
#if !defined(NDEBUG) && defined(_MSC_VER)
/* #define DEBUG_ALLOCATION special EXTRA allocation debug information - VERY NOISY */

View file

@ -14,9 +14,6 @@
#include "streamio.h"
#include "tmbstr.h"
#include "utf8.h"
#if !defined(NDEBUG) && defined(_MSC_VER)
# include "sprtf.h"
#endif
#include "version.h"

View file

@ -10,9 +10,6 @@
#include "tidy-int.h"
#include "limits.h"
#include "tmbstr.h"
#if !defined(NDEBUG) && defined(_MSC_VER)
# include "sprtf.h"
#endif
/*********************************************************************

View file

@ -12,13 +12,6 @@
#include "clean.h"
#include "tags.h"
#include "tmbstr.h"
#ifdef _MSC_VER
# include "sprtf.h"
#endif
#ifndef SPRTF
# define SPRTF printf
#endif
/*
Issue #72 - Need to know to avoid error-reporting - no warning only if --show-body-only yes

View file

@ -24,9 +24,6 @@
# ifdef DEBUG_PPRINT
extern void dbg_show_node( TidyDocImpl* doc, Node *node, int caller, int indent );
# endif
# ifdef DEBUG_INDENT
# include "sprtf.h"
# endif
#endif
/*

View file

@ -62,10 +62,6 @@ TIDY_EXPORT char *get_date_time_stg();
TIDY_EXPORT int gettimeofday(struct timeval *tp, void *tzp);
#endif
#ifndef SPRTF
# define SPRTF sprtf
#endif
#ifdef __cplusplus
}
#endif

View file

@ -10,9 +10,6 @@
#include "tidy-int.h"
#include "message.h"
#include "tmbstr.h"
#if !defined(NDEBUG) && defined(_MSC_VER)
# include "sprtf.h"
#endif
/* Attribute checking methods */
static CheckAttribs CheckIMG;
static CheckAttribs CheckLINK;

View file

@ -34,9 +34,6 @@
#include "mappedio.h"
#include "language.h"
#if !defined(NDEBUG) && defined(_MSC_VER)
# include "sprtf.h"
#endif
/* Create/Destroy a Tidy "document" object */
static TidyDocImpl* tidyDocCreate( TidyAllocator *allocator );