MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / PrintU32Base10

Function PrintU32Base10

CloverEFI/OsxEfiLdr/Debug.c:57–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57VOID
58PrintU32Base10 (
59 UINT32 Value
60 )
61{
62 UINT32 Index;
63 CHAR8 Char;
64 CHAR8 String[11];
65 UINTN StringPos;
66 UINT32 B10Div;
67
68 B10Div = 1000000000;
69 for (Index = 0, StringPos = 0; Index < 10; Index++) {
70 Char = (UINT8) (((Value / B10Div) % 10) + '0');
71 if ((StringPos > 0) || (Char != '0')) {
72 String[StringPos] = Char;
73 StringPos++;
74 }
75 B10Div = B10Div / 10;
76 }
77
78 if (StringPos == 0) {
79 String[0] = '0';
80 StringPos++;
81 }
82
83 String[StringPos] = '\0';
84
85 PrintString (String);
86}
87
88
89VOID

Callers

nothing calls this directly

Calls 1

PrintStringFunction · 0.70

Tested by

no test coverage detected