summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/strtol.c
Commit message (Collapse)AuthorAgeFilesLines
* Style: One space between "restrict" qualifier and "*".Tim J. Robbins2002-09-061-1/+1
| | | | Notes: svn path=/head/; revision=103012
* - Add the 'restrict' qualifier to the function prototypes andRobert Drehmel2002-08-151-4/+1
| | | | | | | | | | | definitions of the functions that convert strings to numbers and are defined by IEEE Std 1003-1.2001. - Use ANSI-C function definitions for all of the functions mentioned above plus strtouq and strtoq. - Update the prototypes in the manual pages. Notes: svn path=/head/; revision=101912
* Fix the style of the SCM ID's.David E. O'Brien2002-03-221-2/+2
| | | | | | | I believe have made all of libc .c's as consistent as possible. Notes: svn path=/head/; revision=92986
* Return 'c' back to signed due to potential comparison problemsAndrey A. Chernov2001-12-071-10/+12
| | | | | | | | | Use simpler test for valid ranges Submitted by: bde Notes: svn path=/head/; revision=87494
* Make it works for non ASCII compatible encodings too.Andrey A. Chernov2001-12-021-7/+7
| | | | | | | The only assumption left is that 'A'..'Z' 'a'..'z' both are contiguous Notes: svn path=/head/; revision=87196
* Back out national digits support, POSIX explicetely disallows it:Andrey A. Chernov2001-11-291-1/+1
| | | | | | | | | | | | | | The definition of character class digit requires that only ten characters -the ones defining digits- can be specified; alternate digits (for example, Hindi or Kanji) cannot be specified here. However, the encoding may vary if an implementation supports more than one encoding. The definition of character class xdigit requires that the characters included in character class digit are included here also and allows for different symbols for the hexadecimal digits 10 through 15. Notes: svn path=/head/; revision=87078
* Don't ever assume that isdigit() is always subset of isxdigit()Andrey A. Chernov2001-11-281-1/+1
| | | | Notes: svn path=/head/; revision=87042
* Base 36 is allowed.Bill Fenner2001-11-281-1/+1
| | | | Notes: svn path=/head/; revision=87023
* Put back base > 35 check. If someone dislike it, plese discuss it withAndrey A. Chernov2001-11-281-1/+1
| | | | | | | standards group first. Notes: svn path=/head/; revision=87020
* Understand national (non-ASCII) digits nowAndrey A. Chernov2001-11-281-13/+11
| | | | | | | | Allow bases >=36 again Misc cleanup Notes: svn path=/head/; revision=87016
* Portability fix: use unsigned cast to guaranteed positive part of expressionAndrey A. Chernov2001-09-041-1/+1
| | | | | | | | in case {L}LONG_MAX > abs({L}LONG_MIN). Non-functional change - we don't have any such platforms. Notes: svn path=/head/; revision=83024
* Remove rcsids and unneded includeAndrey A. Chernov2001-09-041-5/+2
| | | | Notes: svn path=/head/; revision=82995
* 'acc' is not initialized in one hypotetical case, fix itAndrey A. Chernov2001-09-041-2/+2
| | | | Notes: svn path=/head/; revision=82982
* Locale *is* used in strto*l*(), at least for isspace(), so removeAndrey A. Chernov2001-09-041-11/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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. ----------------------------------------------------- Notes: svn path=/head/; revision=82975
* General -Wall warning cleanup, part I.Jordan K. Hubbard1996-07-121-1/+1
| | | | | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu> Notes: svn path=/head/; revision=17141
* strtol and atoi VERY broken in 8bit chars locale, i.e. if you pass somethingAndrey A. Chernov1995-08-011-1/+3
| | | | | | | | | like 38400<any 8bit char, isalpha> it not detect this stuff and produce very big number instead. Fixed by operating with unsigned char and checking for isascii. (secure/telnetd hits by it f.e.) Notes: svn path=/head/; revision=9843
* BSD 4.4 Lite Lib SourcesRodney W. Grimes1994-05-271-0/+129
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573