• src/sbbs3/wordwrap.c

    From rswindell@VERT to CVS commit on Friday, April 05, 2019 12:44:34
    src/sbbs3 wordwrap.c 1.43 1.44
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv640

    Modified Files:
    wordwrap.c
    Log Message:
    There appears to be a few places in this file that treat ^A^A as a literal Ctrl-A (ASCII 1) char. This is wrong. A literal Ctrl-A sequence is ^AA.
    I'm only addressing one of those instances in this commit since it *also* appears to be an off-by-one bug where it's treating *all* Ctrl-A sequences as though they were ^AA - so just #ifdef'ing out until Deuce takes a look at this.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sunday, July 07, 2019 16:43:03
    src/sbbs3 wordwrap.c 1.44 1.45
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv743

    Modified Files:
    wordwrap.c
    Log Message:
    Treat the "Conditional line-break" Ctrl-A code as the end of a word.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sunday, July 07, 2019 17:34:45
    src/sbbs3 wordwrap.c 1.45 1.46
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv1884

    Modified Files:
    wordwrap.c
    Log Message:
    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).



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sunday, July 07, 2019 17:40:38
    src/sbbs3 wordwrap.c 1.46 1.47
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv9438

    Modified Files:
    wordwrap.c
    Log Message:
    0x1f is "Unit Separator" (US) in ASCII, not Delete (DEL).
    I'm assuming Deuce meant to type '\x7f' instead of '\x1f'.
    Replaced '\x1f' with the unambiguous DEL macro.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sunday, July 07, 2019 19:27:52
    src/sbbs3 wordwrap.c 1.47 1.48
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv23338

    Modified Files:
    wordwrap.c
    Log Message:
    wordwrap() now detects and supports UTF-8 encoded text.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wednesday, July 10, 2019 13:40:35
    src/sbbs3 wordwrap.c 1.49 1.50
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv8677

    Modified Files:
    wordwrap.c
    Log Message:
    Fix bug introduced in r1.46: was counting (most) Ctrl-A codes as a single char rather than no char, when calculating word lengths. We needed that 'continue' here.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wednesday, July 10, 2019 18:08:49
    src/sbbs3 wordwrap.c 1.50 1.51
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/home/rswindell/sbbs/src/sbbs3

    Modified Files:
    wordwrap.c
    Log Message:
    <Deuce> Looks like it's the memcpy writing two bytes into a place it shouldn't. <Deuce> Easiest fix would be to have outbuf_append adjust outlen to be "long enough" if doubling isn't.
    <Deuce> /* Not enough room, double the size. */
    <Deuce> *outlen *= 2;
    <Deuce> if(*outp - *outbuf + len >= *outlen)
    <Deuce> *outlen = *outp - *outbuf + len + 1
    <Deuce> So yeah, blindly doubling won't work for utf-8.
    <Deuce> Because a line will have more bytes than the number of characters in a line.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net