| 692 | /* Ensure output buffer OBUF is allocated/initialized. */ |
| 693 | |
| 694 | static void |
| 695 | alloc_obuf (void) |
| 696 | { |
| 697 | if (obuf) |
| 698 | return; |
| 699 | |
| 700 | if (conversions_mask & C_TWOBUFS) |
| 701 | { |
| 702 | obuf = alignalloc (page_size, output_blocksize); |
| 703 | if (!obuf) |
| 704 | { |
| 705 | char hbuf[LONGEST_HUMAN_READABLE + 1]; |
| 706 | error (EXIT_FAILURE, 0, |
| 707 | _("memory exhausted by output buffer of size %td" |
| 708 | " bytes (%s)"), |
| 709 | output_blocksize, |
| 710 | human_readable (output_blocksize, hbuf, |
| 711 | human_opts | human_base_1024, 1, 1)); |
| 712 | } |
| 713 | } |
| 714 | else |
| 715 | { |
| 716 | alloc_ibuf (); |
| 717 | obuf = ibuf; |
| 718 | } |
| 719 | } |
| 720 | |
| 721 | static void |
| 722 | translate_charset (char const *new_trans) |
no test coverage detected