]> Sergey Matveev's repositories - nnn.git/commit
Opinionated xstrlcpy changes (#513)
authorSaagar Jha <saagar@saagarjha.com>
Sun, 12 Apr 2020 00:35:14 +0000 (17:35 -0700)
committerGitHub <noreply@github.com>
Sun, 12 Apr 2020 00:35:14 +0000 (06:05 +0530)
commit3bab34e962f3c1b6167afcefb81aa1f1117f7794
tree6dfebfbae970a566a0e863e227a8a00bf453e216
parent2115d75ac6a14b6381dbff85d9042a09b01d28c2
Opinionated xstrlcpy changes (#513)

* Unvectorize xstrlcpy

On all libcs I could find, memcpy does a better job than we can.

* Rename xstrlcpy to xstrsncpy to avoid confusion

The semantics of our xstrlcpy differed slightly from strlcpy; we return
the number of copied characters; strlcpy returns the strlen(src).
strscpy from Linux is similar except it returns the number of copied
characters sans the NUL byte, so this is named strsncpy to be different.
src/nnn.c