Skip to content

Commit

Permalink
Merge pull request #1662 from dmitrykos/redirect_platform_specific_st…
Browse files Browse the repository at this point in the history
…dout

Allow redirection of PlatformSpecificStdOut.
  • Loading branch information
basvodde committed Nov 1, 2022
2 parents 85f8947 + 46b3384 commit a7eb835
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion include/CppUTest/PlatformSpecificFunctions_c.h
Expand Up @@ -62,7 +62,7 @@ extern int (*PlatformSpecificAtExit)(void(*func)(void));
/* IO operations */
typedef void* PlatformSpecificFile;

extern const PlatformSpecificFile PlatformSpecificStdOut;
extern PlatformSpecificFile PlatformSpecificStdOut;

extern PlatformSpecificFile (*PlatformSpecificFOpen)(const char* filename, const char* flag);
extern void (*PlatformSpecificFPuts)(const char* str, PlatformSpecificFile file);
Expand Down
2 changes: 1 addition & 1 deletion src/Platforms/Borland/UtestPlatform.cpp
Expand Up @@ -246,7 +246,7 @@ static void PlatformSpecificFlushImplementation()
fflush(stdout);
}

const PlatformSpecificFile PlatformSpecificStdOut = stdout;
PlatformSpecificFile PlatformSpecificStdOut = stdout;
PlatformSpecificFile (*PlatformSpecificFOpen)(const char*, const char*) = PlatformSpecificFOpenImplementation;
void (*PlatformSpecificFPuts)(const char*, PlatformSpecificFile) = PlatformSpecificFPutsImplementation;
void (*PlatformSpecificFClose)(PlatformSpecificFile) = PlatformSpecificFCloseImplementation;
Expand Down
2 changes: 1 addition & 1 deletion src/Platforms/C2000/UtestPlatform.cpp
Expand Up @@ -155,7 +155,7 @@ static void C2000FClose(PlatformSpecificFile file)
fclose((FILE*)file);
}

const PlatformSpecificFile PlatformSpecificStdOut = stdout;
PlatformSpecificFile PlatformSpecificStdOut = stdout;
PlatformSpecificFile (*PlatformSpecificFOpen)(const char* filename, const char* flag) = C2000FOpen;
void (*PlatformSpecificFPuts)(const char* str, PlatformSpecificFile file) = C2000FPuts;
void (*PlatformSpecificFClose)(PlatformSpecificFile file) = C2000FClose;
Expand Down
2 changes: 1 addition & 1 deletion src/Platforms/Dos/UtestPlatform.cpp
Expand Up @@ -138,7 +138,7 @@ static void DosFClose(PlatformSpecificFile file)
fclose((FILE*)file);
}

const PlatformSpecificFile PlatformSpecificStdOut = stdout;
PlatformSpecificFile PlatformSpecificStdOut = stdout;
PlatformSpecificFile (*PlatformSpecificFOpen)(const char* filename, const char* flag) = DosFOpen;
void (*PlatformSpecificFPuts)(const char* str, PlatformSpecificFile file) = DosFPuts;
void (*PlatformSpecificFClose)(PlatformSpecificFile file) = DosFClose;
Expand Down
2 changes: 1 addition & 1 deletion src/Platforms/Gcc/UtestPlatform.cpp
Expand Up @@ -264,7 +264,7 @@ static void PlatformSpecificFlushImplementation()
fflush(stdout);
}

const PlatformSpecificFile PlatformSpecificStdOut = stdout;
PlatformSpecificFile PlatformSpecificStdOut = stdout;

PlatformSpecificFile (*PlatformSpecificFOpen)(const char*, const char*) = PlatformSpecificFOpenImplementation;
void (*PlatformSpecificFPuts)(const char*, PlatformSpecificFile) = PlatformSpecificFPutsImplementation;
Expand Down
2 changes: 1 addition & 1 deletion src/Platforms/GccNoStdC/UtestPlatform.cpp
Expand Up @@ -52,7 +52,7 @@ long (*GetPlatformSpecificTimeInMillis)() = NULLPTR;
const char* (*GetPlatformSpecificTimeString)() = NULLPTR;

