On Mon, 17 Jan 2005, Sam Ravnborg wrote:
>
> On Mon, Jan 17, 2005 at 11:45:25AM -0800, Linus Torvalds wrote:
>
> > Why not just have the "system directories start here" pointer, and reverse
> > the meaning of it (right now sparse puts them _first_ in the list, not
> > last)? Then:
> >
> > - always put the "" paths first (put the "current .c directory" and "."
> > very first), make "angle_includepaths" point past them (replace
> > "gcc_includepath" with renamed "angle_includepath".
>
> I messed something up here. "." is actually "current .c directory".
Ok. If there's always just one, then why not just keep it always there at
the beginning of the array, and then you have "quote_includepath" that is
initialized to point there, but "-I-" will do
quote_includepath = include_paths + 1;
(which is idempotent, so you can have as many -I-'s as you want, without
even worrying about it).
And then lookup makes tons of sense with the beginning just always being
one of "angle_includepath", "quote_includepath" or "stream->next_path".
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html