OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   04-Jun-2004 16:38:32
  Branch: HEAD                             Handle: 2004060415383100

  Modified files:
    openpkg-src/openpkg     HISTORY bash.patch

  Log:
    add GNU bash 2.05b vendor patches 001-007

  Summary:
    Revision    Changes     Path
    1.188       +1  -0      openpkg-src/openpkg/HISTORY
    1.3         +223 -0     openpkg-src/openpkg/bash.patch
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg/HISTORY
  ============================================================================
  $ cvs diff -u -r1.187 -r1.188 HISTORY
  --- openpkg-src/openpkg/HISTORY       4 Jun 2004 13:11:06 -0000       1.187
  +++ openpkg-src/openpkg/HISTORY       4 Jun 2004 14:38:31 -0000       1.188
  @@ -2,6 +2,7 @@
   2004
   ====
   
  +20040604 add GNU bash 2.05b vendor patches 001-007
   20040604 port to HP-UX 11.11 platform
   20040602 upgrade to cURL 7.12.0
   20040602 add evil hack to workaround Debian 3.1 install-info(8) conflicts
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg/bash.patch
  ============================================================================
  $ cvs diff -u -r1.2 -r1.3 bash.patch
  --- openpkg-src/openpkg/bash.patch    4 Jun 2004 13:11:06 -0000       1.2
  +++ openpkg-src/openpkg/bash.patch    4 Jun 2004 14:38:31 -0000       1.3
  @@ -1,3 +1,226 @@
  +These are the merged GNU Bash 2.05b vendor patches 001-007:
  +
  +Index: bashline.c
  +--- bashline.c.orig  2002-05-07 21:52:42.000000000 +0200
  ++++ bashline.c       2004-06-04 14:06:17.000000000 +0200
  +@@ -1044,7 +1044,10 @@
  +     }
  +       else
  +     {
  ++#define CMD_IS_DIR(x)       (absolute_pathname(x) == 0 && *(x) != '~' && 
test_for_directory (x))
  ++
  +       matches = rl_completion_matches (text, command_word_completion_function);
  ++
  +       /* If we are attempting command completion and nothing matches, we
  +          do not want readline to perform filename completion for us.  We
  +          still want to be able to complete partial pathnames, so set the
  +@@ -1052,7 +1055,7 @@
  +          filenames and leave directories in the match list. */
  +       if (matches == (char **)NULL)
  +         rl_ignore_some_completions_function = bash_ignore_filenames;
  +-      else if (matches[1] == 0 && *matches[0] != '/')
  ++      else if (matches[1] == 0 && CMD_IS_DIR(matches[0]))
  +         /* Turn off rl_filename_completion_desired so readline doesn't
  +            append a slash if there is a directory with the same name
  +            in the current directory, or other filename-specific things.
  +@@ -1061,7 +1064,7 @@
  +            looking in the current directory anyway, so there's no
  +            conflict. */
  +         rl_filename_completion_desired = 0;
  +-      else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && 
*matches[0] != '/')
  ++      else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && 
