[multiple changes]

2000-02-07  Zack Weinberg  <zack@wolery.cumb.org>

	* cppfiles.c (deps_output): Count spacers in deps_column.

2000-02-07  Neil Booth  <NeilB@earthling.net>

	* cppinit.c (initialize_dependency_output): If there is no
	suffix, don't try to look for known suffixes.  Use strrchr.
	(cpp_start_read): Remove duplicate initialization.

From-SVN: r31832
This commit is contained in:
Zack Weinberg 2000-02-07 18:34:05 +00:00
parent c2f8b49149
commit 981cb4378a
3 changed files with 15 additions and 7 deletions

View File

@ -1,3 +1,13 @@
2000-02-07 Zack Weinberg <zack@wolery.cumb.org>
* cppfiles.c (deps_output): Count spacers in deps_column.
2000-02-07 Neil Booth <NeilB@earthling.net>
* cppinit.c (initialize_dependency_output): If there is no
suffix, don't try to look for known suffixes. Use strrchr.
(cpp_start_read): Remove duplicate initialization.
Mon Feb 7 18:36:41 MET 2000 Jan Hubicka <jh@suse.cz>
* calls.c (compute_argument_block_size): New argument

View File

@ -1214,7 +1214,7 @@ deps_output (pfile, string, spacer)
pfile->deps_buffer[pfile->deps_size++] = ' ';
bcopy (string, &pfile->deps_buffer[pfile->deps_size], size);
pfile->deps_size += size;
pfile->deps_column += size;
pfile->deps_column += size + 1; /* count spacer too */
if (spacer == ':')
pfile->deps_buffer[pfile->deps_size++] = ':';
pfile->deps_buffer[pfile->deps_size] = 0;

View File

@ -636,10 +636,10 @@ initialize_dependency_output (pfile)
/* Output P, but remove known suffixes. */
q = p + len;
/* Point to the filename suffix. */
r = rindex (p, '.');
/* Compare against the known suffixes. */
for (x = 0; known_suffixes[x]; x++)
{
r = strrchr (p, '.');
if (r)
/* Compare against the known suffixes. */
for (x = 0; known_suffixes[x]; x++)
if (strncmp (known_suffixes[x], r, q - r) == 0)
{
/* Make q point to the bit we're going to overwrite
@ -647,7 +647,6 @@ initialize_dependency_output (pfile)
q = r;
break;
}
}
/* Supply our own suffix. */
strcpy (q, OBJECT_SUFFIX);
@ -804,7 +803,6 @@ cpp_start_read (pfile, fname)
int default_len = sizeof GCC_INCLUDE_DIR - 8;
int specd_len = strlen (specd_prefix);
default_len = sizeof GCC_INCLUDE_DIR - 8;
memcpy (default_prefix, GCC_INCLUDE_DIR, default_len);
default_prefix[default_len] = '\0';