summaryrefslogtreecommitdiff
path: root/lib/libc/stdtime/strftime.c
Commit message (Collapse)AuthorAgeFilesLines
* Style: One space between "restrict" qualifier and "*".Tim J. Robbins2002-09-061-4/+4
| | | | Notes: svn path=/head/; revision=103012
* - Add the 'restrict' qualifier to the function definition ofRobert Drehmel2002-08-141-6/+4
| | | | | | | | | | | | strftime(3) for IEEE Std 1003.1-2001 compliance and remove excessive usage of the 'const' qualifier that was neither present in the prototype in the publice header, nor in the local prototype just above the function definition. - Replace the K&R function definition with a ANSI-C one. - Update the prototype of strftime(3) in its manual page. Notes: svn path=/head/; revision=101888
* Remove use of __P() (actually P()) from code now that it's no longerAlfred Perlstein2002-05-281-4/+4
| | | | | | | available. Notes: svn path=/head/; revision=97423
* Fix the style of the SCM ID's.David E. O'Brien2002-03-221-9/+4
| | | | | | | I believe have made all of libc .c's as consistent as possible. Notes: svn path=/head/; revision=92986
* Get rid of non-standard %E[Ff] formats, userland apps already fixedAndrey A. Chernov2001-03-211-13/+1
| | | | Notes: svn path=/head/; revision=74578
* Relax local FreeBSD restrictions on 3 chars abbrev. name length and %c formatAndrey A. Chernov2001-03-181-4/+8
| | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=74412
* Implement ampm_fmt (%r) per POSIXAndrey A. Chernov2001-03-021-1/+1
| | | | Notes: svn path=/head/; revision=73359
* Back out snprintf -> sprintf change until I have time to look at it.Kris Kennaway2001-02-181-1/+1
| | | | Notes: svn path=/head/; revision=72619
* Hardcode c_fmt in a different way since used in nl_langinfo nowAndrey A. Chernov2001-02-081-2/+2
| | | | Notes: svn path=/head/; revision=72183
* Catch up to latest chanage in timelocal structures exporting.Alexey Zelkin2001-02-081-12/+13
| | | | Notes: svn path=/head/; revision=72168
* Remove _THREAD_SAFE and make libc thread-safe by default byDaniel Eischen2001-01-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=71579
* sprintf -> snprintfKris Kennaway2000-11-261-1/+1
| | | | Notes: svn path=/head/; revision=69196
* Force %c to be "%a %Ef %T %Y" to eliminate problems with bad c_fmtAndrey A. Chernov2000-10-261-1/+2
| | | | | | | Submitted by: ru Notes: svn path=/head/; revision=67623
* There were so far only 42 different conversion specifications inJoerg Wunsch2000-01-281-0/+16
| | | | | | | | | | | | strftime(3), add another one. :) %z yields the local timezone's offset in hours and minutes, as used in RFC822 headers. There's a precedence for this in Lunux' libc, and Internet software (like Perl scripts) start using it. OKed by (wrt. the code freeze): jkh Notes: svn path=/head/; revision=56756
* %Ex -> %Ef to not conflict with POSIXAndrey A. Chernov1999-11-301-2/+19
| | | | | | | | | Add %EF (long months name / day order) Check that O and E not intermixed Add missing POSIX extension to example Notes: svn path=/head/; revision=53960
* Add %Ex extension to determine "%e %b" or "%b %e" orderAndrey A. Chernov1999-11-301-5/+9
| | | | | | | Separate alternative for O and E cases Notes: svn path=/head/; revision=53940
* Implement new format specifier for strftime: %OB, alternative nationalDmitrij Tejblum1999-09-111-2/+6
| | | | | | | | | | | | representation of the full month name. In the Russian locale, this alternative will be "nominative case", useful when the date designate month as a whole. E.g. month heading in a calendar. I hope it can be useful for some other locales too. Discussed with: wollman, ache Notes: svn path=/head/; revision=51186
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* Fixed printf format errors. Don't assume so many things about time_t.Bruce Evans1998-06-301-20/+16
| | | | | | | | | Obtained from: partial merge of ADO version tzcode96h (was fully merged in 1.10 but backed out in 1.11; the FreeBSD code for %s was earlier, prettier but buggier). Notes: svn path=/head/; revision=37299
* Merged in better support of ISO 8601 from elsie.nci.nih.gov.Wolfgang Helbig1997-10-031-54/+76
| | | | | | | | Added the conversion specifiers %g and %G, that are replaced by the year which contains the greater part of the week in question. Notes: svn path=/head/; revision=30089
* Import strptime(3) into libc. We've got permission by Kevin Ruddy toJoerg Wunsch1997-08-091-177/+2
| | | | | | | | | | | 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]. Notes: svn path=/head/; revision=28021
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22993
* Include "setlocale.h" for _PathLocale like other parts already didAndrey A. Chernov1997-02-071-3/+2
| | | | | | | Should go in 2.2 Notes: svn path=/head/; revision=22402
* Update the comment why range checking is not neededAndrey A. Chernov1997-02-051-1/+1
| | | | | | | Should go in 2.2 Notes: svn path=/head/; revision=22305
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Add comment that range checking is already done at upper levelAndrey A. Chernov1996-12-281-1/+2
| | | | | | | | | Kill snprintf left in collate.c from previous backout Should go in 2.2 Notes: svn path=/head/; revision=20961
* Move PATH_LOCALE handling to setlocale.c, simplify locale path building,Andrey A. Chernov1996-11-261-10/+9
| | | | | | | don't treat empty encoding as C encoding Notes: svn path=/head/; revision=19965
* Revert to old version of strftime.c; the new one doesn't work right.Garrett Wollman1996-07-191-110/+78
| | | | Notes: svn path=/head/; revision=17224
* Merge the recently-imported tzcode96h distribution (libc portion). TheGarrett Wollman1996-07-181-79/+111
| | | | | | | | | part that does zic(8)/zdump(8) is still yet to be imported (but the old zic and zdump will work just fine with these header files and the data format has not changed). Notes: svn path=/head/; revision=17209
* General -Wall warning cleanup, part I.Jordan K. Hubbard1996-07-121-2/+1
| | | | | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu> Notes: svn path=/head/; revision=17141
* Removed false copyrights...Marc G. Fournier1996-05-271-3/+1
| | | | Notes: svn path=/head/; revision=15927
* Added in appropriate Berkeley copyright and RCS Id: stringMarc G. Fournier1996-05-271-1/+3
| | | | | | | Closes PR#doc/536 Notes: svn path=/head/; revision=15923
* Don't reset LC_TIME to C when it isn't neccessaryAndrey A. Chernov1995-10-231-13/+17
| | | | Notes: svn path=/head/; revision=11735
* Restore %s format support from previous versionAndrey A. Chernov1995-08-071-1/+22
| | | | Notes: svn path=/head/; revision=9988
* Fix default %c to be ctime-compatible as supposed (by Solaris too)Andrey A. Chernov1995-08-061-4/+4
| | | | Notes: svn path=/head/; revision=9964
* Implement locale-sensitive strftime () from ADO (heavily modifiedGarrett Wollman1995-08-041-104/+240
| | | | | | | | | | | | | by me). This probably loses for multibyte characters, but I have no way of telling. I'll let ache decide whether to add this support to startup_setlocale. Note that for this to make any sense at all, the symlinks in /usr/share/locale must go. (For the moment, this doesn't make any difference since there are no locales supplied.) Obtained from: Arthur David Olson <ado@elsie.nci.nih.gov> Notes: svn path=/head/; revision=9912
* On snap 950210, format %s (print seconds from the epoch) is missingJoerg Wunsch1995-03-011-0/+22
| | | | | | | | | | | | from the code in strftime.c . This affects both the library code and all the commands using it (e.g. date +%s). Note that %s is not required by ANSI, but we've already got it in 1.1.5.1. Suggested by: luigi@labinfo.iet.unipi.it (Luigi Rizzo) Notes: svn path=/head/; revision=6815
* The rest of tzcode94g from Arthur David Olson.Garrett Wollman1994-09-131-0/+393
Obtained From: Arthur David Olson, ftp://elsie.nci.nih.gov/pub/tzcode94g.tar.gz Notes: svn path=/vendor/tzcode/dist/; revision=2708