Parent Directory | Revision Log
Links to HEAD: | (view) (download) (annotate) |
Sticky Revision: |
Move strtold wrapper from strtol.c to its own strtold.c. This code was written by theraven@ (David Chisnall) entirely, there's no original Berkeley code left here so just copy his copyright over.
General further adoption of SPDX licensing ID tags. Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point.
Renumber clauses to reduce diffs to other versions NetBSD, OpenBSD, and Android's Bionic number the clauses 1 through 3, so follow suit to make comparison easier.
Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a load of _l suffixed versions of various standard library functions that use the global locale, making them take an explicit locale parameter. Also adds support for per-thread locales. This work was funded by the FreeBSD Foundation. Please test any code you have that uses the C standard locale functions! Reviewed by: das (gdtoa changes) Approved by: dim (mentor)
Per Regents of the University of Calfornia letter, remove advertising clause. # If I've done so improperly on a file, please let me know.
Whitespace/style tweaking of prev. commit. Noted by: bde
POSIX says that 0[xX] prefix is _optional_ even in base 16 case, make it really so. "If the value of base is 16, the characters 0x or 0X may optionally precede the sequence of letters and digits, following the sign if present." Found by: joerg
Style: One space between "restrict" qualifier and "*".
- Add the 'restrict' qualifier to the function prototypes and 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.
Fix the style of the SCM ID's. I believe have made all of libc .c's as consistent as possible.
Return 'c' back to signed due to potential comparison problems Use simpler test for valid ranges Submitted by: bde
Make it works for non ASCII compatible encodings too. The only assumption left is that 'A'..'Z' 'a'..'z' both are contiguous
Back out national digits support, POSIX explicetely disallows it: 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.
Don't ever assume that isdigit() is always subset of isxdigit()
Base 36 is allowed.
Put back base > 35 check. If someone dislike it, plese discuss it with standards group first.
Understand national (non-ASCII) digits now Allow bases >=36 again Misc cleanup
Portability fix: use unsigned cast to guaranteed positive part of expression in case {L}LONG_MAX > abs({L}LONG_MIN). Non-functional change - we don't have any such platforms.
Remove rcsids and unneded include
'acc' is not initialized in one hypotetical case, fix it
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. -----------------------------------------------------
General -Wall warning cleanup, part I. Submitted-By: Kent Vander Velden <[email protected]>
strtol and atoi VERY broken in 8bit chars locale, i.e. if you pass something 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.)
This commit was generated by cvs2svn to compensate for changes in r1573, which included commits to RCS files with non-trunk default branches.
BSD 4.4 Lite Lib Sources
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.
ViewVC Help | |
Powered by ViewVC 1.1.27 |