On 9/6/2010 9:56 AM, Ozkan Sezer wrote: >>> On Mon, Sep 6, 2010 at 6:35 PM, John E. / TDM<[email protected]> wrote: >>>> Here is a correct (albeit slightly less performant than assembly) strnlen >>>> implementation: >>>> >>>> size_t strnlen(const char* s, size_t maxlen) >>>> { >>>> const char* s2 = s; >>>> while (s2 - s< maxlen&& *s2) >>>> ++s2; >>>> return s2 - s; >>>> } > tr...@3514, v1.0 bra...@3515. TDM: please check with the svn to verify.
Looks fine. :) -John E. / TDM ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
