1 *** ../bash-3.0/subst.c Sun Jul 4 13:56:13 2004
2 --- subst.c Thu Aug 12 13:36:17 2004
8 + #if defined (HANDLE_MULTIBYTE)
17 + memset (&mbs, 0, sizeof (mbs));
18 + while ((clen = mbrlen(s, MB_CUR_MAX, &mbs)) != 0 && (MB_INVALIDCH(clen) == 0))
28 /* Handle the parameter brace expansion that requires us to return the
29 length of a parameter. */
33 t = get_dollar_var_value (arg_index);
34 ! number = STRLEN (t);
37 #if defined (ARRAY_VARS)
38 ! else if ((var = find_variable (name + 1)) && array_p (var))
40 t = array_reference (array_cell (var), 0);
41 ! number = STRLEN (t);
46 t = get_dollar_var_value (arg_index);
47 ! number = MB_STRLEN (t);
50 #if defined (ARRAY_VARS)
51 ! else if ((var = find_variable (name + 1)) && (invisible_p (var) == 0) && array_p (var))
53 t = array_reference (array_cell (var), 0);
54 ! number = MB_STRLEN (t);
61 ! number = STRLEN (t);
67 ! number = MB_STRLEN (t);
74 ! len = strlen (value);
80 ! len = MB_STRLEN (value);
87 ! if (*e1p >= len || *e1p < 0)
93 ! if (*e1p > len || *e1p < 0)
100 ! else if ((v = find_variable (varname)) && array_p (v))
102 vtype = VT_ARRAYMEMBER;
106 ! else if ((v = find_variable (varname)) && (invisible_p (v) == 0) && array_p (v))
108 vtype = VT_ARRAYMEMBER;