diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-31 14:59:41 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-31 14:59:41 +0000 |
commit | 424bcae1fb0f69e0aef5e0cf84fd771cf34a0fb7 (patch) | |
tree | 2841d6e3702a563627a400fa10a284b73a817436 /src/hardcopy.c | |
parent | eb6c2765959c91ddbb527f96f91ba5be199b8d41 (diff) |
patch 8.2.4273: the EBCDIC support is outdatedv8.2.4273
Problem: The EBCDIC support is outdated.
Solution: Remove the EBCDIC support.
Diffstat (limited to 'src/hardcopy.c')
-rw-r--r-- | src/hardcopy.c | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/src/hardcopy.c b/src/hardcopy.c index a41f330317..e2e5211624 100644 --- 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 len UNUSED) { // 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]); |