add: next_pattern:
context: add_exclude_file (void (*add_func) (struct exclude *, char const *, int),		  struct exclude *ex, char const *filename, int options,		  char line_end){  bool use_stdin = filename[0] == '-' && !filename[1];  FILE *in;  char *buf;  char *p;  char const *pattern;  char const *lim;  size_t buf_alloc = (1 << 10);  /* This must be a power of two.  */  size_t buf_count = 0;  int c;  int e = 0;  if (use_stdin)    in = stdin;  else if (! (in = fopen (filename, "r")))    return -1;  buf = xmalloc (buf_alloc);  while ((c = getc (in)) != EOF)    {      buf[buf_count++] = c;      if (buf_count == buf_alloc)	{	  buf_alloc *= 2;	  if (! buf_alloc)	    xalloc_die ();	  buf = xrealloc (buf, buf_alloc);	}    }  if (ferror (in))    e = errno;  if (!use_stdin && fclose (in) != 0)    e = errno;  buf = xrealloc (buf, buf_count + 1);  for (pattern = p = buf, lim = buf + buf_count;  p <= lim;  p++)    if (p < lim ? *p == line_end : buf < p && p[-1])      {	*p = '\0';	(*add_func) (ex, pattern, options);	pattern = p + 1;      }  errno = e;  return e ? -1 : 0;}