Loading ...
Sorry, an error occurred while loading the content.
 

SEGV on command-line

Expand Messages
  • Andrew Rodionoff
    Vim explodes when first character of command is lowercase [:alpha:] but not ... +++ ex_docmd.c Fri Mar 30 14:52:55 2001 @@ -1226,7 +1226,7 @@ goto doend; }
    Message 1 of 4 , Mar 30, 2001
      Vim explodes when first character of command is lowercase [:alpha:] but not
      [a-z] (e.g. Cyrillic_a). Here's a simple fix:

      --- ex_docmd.c~ Sat Mar 24 22:28:18 2001
      +++ ex_docmd.c Fri Mar 30 14:52:55 2001
      @@ -1226,7 +1226,7 @@
      goto doend;
      }
      #endif
      - if (ea.cmdidx == CMD_SIZE)
      + if (ea.cmdidx >= CMD_SIZE)
      {
      if (!ea.skip)
      {

      --
      Best regards, Andrew

      My face is new, my license is expired, and I'm under a doctor's care!!!!
    • Bram Moolenaar
      ... Does this mean that this character returns TRUE for isalpha()? Hmm, I suspect a few more things will be broken then... We probably require a new set of
      Message 2 of 4 , Mar 30, 2001
        Andrew Rodionoff wrote:

        > Vim explodes when first character of command is lowercase [:alpha:] but not
        > [a-z] (e.g. Cyrillic_a). Here's a simple fix:

        Does this mean that this character returns TRUE for isalpha()? Hmm, I
        suspect a few more things will be broken then...

        We probably require a new set of character test functions that don't
        change with the locale. I have always found this very confusing...

        We could use isalpha() && isascii() but that won't work for EBCDIC.

        --
        BLACK KNIGHT: The Black Knight always triumphs. Have at you!
        ARTHUR takes his last leg off. The BLACK KNIGHT's body lands upright.
        BLACK KNIGHT: All right, we'll call it a draw.
        "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

        /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
        ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
        \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
      • Andrew Rodionoff
        Greetings, Bram On Fri, Mar 30, 2001 at 23:25:32, Bram Moolenaar wrote: ... BM Does this mean that this character returns TRUE for isalpha()? Hmm, I Yes, in
        Message 3 of 4 , Mar 31, 2001
          Greetings, Bram

          On Fri, Mar 30, 2001 at 23:25:32, Bram Moolenaar wrote:
          BM> Andrew Rodionoff wrote:

          >> Vim explodes when first character of command is lowercase [:alpha:] but
          >> not [a-z] (e.g. Cyrillic_a). Here's a simple fix:

          BM> Does this mean that this character returns TRUE for isalpha()? Hmm, I
          Yes, in properly-configured Russian locale.
          BM> suspect a few more things will be broken then...
          I don't have much trouble with it, although I use i18n characters
          extensively.

          BM> We probably require a new set of character test functions that don't
          BM> change with the locale. I have always found this very confusing...
          I suppose you don't want to ruin all i18n capabilities? There are too many
          editor functions that rely on locale-correct upper/lower & alpha/digit
          character tests.

          BM> We could use isalpha() && isascii() but that won't work for EBCDIC.
          Why not? I guess isascii() will work as long as 8th bit is not involved.

          --
          Best regards, Andrew

          I just remembered something about a TOAD!
        • Bram Moolenaar
          ... In many places Vim really only wants to accept ASCII a-z and A-Z. In function names for example. In the case of the Ex commands a table of 26 entries is
          Message 4 of 4 , Apr 1, 2001
            Andrew Rodionoff wrote:

            > BM> We probably require a new set of character test functions that don't
            > BM> change with the locale. I have always found this very confusing...
            > I suppose you don't want to ruin all i18n capabilities? There are too many
            > editor functions that rely on locale-correct upper/lower & alpha/digit
            > character tests.

            In many places Vim really only wants to accept ASCII a-z and A-Z. In function
            names for example. In the case of the Ex commands a table of 26 entries is
            used, you can imagine this goes wrong when using a non-ASCII character.

            > BM> We could use isalpha() && isascii() but that won't work for EBCDIC.
            > Why not? I guess isascii() will work as long as 8th bit is not involved.

            Alphabetic EBCDIC characters do have the 8th bit set.

            --
            ALL: A witch! A witch!
            WITCH: It's a fair cop.
            ALL: Burn her! Burn her! Let's make her into a ladder.
            "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

            /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
            ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
            \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
          Your message has been successfully submitted and would be delivered to recipients shortly.