/* IO operations */
const PlatformSpecificFile PlatformSpecificStdOut = NULLPTR;
PlatformSpecificFile PlatformSpecificStdOut = NULLPTR;
PlatformSpecificFile (*PlatformSpecificFOpen)(const char* filename, const char* flag) = NULLPTR;
void (*PlatformSpecificFPuts)(const char* str, PlatformSpecificFile file) = NULLPTR;
void (*PlatformSpecificFClose)(PlatformSpecificFile file) = NULLPTR;
Expand Down
2 changes: 1 addition & 1 deletion src/Platforms/Iar/UtestPlatform.cpp
Expand Up @@ -151,7 +151,7 @@ static void PlatformSpecificFlushImplementation()
{
}

const PlatformSpecificFile PlatformSpecificStdOut = stdout;
PlatformSpecificFile PlatformSpecificStdOut = stdout;
PlatformSpecificFile (*PlatformSpecificFOpen)(const char*, const char*) = PlatformSpecificFOpenImplementation;
void (*PlatformSpecificFPuts)(const char*, PlatformSpecificFile) = PlatformSpecificFPutsImplementation;
void (*PlatformSpecificFClose)(PlatformSpecificFile) = PlatformSpecificFCloseImplementation;
Expand Down
2 changes: 1 addition & 1 deletion src/Platforms/Keil/UtestPlatform.cpp
Expand Up @@ -155,7 +155,7 @@ extern "C"
{
}

const PlatformSpecificFile PlatformSpecificStdOut = stdout;
PlatformSpecificFile PlatformSpecificStdOut = stdout;
PlatformSpecificFile (*PlatformSpecificFOpen)(const char*, const char*) = PlatformSpecificFOpenImplementation;
void (*PlatformSpecificFPuts)(const char*, PlatformSpecificFile) = PlatformSpecificFPutsImplementation;
void (*PlatformSpecificFClose)(PlatformSpecificFile) = PlatformSpecificFCloseImplementation;
Expand Down
2 changes: 1 addition & 1 deletion src/Platforms/Symbian/UtestPlatform.cpp
Expand Up @@ -121,7 +121,7 @@ void* PlatformSpecificMemset(void* mem, int c, size_t size)
return memset(mem, c, size);
}

const PlatformSpecificFile PlatformSpecificStdOut = stdout;
PlatformSpecificFile PlatformSpecificStdOut = stdout;

PlatformSpecificFile PlatformSpecificFOpen(const char* filename, const char* flag) {
return fopen(filename, flag);
Expand Down
2 changes: 1 addition & 1 deletion src/Platforms/VisualCpp/UtestPlatform.cpp
Expand Up @@ -158,7 +158,7 @@ static void VisualCppFClose(PlatformSpecificFile file)
fclose((FILE*)file);
}

const PlatformSpecificFile PlatformSpecificStdOut = stdout;
PlatformSpecificFile PlatformSpecificStdOut = stdout;
PlatformSpecificFile (*PlatformSpecificFOpen)(const char* filename, const char* flag) = VisualCppFOpen;
void (*PlatformSpecificFPuts)(const char* str, PlatformSpecificFile file) = VisualCppFPuts;
void (*PlatformSpecificFClose)(PlatformSpecificFile file) = VisualCppFClose;
Expand Down
2 changes: 1 addition & 1 deletion src/Platforms/armcc/UtestPlatform.cpp
Expand Up @@ -146,7 +146,7 @@ static void PlatformSpecificFlushImplementation()
fflush(stdout);
}

const PlatformSpecificFile PlatformSpecificStdOut = stdout;
PlatformSpecificFile PlatformSpecificStdOut = stdout;
PlatformSpecificFile (*PlatformSpecificFOpen)(const char*, const char*) = PlatformSpecificFOpenImplementation;
void (*PlatformSpecificFPuts)(const char*, PlatformSpecificFile) = PlatformSpecificFPutsImplementation;
void (*PlatformSpecificFClose)(PlatformSpecificFile) = PlatformSpecificFCloseImplementation;
Expand Down

0 comments on commit a7eb835

Please sign in to comment.