MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / StdioFprintfFP

Function StdioFprintfFP

common/script/cstdlib/stdio.c:223–244  ·  view source on GitHub ↗

printf-style format of a floating point number */

Source from the content-addressed store, hash-verified

221
222/* printf-style format of a floating point number */
223void StdioFprintfFP(StdOutStream* Stream, const char* Format, double Value)
224{
225 if (Stream->FilePtr != NULL)
226 {
227 Stream->CharCount += fprintf(Stream->FilePtr, Format, Value);
228 }
229 else if (Stream->StrOutLen >= 0)
230 {
231#ifndef WIN32
232 int CCount = snprintf(Stream->StrOutPtr, Stream->StrOutLen, Format, Value);
233#else
234 int CCount = _snprintf(Stream->StrOutPtr, Stream->StrOutLen, Format, Value);
235#endif
236 StdioStrAdvance(Stream, CCount);
237 }
238 else
239 {
240 int CCount = sprintf(Stream->StrOutPtr, Format, Value);
241 Stream->CharCount += CCount;
242 Stream->StrOutPtr += CCount;
243 }
244}
245
246/* printf-style format of a pointer */
247void StdioFprintfPointer(StdOutStream* Stream, const char* Format, void* Value)

Callers 1

StdioBasePrintfFunction · 0.85

Calls 1

StdioStrAdvanceFunction · 0.85

Tested by

no test coverage detected