>> Why not a varargs: strMANYcat(): >> >> strMANYcat(s, "foo", "/", "bar", NULL); >> >> (In most cases, the function call overhead dominates the "finding the >> end of string" because pushing stack frames modifies memory and >> finding the end of a string likely to be in the L1 cache is *really* >> cheap) > >Yes, but this is NOT what I was thinking about. If you need to save the >pointer to the beginning of the last path element the proposal above >buys nothing. And the varargs overhead is also something which may cause >trouble. It looks shorter from the source code point of view - but I it >will not save much code...
But generally isn't it the case that the reason you want the pointer to the tail end is because you want to append even more? The original str*() return values are strange and useless. I already know what the first argument is, so why return it? Casper _______________________________________________ opensolaris-discuss mailing list opensolaris-discuss@opensolaris.org