2014-08-03 16:52:46 +00:00
|
|
|
/*
|
2017-02-12 16:37:14 +00:00
|
|
|
* SPRTF - Log output utility - part of the HTML Tidy project
|
2014-08-03 16:52:46 +00:00
|
|
|
*
|
|
|
|
* Author: Geoff R. McLane <reports _at_ geoffair _dot_ info>
|
2017-02-12 16:37:14 +00:00
|
|
|
* License: MIT (see tidy.h for the copyright notice)
|
2014-08-03 16:52:46 +00:00
|
|
|
*
|
2017-02-12 16:37:14 +00:00
|
|
|
* Revision 1.0.2 2017/02/12 17:06:02 geoff - correct license and coding style
|
2014-08-03 16:52:46 +00:00
|
|
|
* Revision 1.0.1 2012/11/06 13:01:25 geoff
|
|
|
|
* Revision 1.0.0 2012/10/17 00:00:00 geoff
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2017-02-12 16:37:14 +00:00
|
|
|
/* Module: sprtf.h */
|
|
|
|
/* Debug log file output */
|
2014-08-03 16:52:46 +00:00
|
|
|
#ifndef _SPRTF_HXX_
|
|
|
|
#define _SPRTF_HXX_
|
2015-06-30 17:59:00 +00:00
|
|
|
#include "tidyplatform.h"
|
2015-01-28 16:15:44 +00:00
|
|
|
|
2014-08-03 16:52:46 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
#define MCDECL _cdecl
|
|
|
|
#else
|
|
|
|
#define MCDECL
|
|
|
|
#endif
|
|
|
|
|
2015-01-28 16:15:44 +00:00
|
|
|
TIDY_EXPORT int add_std_out( int val );
|
|
|
|
TIDY_EXPORT int add_sys_time( int val );
|
|
|
|
TIDY_EXPORT int add_sys_date( int val );
|
2014-08-03 16:52:46 +00:00
|
|
|
|
2015-01-28 16:15:44 +00:00
|
|
|
TIDY_EXPORT int add_screen_out( int val );
|
|
|
|
TIDY_EXPORT int add_list_out( int val );
|
|
|
|
TIDY_EXPORT int add_append_log( int val );
|
2014-08-03 16:52:46 +00:00
|
|
|
|
2015-01-28 16:15:44 +00:00
|
|
|
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 );
|
2014-08-03 16:52:46 +00:00
|
|
|
|
2015-01-28 16:15:44 +00:00
|
|
|
TIDY_EXPORT int MCDECL sprtf( const char *pf, ... );
|
2014-08-03 16:52:46 +00:00
|
|
|
#define M_MAX_SPRTF 2048
|
2015-01-28 16:15:44 +00:00
|
|
|
TIDY_EXPORT int direct_out_it( char *cp );
|
2014-08-03 16:52:46 +00:00
|
|
|
|
2015-01-28 16:15:44 +00:00
|
|
|
TIDY_EXPORT char *GetNxtBuf();
|
2014-08-03 16:52:46 +00:00
|
|
|
|
|
|
|
#define EndBuf(a) ( a + strlen(a) )
|
|
|
|
|
2015-01-28 16:15:44 +00:00
|
|
|
TIDY_EXPORT char *get_date_stg();
|
|
|
|
TIDY_EXPORT char *get_time_stg();
|
|
|
|
TIDY_EXPORT char *get_date_time_stg();
|
2014-08-03 16:52:46 +00:00
|
|
|
#ifdef _MSC_VER
|
2015-01-28 16:15:44 +00:00
|
|
|
TIDY_EXPORT int gettimeofday(struct timeval *tp, void *tzp);
|
2014-08-03 16:52:46 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SPRTF
|
|
|
|
#define SPRTF sprtf
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2017-02-12 16:37:14 +00:00
|
|
|
#endif /* #ifndef _SPRTF_HXX_*/
|
|
|
|
/* eof - sprtf.h */
|