From owner-cvs-all Fri Aug 30 12:42:13 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A86F737B401; Fri, 30 Aug 2002 12:42:08 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 677E143E4A; Fri, 30 Aug 2002 12:42:08 -0700 (PDT) (envelope-from robert@FreeBSD.org) Received: from freefall.freebsd.org (robert@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7UJg8JU015376; Fri, 30 Aug 2002 12:42:08 -0700 (PDT) (envelope-from robert@freefall.freebsd.org) Received: (from robert@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7UJg8RH015375; Fri, 30 Aug 2002 12:42:08 -0700 (PDT) Message-Id: <200208301942.g7UJg8RH015375@freefall.freebsd.org> From: Robert Drehmel Date: Fri, 30 Aug 2002 12:42:08 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libc/string index.3 index.c rindex.3 rindex.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 as the associated header file. The prototypes have been moved there from because POSIX.1-2001 said so. - Conditionally include either or 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