printf ("regcomp %d failed: %s\n", i, buf);
printf ("regcomp %zd failed: %s\n", i, buf);
main (void){  regex_t re;  regmatch_t rm[4];  size_t i;  int n, ret = 0;  mtrace ();  for (i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i)    {      n = regcomp (&re, tests[i].pattern, tests[i].flags);      if (n != 0)	{	  char buf[500];	  regerror (n, &re, buf, sizeof (buf));	  printf ("regcomp %d failed: %s\n", i, buf);	  ret = 1;	  continue;	}      if (regexec (&re, tests[i].string, tests[i].nmatch, rm, 0))	{	  printf ("regexec %d failed\n", i);	  ret = 1;	  regfree (&re);	  continue;	}      for (n = 0; n < tests[i].nmatch; ++n)	if (rm[n].rm_so != tests[i].rm[n].rm_so              || rm[n].rm_eo != tests[i].rm[n].rm_eo)	  {	    if (tests[i].rm[n].rm_so == -1 && tests[i].rm[n].rm_eo == -1)	      break;	    printf ("regexec match failure rm[%d] %d..%d\n",		    n, rm[n].rm_so, rm[n].rm_eo);	    ret = 1;	    break;	  }      regfree (&re);    }  return ret;}