News for hackers. Stuff that matters.
Re:Strcpycat by grout on Saturday January 21, 2012 @12:25AM (#3492693)
The best system involves keeping end pointers, not lengths. Remaining length changes. End pointer never changes. At previous job we converted our whole code base to this system, and it worked great.
Re:Strcpycat by byuu on Saturday January 21, 2012 @04:53AM (#3493185)
I figured the actual length value may be useful without needing pointer arithmetic, but this is a nice solution to the argument taking the size, and the return being the length (size-1, eg p[return]=NUL location.)

I'll consider this idea and write some comparisons to see how it works, thanks.