| 326 | "/usr/Devices/%s.config/%s.lproj/Localizable.strings" |
| 327 | |
| 328 | char * |
| 329 | loadLocalizableStrings( |
| 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 | |
| 353 | char * |
| 354 | bundleLongName( |
no test coverage detected