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

Function loadLocalizableStrings

Trash/stringTable.c:328–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326 "/usr/Devices/%s.config/%s.lproj/Localizable.strings"
327
328char *
329loadLocalizableStrings(
330 char *name
331)
332{
333 char buf[256], *config;
334 register INTN count, fd;
335
336 sprintf(buf, LOCALIZABLE, name, Language);
337 if ((fd = open(buf,0)) < 0) {
338 sprintf(buf, LOCALIZABLE, name, "English");
339 if ((fd = open(buf,0)) < 0)
340 return 0;
341 }
342 count = file_size(fd);
343 config = malloc(count);
344 count = read(fd, config, count);
345 close(fd);
346 if (count <= 0) {
347 free(config);
348 return 0;
349 }
350 return config;
351}
352
353char *
354bundleLongName(

Callers 1

bundleLongNameFunction · 0.85

Calls 4

readFunction · 0.85
closeFunction · 0.85
mallocFunction · 0.50
freeFunction · 0.50

Tested by

no test coverage detected