summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdtime/strptime.c
Commit message (Collapse)AuthorAgeFilesLines
* Detect range errors when using the %s specifier. Previously, LONG_MAXnectar2003-11-171-3/+10
| | | | | | | was rejected as a range error, while any values less than LONG_MIN were silently substituted with LONG_MIN. Furthermore, on some platforms `time_t' has less range than `long' (e.g. alpha), which may give incorrect results when parsing some strings.
* Backout my changes in rev. 1.32 and 1.33. There is some code that dependsmtm2003-04-301-4/+2
| | | | | | | on the previous behaviour. This also brings strptime(3) behaviour back in line with the other BSDs. Approved by: markm (mentor)
* Zero out the struct tm supplied by the caller. Otherwise,mtm2003-04-051-0/+1
| | | | | | | | strange things might happen when garbage values in the struct get passed in to localtime_r() and family. Noticed by: marcus Approved by: markm (mentor)(implicit)
* Fill in the rest of the fields in the resulting struct tmmtm2003-03-291-2/+3
| | | | | | | | | | from strptime(3). Previously, they would get filled only for the %s specifier and as a side effect of using the the %Z specifier with a GMT time zone. PR: misc/48993 Approved by: markm (mentor) Silence on: -standards
* Ditch a static global and the mutex that protected it. Achieve themtm2003-03-121-27/+18
| | | | | | | | desired strptime(3) reentrancy by adding an extra argument to _strptime() instead. Approved by: markm (mentor) MFC: 4 weeks
* Eliminate 61 warnings emitted at WARNS=2 (leaving 53 to go).nectar2003-02-161-3/+3
| | | | | | | Only warnings that could be fixed without changing the generated object code and without restructuring the source code have been handled. Reviewed by: /sbin/md5
* Style: One space between "restrict" qualifier and "*".tjr2002-09-061-2/+2
|
* - Add the C99 'restrict' qualifier using the '__restrict' macro torobert2002-08-141-1/+2
| | | | | function prototype and definition of strptime(3). - Update the manual page.
* Fix the style of the SCM ID's.obrien2002-03-221-5/+2
| | | | I believe have made all of libc .c's as consistent as possible.
* Recognize the %s format.dd2001-07-131-0/+16
| | | | | | Submitted by: Thomas Zenker <thz@lennartz-electronic.de> and Maxim Konovalov <maxim@macomnet.ru>, respectively Reviewed by: -audit
* Get rid of non-standard %E[Ff] formats, userland apps already fixedache2001-03-211-16/+1
|
* Relax local FreeBSD restrictions on 3 chars abbrev. name length and %c formatache2001-03-181-2/+13
| | | | | | | | | | | | since they not allows POSIXly legal locale data. Currently, if relaxed form POSIXly legal locale data will be used right now, some programs will be broken, but it means that either locale data or programs must be fixed, not the library. Introduce non-standard md_order (month/day order) locale field to be used later via nl_langinfo(). Currently %EF and %Ef emulated using this field, but they planned for remove in future in favour of nl_langinfo() test field. Implement %F per POSIX
* Make 'A' and 'a', 'B' and 'b' the same, per POSIXache2001-03-181-26/+16
|
* Implement ampm_fmt (%r) per POSIXache2001-03-021-1/+1
|
* Hardcode c_fmt in a different way since used in nl_langinfo nowache2001-02-081-2/+2
|
* Catch up to latest chanage in timelocal structures exporting.phantom2001-02-081-22/+23
|
* Remove _THREAD_SAFE and make libc thread-safe by default bydeischen2001-01-241-14/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adding (weak definitions to) stubs for some of the pthread functions. If the threads library is linked in, the real pthread functions will pulled in. Use the following convention for system calls wrapped by the threads library: __sys_foo - actual system call _foo - weak definition to __sys_foo foo - weak definition to __sys_foo Change all libc uses of system calls wrapped by the threads library from foo to _foo. In order to define the prototypes for _foo(), we introduce namespace.h and un-namespace.h (suggested by bde). All files that need to reference these system calls, should include namespace.h before any standard includes, then include un-namespace.h after the standard includes and before any local includes. <db.h> is an exception and shouldn't be included in between namespace.h and un-namespace.h namespace.h will define foo to _foo, and un-namespace.h will undefine foo. Try to eliminate some of the recursive calls to MT-safe functions in libc/stdio in preparation for adding a mutex to FILE. We have recursive mutexes, but would like to avoid using them if possible. Remove uneeded includes of <errno.h> from a few files. Add $FreeBSD$ to a few files in order to pass commitprep. Approved by: -arch
* Force "%c" to be ctime-compatibleache2000-10-261-1/+2
| | | | Submitted by: ru
* Prevent digit-gobbling for all but %l and %e, which can't be fixed.sheldonh1999-12-081-12/+46
| | | | | | | | Discuss in the BUGS section of the manpage, problems involved with the use of %C, %e, %l, %p, %U and %W. PR: 13901 Reported by: scott@chronis.pobox.com
* Accept 12 for %l, because it's logical to expect "%l:%M" to work forsheldonh1999-12-081-1/+1
| | | | "12:00" and because strftime(3) does the same.
* %Ex -> %Ef to not conflict with POSIXache1999-11-301-1/+14
| | | | | | Add %EF (long months name / day order) Check that O and E not intermixed Add missing POSIX extension to example
* Stricter checking %A vs %aache1999-11-301-11/+13
|
* Fix %C handlingache1999-11-301-14/+52
| | | | | | Use locale for %c Add %+ Add %Ex and %OB
* Decremement by 1 the value taken for %j before assigning it to tm_yday,sheldonh1999-11-101-6/+50
| | | | | | | | | | | | | | | | | which is zero-based. Correct the range checking for the value taken for %S. Add %w for the day of the week (0-6). Accept (but do nothing with) %U and %W. The comment for this change was taken from NetBSD. These changes were made after several failed attempts to contact the author of our strptime.c . PR: 10131 Submitted by: tadf@kt.rim.or.jp (Tadayoshi Funaba)
* Add unsigned char cast to isupperache1999-11-041-1/+1
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Make the new %Z addition thread-safe.obrien1999-07-061-19/+49
|
* Actually impliment the documented %Z specifier.obrien1999-07-041-1/+32
|
* Re-fixed to start at 1969 per the actual Posix requirement. Alsowes1999-04-251-2/+2
| | | | fixed a typo on the man page.
* Bring two-digit years up-to-date with POSIX requirements.wes1999-04-251-1/+3
| | | | | | | | 70-00 are intepreted in the 20th century; 01-69 in the 21st century. (Yes, 2000 is the last year of the 20th century, not the first year of the 21st.) Submitted by: Sergey Babkin <babkin@bellatlantic.net>
* Change return type of strptime from const char* to char*.dt1998-09-121-3/+3
| | | | const char* was wrong and nonstandard.
* Add unsigned char cast to all ctype callsache1997-08-131-27/+27
|
* Import strptime(3) into libc. We've got permission by Kevin Ruddy tojoerg1997-08-091-315/+306
| | | | | | | | modify the original `no modifications' copyright message, and i've included his mail into the source file. The common localization functions between strptime(3) and strftime(3) have been broken out into timelocal.[ch].
* Clean import of strptime(3) onto a vendor branch.joerg1997-08-091-0/+358
Submitted by: Powerdog Industries <kevin.ruddy@powerdog.com>
OpenPOWER on IntegriCloud