source: scripts/patches/bash-3.0-fixes-1.patch@ d03270ae

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since d03270ae was 7f65c0e, checked in by Jim Gifford <clfs@…>, 19 years ago

r625@server (orig r623): jim | 2005-10-31 12:43:24 -0800
Final Move

  • Property mode set to 100644
File size: 20.7 KB
  • array.c

    Submitted By: Jim Gifford (patches at jg555 dot com)
    Date: 2004-09-29
    Initial Package Version: 3.0
    Origin: Various
    Upstream Status: Already Applied
    Description: This is all the patches that were release by
    	     Chet for Bash 3.0. These will appear in the
    	     next release. The original patches are at
    	     ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches
    
     
    diff -Naur bash-3.0.orig/array.c bash-3.0/array.c
    old new  
    451451                         */
    452452                        array_dispose_element(new);
    453453                        free(element_value(ae));
    454                         ae->value = savestring(v);
     454                        ae->value = v ? savestring(v) : (char *)NULL;
    455455                        return(0);
    456456                } else if (element_index(ae) > i) {
    457457                        ADD_BEFORE(ae, new);
  • arrayfunc.c

    diff -Naur bash-3.0.orig/arrayfunc.c bash-3.0/arrayfunc.c
    old new  
    611611  var = find_variable (t);
    612612
    613613  free (t);
    614   return var;
     614  return (var == 0 || invisible_p (var)) ? (SHELL_VAR *)0 : var;
    615615}
    616616
    617617/* Return a string containing the elements in the array and subscript
  • bashline.c

    diff -Naur bash-3.0.orig/bashline.c bash-3.0/bashline.c
    old new  
    100100#endif
    101101
    102102/* Helper functions for Readline. */
     103static int bash_directory_expansion __P((char **));
    103104static int bash_directory_completion_hook __P((char **));
    104105static int filename_completion_ignore __P((char **));
    105106static int bash_push_line __P((void));
     
    292293      /* See if we have anything to do. */
    293294      at = strchr (rl_completer_word_break_characters, '@');
    294295      if ((at == 0 && on_or_off == 0) || (at != 0 && on_or_off != 0))
    295         return;
     296        return old_value;
    296297
    297298      /* We have something to do.  Do it. */
    298299      nval = (char *)xmalloc (strlen (rl_completer_word_break_characters) + 1 + on_or_off);
     
    14061407             filename. */
    14071408          if (*hint_text == '~')
    14081409            {
    1409               int l, tl, vl;
     1410              int l, tl, vl, dl;
     1411              char *rd;
    14101412              vl = strlen (val);
    14111413              tl = strlen (hint_text);
     1414#if 0
    14121415              l = vl - hint_len;        /* # of chars added */
     1416#else
     1417              rd = savestring (filename_hint);
     1418              bash_directory_expansion (&rd);
     1419              dl = strlen (rd);
     1420              l = vl - dl;              /* # of chars added */
     1421              free (rd);
     1422#endif
    14131423              temp = (char *)xmalloc (l + 2 + tl);
    14141424              strcpy (temp, hint_text);
    14151425              strcpy (temp + tl, val + vl - l);
     
    21872197  return 0;
    21882198}
    21892199
     2200/* Simulate the expansions that will be performed by
     2201   rl_filename_completion_function.  This must be called with the address of
     2202   a pointer to malloc'd memory. */
     2203static int
     2204bash_directory_expansion (dirname)
     2205     char **dirname;
     2206{
     2207  char *d;
     2208
     2209  d = savestring (*dirname);
     2210
     2211  if (rl_directory_rewrite_hook)
     2212    (*rl_directory_rewrite_hook) (&d);
     2213
     2214  if (rl_directory_completion_hook && (*rl_directory_completion_hook) (&d))
     2215    {
     2216      free (*dirname);
     2217      *dirname = d;
     2218    }
     2219}
     2220 
    21902221/* Handle symbolic link references and other directory name
    21912222   expansions while hacking completion. */
    21922223static int
     
    25132544  static char **matches = (char **)NULL;
    25142545  static int ind;
    25152546  int glen;
    2516   char *ret;
     2547  char *ret, *ttext;
    25172548
    25182549  if (state == 0)
    25192550    {
     
    25232554        FREE (globorig);
    25242555      FREE (globtext);
    25252556
     2557      ttext = bash_tilde_expand (text, 0);
     2558
    25262559      if (rl_explicit_arg)
    25272560        {
    2528           globorig = savestring (text);
    2529           glen = strlen (text);
     2561          globorig = savestring (ttext);
     2562          glen = strlen (ttext);
    25302563          globtext = (char *)xmalloc (glen + 2);
    2531           strcpy (globtext, text);
     2564          strcpy (globtext, ttext);
    25322565          globtext[glen] = '*';
    25332566          globtext[glen+1] = '\0';
    25342567        }
    25352568      else
    2536         globtext = globorig = savestring (text);
     2569        globtext = globorig = savestring (ttext);
     2570
     2571      if (ttext != text)
     2572        free (ttext);
    25372573
    25382574      matches = shell_glob_filename (globtext);
    25392575      if (GLOB_FAILED (matches))
  • braces.c

    diff -Naur bash-3.0.orig/braces.c bash-3.0/braces.c
    old new  
    340340 
    341341  if (lhs_t == ST_CHAR)
    342342    {
    343       lhs_v = lhs[0];
    344       rhs_v = rhs[0];
     343      lhs_v = (unsigned char)lhs[0];
     344      rhs_v = (unsigned char)rhs[0];
    345345    }
    346346  else
    347347    {
     
    402402        {
    403403          pass_next = 1;
    404404          i++;
     405          level++;
    405406          continue;
    406407        }
    407408#endif
  • builtins/trap.def

    diff -Naur bash-3.0.orig/builtins/trap.def bash-3.0/builtins/trap.def
    old new  
    2323
    2424$BUILTIN trap
    2525$FUNCTION trap_builtin
    26 $SHORT_DOC trap [-lp] [[arg] signal_spec ...]
     26$SHORT_DOC trap [-lp] [arg signal_spec ...]
    2727The command ARG is to be read and executed when the shell receives
    2828signal(s) SIGNAL_SPEC.  If ARG is absent (and a single SIGNAL_SPEC
    2929is supplied) or `-', each specified signal is reset to its original
     
    8787trap_builtin (list)
    8888     WORD_LIST *list;
    8989{
    90   int list_signal_names, display, result, opt;
     90  int list_signal_names, display, result, opt, first_signal;
    9191
    9292  list_signal_names = display = 0;
    9393  result = EXECUTION_SUCCESS;
     
    118118  else
    119119    {
    120120      char *first_arg;
    121       int operation, sig;
     121      int operation, sig, first_signal;
    122122
    123123      operation = SET;
    124124      first_arg = list->word->word;
     125      first_signal = first_arg && *first_arg && all_digits (first_arg) && signal_object_p (first_arg, opt);
     126
     127      /* Backwards compatibility */
     128      if (first_signal)
     129        operation = REVERT;
    125130      /* When in posix mode, the historical behavior of looking for a
    126131         missing first argument is disabled.  To revert to the original
    127132         signal handling disposition, use `-' as the first argument. */
    128       if (posixly_correct == 0 && first_arg && *first_arg &&
     133      else if (posixly_correct == 0 && first_arg && *first_arg &&
    129134                (*first_arg != '-' || first_arg[1]) &&
    130135                signal_object_p (first_arg, opt) && list->next == 0)
    131136        operation = REVERT;
  • doc/bashref.texi

    diff -Naur bash-3.0.orig/doc/bashref.texi bash-3.0/doc/bashref.texi
    old new  
    59535953@item
    59545954The @code{trap} builtin doesn't check the first argument for a possible
    59555955signal specification and revert the signal handling to the original
    5956 disposition if it is.  If users want to reset the handler for a given
     5956disposition if it is, unless that argument consists solely of digits and
     5957is a valid signal number.  If users want to reset the handler for a given
    59575958signal to the original disposition, they should use @samp{-} as the
    59585959first argument.
    59595960
  • include/shmbutil.h

    diff -Naur bash-3.0.orig/include/shmbutil.h bash-3.0/include/shmbutil.h
    old new  
    3131extern size_t xmbsrtowcs __P((wchar_t *, const char **, size_t, mbstate_t *));
    3232extern size_t xdupmbstowcs __P((wchar_t **, char ***, const char *));
    3333
     34extern size_t mbstrlen __P((const char *));
     35
    3436extern char *xstrchr __P((const char *, int));
    3537
    3638#ifndef MB_INVALIDCH
     
    3840#define MB_NULLWCH(x)           ((x) == 0)
    3941#endif
    4042
     43#define MBSLEN(s)       (((s) && (s)[0]) ? ((s)[1] ? mbstrlen (s) : 1) : 0)
     44#define MB_STRLEN(s)    ((MB_CUR_MAX > 1) ? MBSLEN (s) : STRLEN (s))
     45
    4146#else /* !HANDLE_MULTIBYTE */
    4247
    4348#undef MB_LEN_MAX
     
    5459#define MB_NULLWCH(x)           (0)
    5560#endif
    5661
     62#define MB_STRLEN(s)            (STRLEN(s))
     63
    5764#endif /* !HANDLE_MULTIBYTE */
    5865
    5966/* Declare and initialize a multibyte state.  Call must be terminated
  • bash-3.0

    diff -Naur bash-3.0.orig/jobs.c bash-3.0/jobs.c
    old new  
    17781778  if (pipefail_opt)
    17791779    {
    17801780      fail = 0;
    1781       for (p = jobs[job]->pipe; p->next != jobs[job]->pipe; p = p->next)
    1782         if (p->status != EXECUTION_SUCCESS) fail = p->status;
     1781      p = jobs[job]->pipe;
     1782      do
     1783        {
     1784          if (p->status != EXECUTION_SUCCESS) fail = p->status;
     1785          p = p->next;
     1786        }
     1787      while (p != jobs[job]->pipe);
    17831788      return fail;
    17841789    }
    17851790
  • lib/readline/display.c

    diff -Naur bash-3.0.orig/lib/readline/display.c bash-3.0/lib/readline/display.c
    old new  
    201201     int *lp, *lip, *niflp, *vlp;
    202202{
    203203  char *r, *ret, *p;
    204   int l, rl, last, ignoring, ninvis, invfl, ind, pind, physchars;
     204  int l, rl, last, ignoring, ninvis, invfl, invflset, ind, pind, physchars;
    205205
    206206  /* Short-circuit if we can. */
    207207  if ((MB_CUR_MAX <= 1 || rl_byte_oriented) && strchr (pmt, RL_PROMPT_START_IGNORE) == 0)
     
    222222  r = ret = (char *)xmalloc (l + 1);
    223223
    224224  invfl = 0;    /* invisible chars in first line of prompt */
     225  invflset = 0; /* we only want to set invfl once */
    225226
    226227  for (rl = ignoring = last = ninvis = physchars = 0, p = pmt; p && *p; p++)
    227228    {
     
    249250              while (l--)
    250251                *r++ = *p++;
    251252              if (!ignoring)
    252                 rl += ind - pind;
     253                {
     254                  rl += ind - pind;
     255                  physchars += _rl_col_width (pmt, pind, ind);
     256                }
    253257              else
    254258                ninvis += ind - pind;
    255259              p--;                      /* compensate for later increment */
     
    259263            {
    260264              *r++ = *p;
    261265              if (!ignoring)
    262                 rl++;                   /* visible length byte counter */
     266                {
     267                  rl++;                 /* visible length byte counter */
     268                  physchars++;
     269                }
    263270              else
    264271                ninvis++;               /* invisible chars byte counter */
    265272            }
    266273
    267           if (rl >= _rl_screenwidth)
    268             invfl = ninvis;
    269 
    270           if (ignoring == 0)
    271             physchars++;
     274          if (invflset == 0 && rl >= _rl_screenwidth)
     275            {
     276              invfl = ninvis;
     277              invflset = 1;
     278            }
    272279        }
    273280    }
    274281
     
    351358      local_prompt = expand_prompt (p, &prompt_visible_length,
    352359                                       &prompt_last_invisible,
    353360                                       (int *)NULL,
    354                                        (int *)NULL);
     361                                       &prompt_physical_chars);
    355362      c = *t; *t = '\0';
    356363      /* The portion of the prompt string up to and including the
    357364         final newline is now null-terminated. */
    358365      local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length,
    359366                                                   (int *)NULL,
    360367                                                   &prompt_invis_chars_first_line,
    361                                                    &prompt_physical_chars);
     368                                                   (int *)NULL);
    362369      *t = c;
    363370      return (prompt_prefix_length);
    364371    }
     
    417424  register int in, out, c, linenum, cursor_linenum;
    418425  register char *line;
    419426  int c_pos, inv_botlin, lb_botlin, lb_linenum;
    420   int newlines, lpos, temp, modmark;
     427  int newlines, lpos, temp, modmark, n0, num;
    421428  char *prompt_this_line;
    422429#if defined (HANDLE_MULTIBYTE)
    423430  wchar_t wc;
     
    573580
    574581#if defined (HANDLE_MULTIBYTE)
    575582  memset (_rl_wrapped_line, 0, vis_lbsize);
     583  num = 0;
    576584#endif
    577585
    578586  /* prompt_invis_chars_first_line is the number of invisible characters in
     
    591599         probably too much work for the benefit gained.  How many people have
    592600         prompts that exceed two physical lines?
    593601         Additional logic fix from Edward Catmur <ed@catmur.co.uk> */
     602#if defined (HANDLE_MULTIBYTE)
     603      n0 = num;
     604      temp = local_prompt ? strlen (local_prompt) : 0;
     605      while (num < temp)
     606        {
     607          if (_rl_col_width  (local_prompt, n0, num) > _rl_screenwidth)
     608            {
     609              num = _rl_find_prev_mbchar (local_prompt, num, MB_FIND_ANY);
     610              break;
     611            }
     612          num++;
     613        }
     614      temp = num +
     615#else
    594616      temp = ((newlines + 1) * _rl_screenwidth) +
     617#endif /* !HANDLE_MULTIBYTE */
    595618             ((local_prompt_prefix == 0) ? ((newlines == 0) ? prompt_invis_chars_first_line
    596619                                                            : ((newlines == 1) ? wrap_offset : 0))
    597620                                         : ((newlines == 0) ? wrap_offset :0));
    598621             
    599622      inv_lbreaks[++newlines] = temp;
     623#if defined (HANDLE_MULTIBYTE)
     624      lpos -= _rl_col_width (local_prompt, n0, num);
     625#else
    600626      lpos -= _rl_screenwidth;
     627#endif
    601628    }
    602629
    603630  prompt_last_screen_line = newlines;
  • lib/readline/mbutil.c

    diff -Naur bash-3.0.orig/lib/readline/mbutil.c bash-3.0/lib/readline/mbutil.c
    old new  
    126126  if (find_non_zero)
    127127    {
    128128      tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps);
    129       while (wcwidth (wc) == 0)
     129      while (tmp > 0 && wcwidth (wc) == 0)
    130130        {
    131131          point += tmp;
    132132          tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps);
    133           if (tmp == (size_t)(0) || tmp == (size_t)(-1) || tmp == (size_t)(-2))
     133          if (MB_NULLWCH (tmp) || MB_INVALIDCH (tmp))
    134134            break;
    135135        }
    136136    }
  • lib/readline/misc.c

    diff -Naur bash-3.0.orig/lib/readline/misc.c bash-3.0/lib/readline/misc.c
    old new  
    276276      _rl_saved_line_for_history->line = savestring (rl_line_buffer);
    277277      _rl_saved_line_for_history->data = (char *)rl_undo_list;
    278278    }
    279   else if (STREQ (rl_line_buffer, _rl_saved_line_for_history->line) == 0)
    280     {
    281       free (_rl_saved_line_for_history->line);
    282       _rl_saved_line_for_history->line = savestring (rl_line_buffer);
    283       _rl_saved_line_for_history->data = (char *)rl_undo_list;  /* XXX possible memleak */
    284     }
    285279
    286280  return 0;
    287281}
  • lib/readline/vi_mode.c

    diff -Naur bash-3.0.orig/lib/readline/vi_mode.c bash-3.0/lib/readline/vi_mode.c
    old new  
    272272  switch (key)
    273273    {
    274274    case '?':
     275      _rl_free_saved_history_line ();
    275276      rl_noninc_forward_search (count, key);
    276277      break;
    277278
    278279    case '/':
     280      _rl_free_saved_history_line ();
    279281      rl_noninc_reverse_search (count, key);
    280282      break;
    281283
     
    690692{
    691693  wchar_t wc;
    692694  char mb[MB_LEN_MAX+1];
    693   int mblen;
     695  int mblen, p;
    694696  mbstate_t ps;
    695697
    696698  memset (&ps, 0, sizeof (mbstate_t));
     
    713715      /* Vi is kind of strange here. */
    714716      if (wc)
    715717        {
     718          p = rl_point;
    716719          mblen = wcrtomb (mb, wc, &ps);
    717720          if (mblen >= 0)
    718721            mb[mblen] = '\0';
    719722          rl_begin_undo_group ();
    720           rl_delete (1, 0);
     723          rl_vi_delete (1, 0);
     724          if (rl_point < p)     /* Did we retreat at EOL? */
     725            rl_point++; /* XXX - should we advance more than 1 for mbchar? */
    721726          rl_insert_text (mb);
    722727          rl_end_undo_group ();
    723728          rl_vi_check ();
     
    13101315      rl_vi_delete (1, c);
    13111316#if defined (HANDLE_MULTIBYTE)
    13121317      if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
    1313         while (_rl_insert_char (1, c))
    1314           {
    1315             RL_SETSTATE (RL_STATE_MOREINPUT);
    1316             c = rl_read_key ();
    1317             RL_UNSETSTATE (RL_STATE_MOREINPUT);
    1318           }
     1318        {
     1319          if (rl_point < p)             /* Did we retreat at EOL? */
     1320            rl_point++;
     1321          while (_rl_insert_char (1, c))
     1322            {
     1323              RL_SETSTATE (RL_STATE_MOREINPUT);
     1324              c = rl_read_key ();
     1325              RL_UNSETSTATE (RL_STATE_MOREINPUT);
     1326            }
     1327        }
    13191328      else
    13201329#endif
    13211330        {
  • patchlevel.h

    diff -Naur bash-3.0.orig/patchlevel.h bash-3.0/patchlevel.h
    old new  
    2525   regexp `^#define[    ]*PATCHLEVEL', since that's what support/mkversion.sh
    2626   looks for to find the patch level (for the sccs version string). */
    2727
    28 #define PATCHLEVEL 0
     28#define PATCHLEVEL 13
    2929
    3030#endif /* _PATCHLEVEL_H_ */
  • pcomplete.c

    diff -Naur bash-3.0.orig/pcomplete.c bash-3.0/pcomplete.c
    old new  
    863863  if (array_p (v) == 0)
    864864    v = convert_var_to_array (v);
    865865  v = assign_array_var_from_word_list (v, lwords);
     866
     867  VUNSETATTR (v, att_invisible);
    866868  return v;
    867869}
    868870#endif /* ARRAY_VARS */
     
    10221024  if (array_p (v) == 0)
    10231025    v = convert_var_to_array (v);
    10241026
     1027  VUNSETATTR (v, att_invisible);
     1028
    10251029  a = array_cell (v);
    10261030  if (a == 0 || array_empty (a))
    10271031    sl = (STRINGLIST *)NULL;
  • subst.c

    diff -Naur bash-3.0.orig/subst.c bash-3.0/subst.c
    old new  
    46914691          legal_identifier (name + 1));                         /* ${#PS1} */
    46924692}
    46934693
     4694#if defined (HANDLE_MULTIBYTE)
     4695size_t
     4696mbstrlen (s)
     4697     const char *s;
     4698{
     4699  size_t clen, nc;
     4700  mbstate_t mbs;
     4701
     4702  nc = 0;
     4703  memset (&mbs, 0, sizeof (mbs));
     4704  while ((clen = mbrlen(s, MB_CUR_MAX, &mbs)) != 0 && (MB_INVALIDCH(clen) == 0))
     4705    {
     4706      s += clen;
     4707      nc++;
     4708    }
     4709  return nc;
     4710}
     4711#endif
     4712     
     4713
    46944714/* Handle the parameter brace expansion that requires us to return the
    46954715   length of a parameter. */
    46964716static intmax_t
     
    47464766      if (legal_number (name + 1, &arg_index))          /* ${#1} */
    47474767        {
    47484768          t = get_dollar_var_value (arg_index);
    4749           number = STRLEN (t);
     4769          number = MB_STRLEN (t);
    47504770          FREE (t);
    47514771        }
    47524772#if defined (ARRAY_VARS)
    4753       else if ((var = find_variable (name + 1)) && array_p (var))
     4773      else if ((var = find_variable (name + 1)) && (invisible_p (var) == 0) && array_p (var))
    47544774        {
    47554775          t = array_reference (array_cell (var), 0);
    4756           number = STRLEN (t);
     4776          number = MB_STRLEN (t);
    47574777        }
    47584778#endif
    47594779      else                              /* ${#PS1} */
     
    47664786          if (list)
    47674787            dispose_words (list);
    47684788
    4769           number = STRLEN (t);
     4789          number = MB_STRLEN (t);
    47704790          FREE (t);
    47714791        }
    47724792    }
     
    48714891    {
    48724892    case VT_VARIABLE:
    48734893    case VT_ARRAYMEMBER:
    4874       len = strlen (value);
     4894      len = MB_STRLEN (value);
    48754895      break;
    48764896    case VT_POSPARMS:
    48774897      len = number_of_args () + 1;
     
    48914911  if (*e1p < 0)         /* negative offsets count from end */
    48924912    *e1p += len;
    48934913
    4894   if (*e1p >= len || *e1p < 0)
     4914  if (*e1p > len || *e1p < 0)
    48954915    return (-1);
    48964916
    48974917#if defined (ARRAY_VARS)
     
    49825002      else
    49835003        return -1;
    49845004    }
    4985   else if ((v = find_variable (varname)) && array_p (v))
     5005  else if ((v = find_variable (varname)) && (invisible_p (v) == 0) && array_p (v))
    49865006    {
    49875007      vtype = VT_ARRAYMEMBER;
    49885008      *varp = v;
  • tests/dbg-support.tests

    diff -Naur bash-3.0.orig/tests/dbg-support.tests bash-3.0/tests/dbg-support.tests
    old new  
    6262trap 'print_debug_trap $LINENO' DEBUG
    6363trap 'print_return_trap $LINENO' RETURN
    6464
    65 # Funcname is now an array. Vanilla Bash 2.05 doesn't have FUNCNAME array.
    66 echo "FUNCNAME" ${FUNCNAME[0]}
     65# Funcname is now an array, but you still can't see it outside a function
     66echo "FUNCNAME" ${FUNCNAME[0]:-main}
    6767
    6868# We should trace into the below.
    6969# Start easy with a simple function.
  • tests/errors.right

    diff -Naur bash-3.0.orig/tests/errors.right bash-3.0/tests/errors.right
    old new  
    8585./errors.tests: line 213: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
    8686./errors.tests: line 216: trap: NOSIG: invalid signal specification
    8787./errors.tests: line 219: trap: -s: invalid option
    88 trap: usage: trap [-lp] [[arg] signal_spec ...]
     88trap: usage: trap [-lp] [arg signal_spec ...]
    8989./errors.tests: line 225: return: can only `return' from a function or sourced script
    9090./errors.tests: line 229: break: 0: loop count out of range
    9191./errors.tests: line 233: continue: 0: loop count out of range
  • variables.c

    diff -Naur bash-3.0.orig/variables.c bash-3.0/variables.c
    old new  
    14191419  v = init_dynamic_array_var ("GROUPS", get_groupset, null_array_assign, att_noassign);
    14201420
    14211421#  if defined (DEBUGGER)
    1422   v = init_dynamic_array_var ("BASH_ARGC", get_self, null_array_assign, (att_invisible|att_noassign));
    1423   v = init_dynamic_array_var ("BASH_ARGV", get_self, null_array_assign, (att_invisible|att_noassign));
     1422  v = init_dynamic_array_var ("BASH_ARGC", get_self, null_array_assign, att_noassign);
     1423  v = init_dynamic_array_var ("BASH_ARGV", get_self, null_array_assign, att_noassign);
    14241424#  endif /* DEBUGGER */
    1425   v = init_dynamic_array_var ("BASH_SOURCE", get_self, null_array_assign, (att_invisible|att_noassign));
    1426   v = init_dynamic_array_var ("BASH_LINENO", get_self, null_array_assign, (att_invisible|att_noassign));
     1425  v = init_dynamic_array_var ("BASH_SOURCE", get_self, null_array_assign, att_noassign);
     1426  v = init_dynamic_array_var ("BASH_LINENO", get_self, null_array_assign, att_noassign);
    14271427#endif
    14281428
    14291429  v = init_funcname_var ();
     
    15991599  /* local foo; local foo;  is a no-op. */
    16001600  old_var = find_variable (name);
    16011601  if (old_var && local_p (old_var) && old_var->context == variable_context)
    1602     return (old_var);
     1602    {
     1603      VUNSETATTR (old_var, att_invisible);
     1604      return (old_var);
     1605    }
    16031606
    16041607  was_tmpvar = old_var && tempvar_p (old_var);
    16051608  if (was_tmpvar)
Note: See TracBrowser for help on using the repository browser.