+2003-02-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR preprocessor/9465
+ * tradcpp.c (fixup_newlines): Use memchr instead of strchr.
+
2003-01-31 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* pa.c (pa_output_function_prologue, pa_output_function_epilogue): Move
/* C Compatible Compiler Preprocessor (CCCP)
-Copyright (C) 1986, 1987, 1989, 2000, 2001 Free Software Foundation, Inc.
+Copyright (C) 1986, 1987, 1989, 2000, 2001, 2003 Free Software Foundation, Inc.
Written by Paul Rubin, June 1986
Adapted to ANSI C, Richard Stallman, Jan 1987
Dusted off, polished, and adapted for use as traditional
return;
end = fp->buf + fp->length;
- *end = '\r';
- p = (U_CHAR *) strchr ((const char *) fp->buf, '\r');
- *end = '\0';
- if (p == end)
+ p = (U_CHAR *) memchr ((const char *) fp->buf, '\r', fp->length);
+ if (p == NULL)
return;
if (p > fp->buf && p[-1] == '\n')