2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 13:22:11 +00:00

Merge:Strip newline from lines passed to headerscan pattern

[SVN r36629]
This commit is contained in:
Vladimir Prus
2007-01-06 19:52:04 +00:00
parent f6989de619
commit 7bd15f7330

View File

@@ -148,6 +148,15 @@ headers1(
while( fgets( buf, sizeof( buf ), f ) )
{
int size = strlen (buf);
/* Remove trailing \r and \n, if any. */
while (size > 0
&& (buf[size-1] == '\n' && buf[size-1] == '\r'))
{
buf[size-1] = '\0';
--size;
}
for( i = 0; i < rec; i++ )
if( regexec( re[i], buf ) && re[i]->startp[1] )
{