| 207 | */ |
| 208 | |
| 209 | static void |
| 210 | show_prompt(const char *message) /* I - Message string to use */ |
| 211 | { |
| 212 | ssize_t bytes; /* Number of bytes formatted */ |
| 213 | char output[8192]; /* Message buffer */ |
| 214 | cups_lang_t *lang = cupsLangDefault(); |
| 215 | /* Default language */ |
| 216 | |
| 217 | /* |
| 218 | * Transcode to the destination charset and write the prompt... |
| 219 | */ |
| 220 | |
| 221 | if ((bytes = cupsUTF8ToCharset(output, (cups_utf8_t *)_cupsLangString(lang, message), sizeof(output), lang->encoding)) > 0) |
| 222 | { |
| 223 | fwrite(output, 1, (size_t)bytes, stdout); |
| 224 | fflush(stdout); |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | |
| 229 | /* |
no test coverage detected