+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
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;
/* 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
q = r;
break;
}
- }
/* Supply our own suffix. */
strcpy (q, OBJECT_SUFFIX);
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';