MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / Platform_EncodeString

Function Platform_EncodeString

src/Platform_Windows.c:1011–1030  ·  view source on GitHub ↗

#######################################################################################################################* *--------------------------------------------------------Platform---------------------------------------------------------* *#########################################################################################################################*/

Source from the content-addressed store, hash-verified

1009*--------------------------------------------------------Platform---------------------------------------------------------*
1010*#########################################################################################################################*/
1011void Platform_EncodeString(cc_winstring* dst, const cc_string* src) {
1012 cc_unichar* uni;
1013 char* ansi;
1014 int i;
1015 if (src->length > FILENAME_SIZE) Process_Abort("String too long to expand");
1016
1017 uni = dst->uni;
1018 for (i = 0; i < src->length; i++)
1019 {
1020 *uni++ = Convert_CP437ToUnicode(src->buffer[i]);
1021 }
1022 *uni = '\0';
1023
1024 ansi = dst->ansi;
1025 for (i = 0; i < src->length; i++)
1026 {
1027 *ansi++ = (char)dst->uni[i];
1028 }
1029 *ansi = '\0';
1030}
1031
1032static void Platform_InitStopwatch(void) {
1033 LARGE_INTEGER freq;

Callers 3

Platform_EncodePathFunction · 0.70
Process_StartGame2Function · 0.70
Process_StartOpenFunction · 0.70

Calls 1

Convert_CP437ToUnicodeFunction · 0.85

Tested by

no test coverage detected