Mercurial > vim
diff src/hardcopy.c @ 27490:fb4c30606b4a v8.2.4273
patch 8.2.4273: the EBCDIC support is outdated
Commit: https://github.com/vim/vim/commit/424bcae1fb0f69e0aef5e0cf84fd771cf34a0fb7
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 31 14:59:41 2022 +0000
patch 8.2.4273: the EBCDIC support is outdated
Problem: The EBCDIC support is outdated.
Solution: Remove the EBCDIC support.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 31 Jan 2022 16:00:09 +0100 |
parents | c7f614c9ceb3 |
children | 60977de70684 |
line wrap: on
line diff
--- a/src/hardcopy.c +++ b/src/hardcopy.c @@ -1419,9 +1419,6 @@ prt_write_file(char_u *buffer) static void prt_write_file_len(char_u *buffer, int bytes) { -#ifdef EBCDIC - ebcdic2ascii(buffer, bytes); -#endif prt_write_file_raw_len(buffer, bytes); } @@ -1626,8 +1623,6 @@ prt_flush_buffer(void) prt_write_string("ul\n"); } // Draw the text - // Note: we write text out raw - EBCDIC conversion is handled in the - // PostScript world via the font encoding vector. if (prt_out_mbyte) prt_write_string("<"); else @@ -3119,7 +3114,7 @@ mch_print_end(prt_settings_T *psettings) // Write CTRL-D to close serial communication link if used. // NOTHING MUST BE WRITTEN AFTER THIS! - prt_write_file((char_u *)IF_EB("\004", "\067")); + prt_write_file((char_u *)"\004"); if (!prt_file_error && psettings->outfile == NULL && !got_int && !psettings->user_abort) @@ -3379,26 +3374,21 @@ mch_print_text_out(char_u *textp, int le { // Convert non-printing characters to either their escape or octal // sequence, ensures PS sent over a serial line does not interfere - // with the comms protocol. Note: For EBCDIC we need to write out - // the escape sequences as ASCII codes! - // Note 2: Char codes < 32 are identical in EBCDIC and ASCII AFAIK! - ga_append(&prt_ps_buffer, IF_EB('\\', 0134)); + // with the comms protocol. + ga_append(&prt_ps_buffer, '\\'); switch (ch) { - case BS: ga_append(&prt_ps_buffer, IF_EB('b', 0142)); break; - case TAB: ga_append(&prt_ps_buffer, IF_EB('t', 0164)); break; - case NL: ga_append(&prt_ps_buffer, IF_EB('n', 0156)); break; - case FF: ga_append(&prt_ps_buffer, IF_EB('f', 0146)); break; - case CAR: ga_append(&prt_ps_buffer, IF_EB('r', 0162)); break; - case '(': ga_append(&prt_ps_buffer, IF_EB('(', 0050)); break; - case ')': ga_append(&prt_ps_buffer, IF_EB(')', 0051)); break; - case '\\': ga_append(&prt_ps_buffer, IF_EB('\\', 0134)); break; + case BS: ga_append(&prt_ps_buffer, 'b'); break; + case TAB: ga_append(&prt_ps_buffer, 't'); break; + case NL: ga_append(&prt_ps_buffer, 'n'); break; + case FF: ga_append(&prt_ps_buffer, 'f'); break; + case CAR: ga_append(&prt_ps_buffer, 'r'); break; + case '(': ga_append(&prt_ps_buffer, '('); break; + case ')': ga_append(&prt_ps_buffer, ')'); break; + case '\\': ga_append(&prt_ps_buffer, '\\'); break; default: sprintf((char *)ch_buff, "%03o", (unsigned int)ch); -#ifdef EBCDIC - ebcdic2ascii(ch_buff, 3); -#endif ga_append(&prt_ps_buffer, ch_buff[0]); ga_append(&prt_ps_buffer, ch_buff[1]); ga_append(&prt_ps_buffer, ch_buff[2]);