| 378 | */ |
| 379 | |
| 380 | void |
| 381 | cupsLangFlush(void) |
| 382 | { |
| 383 | cups_lang_t *lang, /* Current language */ |
| 384 | *next; /* Next language */ |
| 385 | |
| 386 | |
| 387 | /* |
| 388 | * Free all languages in the cache... |
| 389 | */ |
| 390 | |
| 391 | _cupsMutexLock(&lang_mutex); |
| 392 | |
| 393 | for (lang = lang_cache; lang != NULL; lang = next) |
| 394 | { |
| 395 | /* |
| 396 | * Free all messages... |
| 397 | */ |
| 398 | |
| 399 | _cupsMessageFree(lang->strings); |
| 400 | |
| 401 | /* |
| 402 | * Then free the language structure itself... |
| 403 | */ |
| 404 | |
| 405 | next = lang->next; |
| 406 | free(lang); |
| 407 | } |
| 408 | |
| 409 | lang_cache = NULL; |
| 410 | |
| 411 | _cupsMutexUnlock(&lang_mutex); |
| 412 | } |
| 413 | |
| 414 | |
| 415 | /* |
nothing calls this directly
no test coverage detected