Add strace debugging aid.
1 2001-11-29 Jakub Jelinek <jakub@redhat.com>
3 * sysdeps/generic/glob.c (next_brace_sub): Return NULL if braces
4 don't match, fix {{a,b},c} globbing, clean up.
5 Patch by Flavio Veloso <flaviovs@magnux.com>.
7 --- libc/sysdeps/generic/glob.c.jj Thu Aug 23 18:49:29 2001
8 +++ libc/sysdeps/generic/glob.c Thu Nov 29 13:17:21 2001
9 @@ -355,42 +355,14 @@ static
13 -next_brace_sub (begin)
18 unsigned int depth = 0;
19 - const char *cp = begin;
25 - if (*cp != ',' && *cp != '}' && *cp != '\0')
35 - while (*cp != '\0' && (*cp != '}' || depth > 0))
42 - /* An incorrectly terminated brace expression. */
51 + while (*cp != '\0' && (*cp != '}' || depth--) && (*cp != ',' || depth))
54 + return *cp != '\0' ? cp : NULL;
57 #endif /* !GLOB_ONLY_P */