CMD_IS_DIR (matches[0]))
  +         /* There are multiple instances of the same match (duplicate
  +            completions haven't yet been removed).  In this case, all of
  +            the matches will be the same, and the duplicate removal code
  +Index: lib/readline/bind.c
  +--- lib/readline/bind.c.orig 2002-01-24 17:15:52.000000000 +0100
  ++++ lib/readline/bind.c      2004-06-04 14:06:17.000000000 +0200
  +@@ -311,7 +311,7 @@
  +          mapped to something, `abc' to be mapped to something else,
  +          and the function bound  to `a' to be executed when the user
  +          types `abx', leaving `bx' in the input queue. */
  +-      if (k.function /* && k.type == ISFUNC */)
  ++      if (k.function && ((k.type == ISFUNC && k.function != 
rl_do_lowercase_version) || k.type == ISMACR))
  +         {
  +           map[ANYOTHERKEY] = k;
  +           k.function = 0;
  +Index: lib/readline/display.c
  +--- lib/readline/display.c.orig      2002-06-04 16:54:47.000000000 +0200
  ++++ lib/readline/display.c   2004-06-04 14:06:17.000000000 +0200
  +@@ -70,7 +70,7 @@
  + static void cr PARAMS((void));
  + 
  + #if defined (HANDLE_MULTIBYTE)
  +-static int _rl_col_width PARAMS((char *, int, int));
  ++static int _rl_col_width PARAMS((const char *, int, int));
  + static int *_rl_wrapped_line;
  + #else
  + #  define _rl_col_width(l, s, e)    (((e) <= (s)) ? 0 : (e) - (s))
  +@@ -1348,9 +1348,9 @@
  +         {
  +           _rl_output_some_chars (nfd + lendiff, temp - lendiff);
  + #if 0
  +-          _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff) - 
col_lendiff;
  +-#else
  +           _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff);
  ++#else
  ++          _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff);
  + #endif
  +         }
  +     }
  +@@ -1510,8 +1510,15 @@
  + #if defined (HANDLE_MULTIBYTE)
  +   /* If we have multibyte characters, NEW is indexed by the buffer point in
  +      a multibyte string, but _rl_last_c_pos is the display position.  In
  +-     this case, NEW's display position is not obvious. */
  +-  if ((MB_CUR_MAX == 1 || rl_byte_oriented ) && _rl_last_c_pos == new) return;
  ++     this case, NEW's display position is not obvious and must be
  ++     calculated. */
  ++  if (MB_CUR_MAX == 1 || rl_byte_oriented)
  ++    {
  ++      if (_rl_last_c_pos == new)
  ++    return;
  ++    }
  ++  else if (_rl_last_c_pos == _rl_col_width (data, 0, new))
  ++    return;
  + #else
  +   if (_rl_last_c_pos == new) return;
  + #endif
  +@@ -1594,11 +1601,7 @@
  + #endif
  +     {
  +       if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
  +-    {
  +-      tputs (_rl_term_cr, 1, _rl_output_character_function);
  +-      for (i = 0; i < new; i++)
  +-        putc (data[i], rl_outstream);
  +-    }
  ++    _rl_backspace (_rl_last_c_pos - _rl_col_width (data, 0, new));
  +       else
  +     _rl_backspace (_rl_last_c_pos - new);
  +     }
  +@@ -2117,7 +2120,7 @@
  +    scan from the beginning of the string to take the state into account. */
  + static int
  + _rl_col_width (str, start, end)
  +-     char *str;
  ++     const char *str;
  +      int start, end;
  + {
  +   wchar_t wc;
  +@@ -2193,4 +2196,3 @@
  +   return width;
  + }
  + #endif /* HANDLE_MULTIBYTE */
  +-      
  +Index: lib/readline/mbutil.c
  +--- lib/readline/mbutil.c.orig       2002-06-04 17:54:29.000000000 +0200
  ++++ lib/readline/mbutil.c    2004-06-04 14:06:17.000000000 +0200
  +@@ -205,14 +205,16 @@
  +   if (tmp == (size_t)(-2))
  +     {
  +       /* shorted to compose multibyte char */
  +-      memset (ps, 0, sizeof(mbstate_t));
  ++      if (ps)
  ++    memset (ps, 0, sizeof(mbstate_t));
  +       return -2;
  +     }
  +   else if (tmp == (size_t)(-1))
  +     {
  +       /* invalid to compose multibyte char */
  +       /* initialize the conversion state */
  +-      memset (ps, 0, sizeof(mbstate_t));
  ++      if (ps)
  ++    memset (ps, 0, sizeof(mbstate_t));
  +       return -1;
  +     }
  +   else if (tmp == (size_t)0)
  +@@ -225,9 +227,12 @@
  +    return 1. Otherwise return 0. */
  + int
  + _rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2)
  +-     char *buf1, *buf2;
  +-     mbstate_t *ps1, *ps2;
  +-     int pos1, pos2;
  ++     char *buf1;
  ++     int pos1;
  ++     mbstate_t *ps1;
  ++     char *buf2;
  ++     int pos2;
  ++     mbstate_t *ps2;
  + {
  +   int i, w1, w2;
  + 
  +@@ -276,8 +281,11 @@
  +       pos++;
  +       /* clear the state of the byte sequence, because
  +          in this case effect of mbstate is undefined  */
  +-      memset (ps, 0, sizeof (mbstate_t));
  ++      if (ps)
  ++        memset (ps, 0, sizeof (mbstate_t));
  +     }
  ++      else if (tmp == 0)
  ++    pos++;
  +       else
  +     pos += tmp;
  +     }
  +Index: lib/readline/readline.c
  +--- lib/readline/readline.c.orig     2002-03-13 23:10:46.000000000 +0100
  ++++ lib/readline/readline.c  2004-06-04 14:06:17.000000000 +0200
  +@@ -684,6 +684,7 @@
  +     }
  + #if defined (VI_MODE)
  +   if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap &&
  ++      key != ANYOTHERKEY &&
  +       _rl_vi_textmod_command (key))
  +     _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
  + #endif
  +Index: lib/readline/vi_mode.c
  +--- lib/readline/vi_mode.c.orig      2002-05-23 19:27:58.000000000 +0200
  ++++ lib/readline/vi_mode.c   2004-06-04 14:06:17.000000000 +0200
  +@@ -680,7 +680,8 @@
  +      int count;
  + {
  +   wchar_t wc;
  +-  char mb[MB_LEN_MAX];
  ++  char mb[MB_LEN_MAX+1];
  ++  int mblen;
  +   mbstate_t ps;
  + 
  +   memset (&ps, 0, sizeof (mbstate_t));
  +@@ -703,7 +704,9 @@
  +       /* Vi is kind of strange here. */
  +       if (wc)
  +     {
  +-      wctomb (mb, wc);
  ++      mblen = wctomb (mb, wc);
  ++      if (mblen >= 0)
  ++        mb[mblen] = '\0';
  +       rl_begin_undo_group ();
  +       rl_delete (1, 0);
  +       rl_insert_text (mb);
  +Index: subst.c
  +--- subst.c.orig     2002-06-24 13:59:45.000000000 +0200
  ++++ subst.c  2004-06-04 14:06:17.000000000 +0200
  +@@ -1638,11 +1638,10 @@
  + 
  + /* This performs word splitting and quoted null character removal on
  +    STRING. */
  +-#if 0
  +-#define issep(c)    ((separators)[1] ? (member ((c), separators)) : (c) == 
(separators)[0])
  +-#else
  +-#define issep(c)    ((separators)[1] ? isifs(c) : (c) == (separators)[0])
  +-#endif
  ++#define issep(c) \
  ++    (((separators)[0]) ? ((separators)[1] ? isifs(c) \
  ++                                          : (c) == (separators)[0]) \
  ++                       : 0)
  + 
  + WORD_LIST *
  + list_string (string, separators, quoted)
  +
  +-----------------------------------------------------------------------------
  +
   This patch makes sure Bash does not segfault on empty here documents. It
   is derived from Gentoo Linux. The problem can be reproduced with "xargs
   <<< ${EMTPY_VARIABLE}".
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to