Date: Fri, 30 Aug 2002 12:42:08 -0700 (PDT) From: Robert Drehmel <robert@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libc/string index.3 index.c rindex.3 rindex.c Message-ID: <200208301942.g7UJg8RH015375@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
robert 2002/08/30 12:42:07 PDT
Modified files:
lib/libc/string index.3 index.c rindex.3 rindex.c
Log:
- Update the manual pages of index() and rindex() to show
<strings.h> as the associated header file.
The prototypes have been moved there from <string.h> because
POSIX.1-2001 said so.
- Conditionally include either <strings.h> or <string.h> based
on whether the [r]index() or str[r]chr() functions are
compiled, respectively.
- Style(9) tells us to
- put a space after the return keyword
- to check for a NUL character without using the ! operator.
- use NULL instead of (type *)NULL where the compiler knows
the type.
Apply these rules.
- Rather use ANSI-C function definitions than K&R ones.
- For index(3), correct second function argument's type; it was
declared to be a `const char' before and is now an `int'.
Revision Changes Path
1.7 +9 -2 src/lib/libc/string/index.3
1.5 +12 -8 src/lib/libc/string/index.c
1.7 +9 -2 src/lib/libc/string/rindex.3
1.5 +10 -7 src/lib/libc/string/rindex.c
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208301942.g7UJg8RH015375>
