mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-08-06 13:50:49 +08:00
making new flush routines work under all defined conditions.
This commit is contained in:
@ -299,9 +299,9 @@ extern void UNITY_OUTPUT_CHAR(int);
|
||||
#endif
|
||||
|
||||
#ifndef UNITY_OUTPUT_FLUSH
|
||||
/* Default to using putchar, which is defined in stdio.h */
|
||||
/* Default to using fflush, which is defined in stdio.h */
|
||||
#include <stdio.h>
|
||||
#define UNITY_OUTPUT_FLUSH() (void)fflush(stdout)
|
||||
#define UNITY_OUTPUT_FLUSH (void)fflush(stdout)
|
||||
#else
|
||||
/* If defined as something else, make sure we declare it here so it's ready for use */
|
||||
#ifndef UNITY_OMIT_OUTPUT_FLUSH_HEADER_DECLARATION
|
||||
@ -309,6 +309,12 @@ extern void UNITY_OUTPUT_FLUSH(void);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef UNITY_OUTPUT_FLUSH
|
||||
#define UNITY_FLUSH_CALL()
|
||||
#else
|
||||
#define UNITY_FLUSH_CALL() UNITY_OUTPUT_FLUSH
|
||||
#endif
|
||||
|
||||
#ifndef UNITY_PRINT_EOL
|
||||
#define UNITY_PRINT_EOL() UNITY_OUTPUT_CHAR('\n')
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user