Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
	* posix/regex.c (compile_range): Transliate range start and end
	characters to avoid empty range in case of REG_ICASE [PR libc/1842].
  • Loading branch information
Ulrich Drepper committed Aug 2, 2000
1 parent cfd57cd commit f6cfb13
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
2000-08-02 Ulrich Drepper <drepper@redhat.com>

* posix/regex.c (compile_range): Transliate range start and end
characters to avoid empty range in case of REG_ICASE [PR libc/1842].

* sysdeps/unix/sysv/linux/ia64/bits/resource.h: Don't include
asm/resource.h.

Expand Down
11 changes: 8 additions & 3 deletions manual/examples/popen.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <stdio.h>
#include <stdlib.h>

void
void
write_data (FILE * stream)
{
int i;
Expand All @@ -23,11 +23,16 @@ main (void)
output = popen ("more", "w");
if (!output)
{
fprintf (stderr, "Could not run more.\n");
fprintf (stderr,
"incorrect parameters or too many files.\n");
return EXIT_FAILURE;
}
write_data (output);
pclose (output);
if (pclose (output) != 0)
{
fprintf (stderr,
"Could not run more or other error.\n");
}
return EXIT_SUCCESS;
}
/*@end group*/
4 changes: 2 additions & 2 deletions posix/regex.c
Original file line number Diff line number Diff line change
Expand Up @@ -3518,9 +3518,9 @@ compile_range (range_start_char, p_ptr, pend, translate, syntax, b)

/* Fetch the endpoints without translating them; the
appropriate translation is done in the bit-setting loop below. */
range_start[0] = range_start_char;
range_start[0] = TRANSLATE (range_start_char);
range_start[1] = '\0';
range_end[0] = p[0];
range_end[0] = TRANSLATE (p[0]);
range_end[1] = '\0';

/* Have to increment the pointer into the pattern string, so the
Expand Down

0 comments on commit f6cfb13

Please sign in to comment.