Standard Library file header; termporary notes for me.

This commit is contained in:
Jim Derry 2017-10-03 18:08:10 -04:00
parent 8d7e5f7f5a
commit 1cd0438849
3 changed files with 35 additions and 30 deletions

View file

@ -2017,7 +2017,7 @@ int main( int argc, char** argv )
# if defined(_CRTDBG_MAP_ALLOC) # if defined(_CRTDBG_MAP_ALLOC)
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
# endif # endif
set_log_file((char *)"temptidy.txt", 0); /* add_append_log(1); */ set_log_file((char *)"temptidy.txt", 0);
#endif #endif
tdoc = tidyCreate(); tdoc = tidyCreate();

View file

@ -1,21 +1,16 @@
/* /* sprtf.c
* SPRTF - Log output utility - part of the HTML Tidy project * SPRTF - Log output utility - part of the HTML Tidy project
* *
* Author: Geoff R. McLane <reports _at_ geoffair _dot_ info> * Copyright (c) 1998-2017 Geoff R. McLane and HTACG
* License: MIT (see tidy.h for the copyright notice)
*
* Revision 1.0.2 2017/02/12 17:06:02 geoff - correct license and coding style
* Revision 1.0.1 2012/11/06 13:01:25 geoff
* Revision 1.0.0 2012/10/17 00:00:00 geoff
* *
* See tidy.h for the copyright notice.
*/ */
#ifdef _MSC_VER #ifdef _MSC_VER
# pragma warning( disable : 4995 ) # pragma warning( disable : 4995 )
#endif #endif
/* Module: sprtf.c */
/* Debug log file output */ #include <stdio.h> /* fopen()... */
#include <stdio.h> /* fopen()... */
#include <string.h> /* strcpy */ #include <string.h> /* strcpy */
#include <stdarg.h> /* va_start, va_end, ... */ #include <stdarg.h> /* va_start, va_end, ... */

View file

@ -1,24 +1,32 @@
/*
* SPRTF - Log output utility - part of the HTML Tidy project
*
* Author: Geoff R. McLane <reports _at_ geoffair _dot_ info>
* License: MIT (see tidy.h for the copyright notice)
*
* Revision 1.0.2 2017/02/12 17:06:02 geoff - correct license and coding style
* Revision 1.0.1 2012/11/06 13:01:25 geoff
* Revision 1.0.0 2012/10/17 00:00:00 geoff
*
*/
/* Module: sprtf.h */
/* Debug log file output */
#ifndef _SPRTF_HXX_ #ifndef _SPRTF_HXX_
# define _SPRTF_HXX_ #define _SPRTF_HXX_
/**************************************************************************//**
* @file
* Log output utility - part of the HTML Tidy project
*
* @author Geoff R. McLane [reports _at_ geoffair _dot_ info]
*
* @copyright
* Copyright (c) 1998-2017 Geoff R. McLane and HTACG.
* @par
* All Rights Reserved.
* @par
* See `tidy.h` for the complete license.
*
* @date 2017/02/12 17:06:02 Revision 1.0.2 geoff - correct license and coding style
* @date 2012/11/06 13:01:25 Revision 1.0.1 geoff
* @date 2012/10/17 00:00:00 Revision 1.0.0 geoff
* @date Additional updates: consult git log
*
******************************************************************************/
#include "tidyplatform.h" #include "tidyplatform.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#ifdef _MSC_VER #ifdef _MSC_VER
# define MCDECL _cdecl # define MCDECL _cdecl
#else #else
@ -35,10 +43,10 @@ TIDY_EXPORT int add_append_log( int val );
TIDY_EXPORT int open_log_file( void ); TIDY_EXPORT int open_log_file( void );
TIDY_EXPORT void close_log_file( void ); TIDY_EXPORT void close_log_file( void );
TIDY_EXPORT void set_log_file( char * nf, int open ); TIDY_EXPORT void set_log_file( char * nf, int open ); /* used */
TIDY_EXPORT char * get_log_file( void ); TIDY_EXPORT char * get_log_file( void ); /* used */
TIDY_EXPORT int MCDECL sprtf( const char *pf, ... ); TIDY_EXPORT int MCDECL sprtf( const char *pf, ... ); /* used */
#define M_MAX_SPRTF 2048 #define M_MAX_SPRTF 2048
TIDY_EXPORT int direct_out_it( char *cp ); TIDY_EXPORT int direct_out_it( char *cp );
@ -49,6 +57,7 @@ TIDY_EXPORT char *GetNxtBuf();
TIDY_EXPORT char *get_date_stg(); TIDY_EXPORT char *get_date_stg();
TIDY_EXPORT char *get_time_stg(); TIDY_EXPORT char *get_time_stg();
TIDY_EXPORT char *get_date_time_stg(); TIDY_EXPORT char *get_date_time_stg();
#ifdef _MSC_VER #ifdef _MSC_VER
TIDY_EXPORT int gettimeofday(struct timeval *tp, void *tzp); TIDY_EXPORT int gettimeofday(struct timeval *tp, void *tzp);
#endif #endif
@ -60,5 +69,6 @@ TIDY_EXPORT int gettimeofday(struct timeval *tp, void *tzp);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* #ifndef _SPRTF_HXX_*/ #endif /* #ifndef _SPRTF_HXX_*/
/* eof - sprtf.h */ /* eof - sprtf.h */