Small clarifications of strncasecmp docs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I'm looking at the latest man-pages git revision 5d92f6.

The manpage for strncasecmp has a few wording issues that can be improved:

1)
In the DESCRIPTION section, "except it compares only the first n bytes of s1"

s1 can be shorter than n bytes. Consider adding "(at most)" after "first".

For comparison with reference materials, POSIX uses the wording "not
more than n bytes", OSX and FreeBSD use "compares at most [...]".

2)
In the RETURN VALUE section: "if s1 (or the first n bytes thereof) is
found [...] to match [...] s2"

This could theoretically be read to suggest that the first n bytes of
s1 are compared against the FULL s2, which is not the case.
Consider removing the parenthetical altogether (thus, not mentioning
'n' at all). POSIX doesn't mention 'n' in its RETURN VALUE section.

3)
The RETURN VALUE section doesn't mention case insensitivity. It's in
the DESCRIPTION, but perhaps it should also be in this section. POSIX
mentions case-insensitivity in RETURN VALUE.

Consider adding "and ignoring case" after "respectively".

-Ori
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux