From owner-cvs-all Tue Sep 4 9:39:16 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D7D8D37B408; Tue, 4 Sep 2001 09:39:11 -0700 (PDT) Received: (from ache@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f84GdBm87501; Tue, 4 Sep 2001 09:39:11 -0700 (PDT) (envelope-from ache) Message-Id: <200109041639.f84GdBm87501@freefall.freebsd.org> From: "Andrey A. Chernov" Date: Tue, 4 Sep 2001 09:39:11 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libc/stdlib strtol.3 strtol.c strtoll.c strtoq.c strtoul.3 strtoul.c strtoull.c strtouq.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 ache 2001/09/04 09:39:11 PDT Modified files: lib/libc/stdlib strtol.3 strtol.c strtoll.c strtoq.c strtoul.3 strtoul.c strtoull.c strtouq.c Log: Locale *is* used in strto*l*(), at least for isspace(), so remove 'locale not used' statement from comments and BUGS section of manpage. strtol(): fix non-portable 'cutoff' calculation using the same method as in strtoll(). Cleanup 'cutoff' calculation, remove unneded casts. Misc. cleanup to make all functions looks the same. Implement EINVAL reaction per POSIX, document it in manpage, corresponding POSIX example quotes here: ------------------------------------------------ If the subject sequence is empty or does not have the expected form, no conversion is performed; the value of str is stored in the object pointed to by endptr, provided that endptr is not a null pointer. If no conversion could be performed, 0 shall be returned and errno may be set to [EINVAL]. [EINVAL] The value of base is not supported. Since 0, {LONG_MIN} or {LLONG_MIN}, and {LONG_MAX} or {LLONG_MAX} are returned on error and are also valid returns on success, an application wishing to check for error situations should set errno to 0, then call strtol( ) or strtoll ( ), then check errno. ----------------------------------------------------- Revision Changes Path 1.12 +11 -8 src/lib/libc/stdlib/strtol.3 1.4 +27 -11 src/lib/libc/stdlib/strtol.c 1.6 +15 -10 src/lib/libc/stdlib/strtoll.c 1.7 +2 -2 src/lib/libc/stdlib/strtoq.c 1.12 +13 -12 src/lib/libc/stdlib/strtoul.3 1.4 +25 -9 src/lib/libc/stdlib/strtoul.c 1.6 +16 -10 src/lib/libc/stdlib/strtoull.c 1.7 +2 -2 src/lib/libc/stdlib/strtouq.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message