Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 04 Feb 2013 20:25:53 -0800
From: Nathan McSween <nwmcsween@...il.com>
To: musl@...ts.openwall.com
Subject: Re: [PATCH 0/4] Refactor and expand string functions.

On 2/3/2013 4:12 PM, Nathan McSween wrote:
> memchr - refactor
> memcmp - word-at-a-time
> memset - refactor
> strcmp - word-at-a-time
> strlcpy - refactor and always terminate string
> strlen - refactor
> strncmp - word-at-a-time
>
> A simple wc -l on asm lines for changed files gives:
> 91 new_memchr.s
> 106 musl_memchr.s
> 65 new_memcmp.s
> 32 musl_memcmp.s
> 118 new_memset.s
> 121 musl_memset.s
> 64 new_strcmp.s
> 26 musl_strcmp.s
> 98 new_strlcpy.s
> 124 musl_strlcpy.s
> 55 new_strlen.s
> 55 musl_strlen.s
> 66 new_strncmp.s
> 45 musl_strncmp.s
>
> Bikeshed over inline documentation welcome.
>
> Nathan McSween (4):
>    Internal: Add word.h - word-at-a-time fns / macros
>    String: refactor to utilize word.h and optimize
>    String: expand to word-at-a-time
>    String: refactor to utilize word.h and always terminate string
>
>   src/internal/word.h  | 39 ++++++++++++++++++++++++++++++++++++
>   src/string/memchr.c  | 42 ++++++++++++++++++++++-----------------
>   src/string/memcmp.c  | 38 +++++++++++++++++++++++++++++++----
>   src/string/memset.c  | 39 +++++++++++++++++++++---------------
>   src/string/strcmp.c  | 35 +++++++++++++++++++++++++++++---
>   src/string/strlcpy.c | 56 ++++++++++++++++++++++++++++++----------------------
>   src/string/strlen.c  | 29 +++++++++++++++------------
>   src/string/strncmp.c | 36 ++++++++++++++++++++++++++++-----
>   8 files changed, 231 insertions(+), 83 deletions(-)
>   create mode 100644 src/internal/word.h
>
Attached are files of the functions changed.

View attachment "memchr.c" of type "text/plain" (630 bytes)

View attachment "memcmp.c" of type "text/plain" (837 bytes)

View attachment "memset.c" of type "text/plain" (608 bytes)

View attachment "strcmp.c" of type "text/plain" (801 bytes)

View attachment "strlcpy.c" of type "text/plain" (795 bytes)

View attachment "strlen.c" of type "text/plain" (393 bytes)

View attachment "strncmp.c" of type "text/plain" (800 bytes)

View attachment "word.h" of type "text/plain" (826 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.