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

Function StdioFprintfWord

common/script/cstdlib/stdio.c:133–154  ·  view source on GitHub ↗

printf-style format of an int or other word-sized object */

Source from the content-addressed store, hash-verified

131
132/* printf-style format of an int or other word-sized object */
133void StdioFprintfWord(StdOutStream* Stream, const char* Format, unsigned int Value)
134{
135 if (Stream->FilePtr != NULL)
136 {
137 Stream->CharCount += fprintf(Stream->FilePtr, Format, Value);
138 }
139 else if (Stream->StrOutLen >= 0)
140 {
141#ifndef WIN32
142 int CCount = snprintf(Stream->StrOutPtr, Stream->StrOutLen, Format, Value);
143#else
144 int CCount = _snprintf(Stream->StrOutPtr, Stream->StrOutLen, Format, Value);
145#endif
146 StdioStrAdvance(Stream, CCount);
147 }
148 else
149 {
150 int CCount = sprintf(Stream->StrOutPtr, Format, Value);
151 Stream->CharCount += CCount;
152 Stream->StrOutPtr += CCount;
153 }
154}
155
156/* printf-style format of a long */
157void StdioFprintfLong(StdOutStream* Stream, const char* Format, uint64_t Value)

Callers 1

StdioBasePrintfFunction · 0.85

Calls 1

StdioStrAdvanceFunction · 0.85

Tested by

no test coverage detected