From 1cd04388495c0b581cd6d4a9ac8d904d73c75f6f Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Tue, 3 Oct 2017 18:08:10 -0400 Subject: [PATCH] Standard Library file header; termporary notes for me. --- console/tidy.c | 2 +- src/sprtf.c | 17 ++++++----------- src/sprtf.h | 46 ++++++++++++++++++++++++++++------------------ 3 files changed, 35 insertions(+), 30 deletions(-) diff --git a/console/tidy.c b/console/tidy.c index c699903..f72300b 100644 --- a/console/tidy.c +++ b/console/tidy.c @@ -2017,7 +2017,7 @@ int main( int argc, char** argv ) # if defined(_CRTDBG_MAP_ALLOC) _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); # endif - set_log_file((char *)"temptidy.txt", 0); /* add_append_log(1); */ + set_log_file((char *)"temptidy.txt", 0); #endif tdoc = tidyCreate(); diff --git a/src/sprtf.c b/src/sprtf.c index 7fe2d02..cd6dd8d 100644 --- a/src/sprtf.c +++ b/src/sprtf.c @@ -1,21 +1,16 @@ -/* - * SPRTF - Log output utility - part of the HTML Tidy project +/* sprtf.c + * SPRTF - Log output utility - part of the HTML Tidy project * - * Author: Geoff R. McLane - * 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 + * Copyright (c) 1998-2017 Geoff R. McLane and HTACG * + * See tidy.h for the copyright notice. */ #ifdef _MSC_VER # pragma warning( disable : 4995 ) #endif -/* Module: sprtf.c */ -/* Debug log file output */ -#include /* fopen()... */ + +#include /* fopen()... */ #include /* strcpy */ #include /* va_start, va_end, ... */ diff --git a/src/sprtf.h b/src/sprtf.h index 780b748..14c3e02 100644 --- a/src/sprtf.h +++ b/src/sprtf.h @@ -1,24 +1,32 @@ -/* - * SPRTF - Log output utility - part of the HTML Tidy project - * - * Author: Geoff R. McLane - * 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_ -# 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" #ifdef __cplusplus extern "C" { #endif + #ifdef _MSC_VER # define MCDECL _cdecl #else @@ -35,10 +43,10 @@ TIDY_EXPORT int add_append_log( int val ); TIDY_EXPORT int open_log_file( void ); TIDY_EXPORT void close_log_file( void ); -TIDY_EXPORT void set_log_file( char * nf, int open ); -TIDY_EXPORT char * get_log_file( void ); +TIDY_EXPORT void set_log_file( char * nf, int open ); /* used */ +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 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_time_stg(); TIDY_EXPORT char *get_date_time_stg(); + #ifdef _MSC_VER TIDY_EXPORT int gettimeofday(struct timeval *tp, void *tzp); #endif @@ -60,5 +69,6 @@ TIDY_EXPORT int gettimeofday(struct timeval *tp, void *tzp); #ifdef __cplusplus } #endif + #endif /* #ifndef _SPRTF_HXX_*/ /* eof - sprtf.h */