rem: *closing_bracket_idx = i; return 0;
context: find_bracketed_repeat (const struct E_string *es, size_t start_idx,		       unsigned int *char_to_repeat, size_t *repeat_count,		       size_t *closing_bracket_idx){  size_t i;  assert (start_idx + 1 < es->len);  if (!ES_MATCH (es, start_idx + 1, '*'))    return -1;  for (i = start_idx + 2; i < es->len; i++)    {      if (ES_MATCH (es, i, ']'))	{	  size_t digit_str_len = i - start_idx - 2;	  *char_to_repeat = es->s[start_idx];	  if (digit_str_len == 0)	    {	      /* We've matched [c*] -- no explicit repeat count.  */	      *repeat_count = 0;	      *closing_bracket_idx = i;	      return 0;	    }	  /* Here, we have found [c*s] where s should be a string	     of octal (if it starts with `0') or decimal digits.  */	  {	    const char *digit_str = (const char *) &es->s[start_idx + 2];	    unsigned long int tmp_ulong;	    char *d_end;	    int base = 10;	    /* Select the base manually so we can be sure it's either 8 or 10.	       If the spec allowed it to be interpreted as hexadecimal, we	       could have used `0' and let xstrtoul decide.  */	    if (*digit_str == '0')	      {		base = 8;		++digit_str;		--digit_str_len;	      }	    if (xstrtoul (digit_str, &d_end, base, &tmp_ulong, NULL)		  != LONGINT_OK		|| BEGIN_STATE < tmp_ulong		|| digit_str + digit_str_len != d_end)	      {		char *tmp = make_printable_str (es->s + start_idx + 2,						i - start_idx - 2);		error (0, 0, _("invalid repeat count `%s' in [c*n] construct"),		       tmp);		free (tmp);		return -2;	      }	    *repeat_count = tmp_ulong;	  }	  *closing_bracket_idx = i;	  return 0;	}    }  return -1;			/* No bracket found.  */}