From d1cc4cb437bd735e02c675e0722620548c780922 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Mon, 8 Jul 2019 02:34:45 +0000 Subject: [PATCH] Remove the special treatment of Ctrl-A/Ctrl-A: 1. it didn't work (in the #if 0 block) because of checking the same char twice 2. Ctrl-A/Ctrl-A is no more special than Ctrl-A/Ctrl-B or Ctrl-A/Ctrl-Z (I think Deuce was thinking of Ctrl-A/A, but there are other printing Ctrl-A codes too, e.g. Ctrl-A/z). --- src/sbbs3/wordwrap.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/sbbs3/wordwrap.c b/src/sbbs3/wordwrap.c index 45b26bf0c1..700ea10be6 100644 --- a/src/sbbs3/wordwrap.c +++ b/src/sbbs3/wordwrap.c @@ -71,7 +71,7 @@ static struct prefix parse_prefix(const char *text) // Skip CTRL-A Codes while(*pos == '\x01') { pos++; - if (*pos != '\x01' && *pos != 0) { + if (*pos != 0) { pos++; continue; } @@ -249,8 +249,6 @@ static struct section_len get_word_len(char *buf, int maxlen) ret.bytes++; if (buf[ret.bytes] == '\\') break; - if(buf[ret.bytes]!='\x01') - continue; } else if (buf[ret.bytes]=='\b') { // This doesn't handle BS the same way... bit it's kinda BS anyway. @@ -374,12 +372,6 @@ static struct paragraph *word_unwrap(char *inbuf, int oldlen, BOOL handle_quotes case '\x1f': // Strip delete chars. break; case '\x01': // CTRL-A code. -#if 0 // I'm not sure what this is supposed to be doing, but a literal Ctrl-A sequence is Ctrl-A/'A' (not Ctrl-A/Ctrl-A) - if (inbuf[inpos] == '\x01') { - // This is a literal CTRL-A... col advances and we can wrap - incol++; - } -#endif if (!paragraph_append(&ret[paragraph], inbuf+inpos, 2)) goto fail_return; inpos++; -- GitLab