[EMAIL PROTECTED] wrote:
[snip]
> >... the idea would be to introduce the same functionality to Solaris's
> >libc+kernel to make such cases much faster (and carry the idea to the
> >standard bodies (ISO-C and whoever maintains the widechar interfaces)
> >for inclusion).
> >
> >Proposed functions would be (with "FOO" replaced with a better name):
> >|strFOOcat()| - like |strcat()| but returns the pointer to '\0'
> >|wcsFOOcat()| - like |wcscat()| but returns the pointer to '\0'
> >|wsFOOcat()| - like |wscat()| but returns the pointer to '\0'
> >
> >Comments/suggestions/ideas welcome...
> 
> 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...

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [EMAIL PROTECTED]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)
_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to