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

Function GetNextLanguage

CloverEFI/OsxBdsDxe/Language.c:285–312  ·  view source on GitHub ↗

Get next language from language code list (with separator ';'). If LangCode is NULL, then ASSERT. If Lang is NULL, then ASSERT. @param LangCode On input: point to first language in the list. On output: point to next language in the list, or NULL if no more language in the list. @param Lang The first

Source from the content-addressed store, hash-verified

283
284**/
285VOID
286EFIAPI
287GetNextLanguage (
288 IN OUT CHAR8 **LangCode,
289 OUT CHAR8 *Lang
290 )
291{
292 UINTN Index;
293 CHAR8 *StringPtr;
294
295 ASSERT (LangCode != NULL);
296 ASSERT (*LangCode != NULL);
297 ASSERT (Lang != NULL);
298
299 Index = 0;
300 StringPtr = *LangCode;
301 while (StringPtr[Index] != 0 && StringPtr[Index] != ';') {
302 Index++;
303 }
304
305 CopyMem(Lang, StringPtr, Index);
306 Lang[Index] = 0;
307
308 if (StringPtr[Index] == ';') {
309 Index++;
310 }
311 *LangCode = StringPtr + Index;
312}
313
314/**
315 Check if lang is in supported language codes according to language string.

Callers 2

FrontPageCallbackFunction · 0.70
InitializeFrontPageFunction · 0.70

Calls 1

CopyMemFunction · 0.50

Tested by

no test coverage detected