Commit Graph

150 Commits

Author SHA1 Message Date
itohy 7daefc5a5a Passing "char" values to ctype(3) functions is problematic.
If an argument of a ctype function is outside "unsigned char"
and if it is not EOF, the behavior is undefined.

The isascii(3) is the sole exception of above and it was used to
be used to check a value was valid for other ctype functions in
ancient systems.  On modern systems, the ctype functions take
all values of "unsigned char", and this check is obsolete and
even wrong for non-ASCII systems.  However, we leave the isascii()
untouched for now, so as not to change the current behavior.
2000-07-07 08:03:36 +00:00
kleink b5b9011dbf Note that localtime_r() does not imply tzset(); inspired by a conversation
with Hal Murray in the trail of PR lib/10282.
2000-07-06 16:19:15 +00:00
hubertf 7570e9053d Improve description for tm_year and some other fields.
May prevent PRs like 10521 in the future.
2000-07-06 12:44:31 +00:00
kleink 0c86310df7 Pasto in previous. 2000-06-05 12:01:47 +00:00
kleink b72e2b11b8 Move orphaned information to tzset(3). 2000-06-05 11:56:13 +00:00
mycroft 605490369c Delint.
Remove trailing ; from uses of __weak_alias().  The macro inserts this if
needed.
2000-01-22 22:19:07 +00:00
kleink cc34c654dc Add the C99 %F conversion. 2000-01-15 16:59:05 +00:00
kleink e092d92063 Merge tzcode1999i. 1999-11-16 22:41:02 +00:00
kleink ae7e338dbb Merge tzcode1999h. 1999-11-10 20:32:30 +00:00
erh 20678a0621 PR 5057 - fix %k to print a 0, not just spaces. (%e too). Patch from NAKAJIMA Yoshihiro. 1999-11-05 19:21:12 +00:00
kleink 76c34aa87f Add documentation for asctime_r(), ctime_r(), gmtime_r() and localtime_r(). 1999-05-04 15:34:50 +00:00
tv d6b5fedecb Use correct number of digits as described in lib/7001. This brings us
pretty close to UNIX98, but %U and %W still don't work.
1999-04-29 02:58:30 +00:00
kleink 317455d895 Merge tzcode1999b. 1999-02-08 18:00:19 +00:00
augustss 32482e1058 Compute week number right. Fixes PR 6961, from
Wolfgang Helbig <helbig@Informatik.BA-Stuttgart.DE>
1999-02-07 17:33:30 +00:00
sommerfe 322be18c08 Fix pr6517: strftime %s returns unterminated string 1998-12-01 16:07:11 +00:00
christos f4c1479174 delint 1998-11-15 17:10:30 +00:00
kleink d898f65fdd Need an internal name for tzname. 1998-10-16 12:56:44 +00:00
kleink b0d97e66b2 Oops, also needs "namespace.h". 1998-10-08 12:18:18 +00:00
kleink eaf4c8b985 Converts an extracted tzcode distribution into the format suitable for
importing it into the NetBSD source tree.
1998-10-05 19:44:53 +00:00
kleink be296d891c Merge tzcode1998h. 1998-10-04 19:27:55 +00:00
kleink 4761eb87c0 Frob internal state keeping to make strftime() reentrant. 1998-09-27 16:41:20 +00:00
kleink 38876f6260 Protect local time state and GMT data initialization with a readers/writer lock
and a mutex, respectively.
1998-09-13 16:26:14 +00:00
kleink 1fd2228f99 Restore `elsieid' accidently clobbered during merge. 1998-09-11 11:35:21 +00:00
kleink 645061225a Replace `unix' in two feature tests (slid through my test machine's compiler
update window).
1998-09-11 10:55:55 +00:00
kleink 91e1adbe6e Merge tzcode1998f. 1998-09-10 15:58:38 +00:00
kleink 0e8ab3112e Fix the approximation of log10(2.0) used in INT_STRLEN_MAXIMUM; this resulted
in a fair amount of space wasted in the static result buffer used in
asctime().  Noticed by Randy Thelen <rthelen@netapp.com> on tz@elsie.
1998-09-09 11:32:13 +00:00
kleink 16afbbecd6 Cosmetical changes, and squash some lint. 1998-09-07 14:11:37 +00:00
veego 13e0e871f8 Fix new egcs warnings (might be used uninitialized). 1998-08-20 13:36:25 +00:00
mycroft 4794fc63fe Slight adjustment needed for previous. 1998-07-28 20:28:04 +00:00
mycroft 7d3593c1e4 Add -DALL_STATE, to allocate localtime() data structures dynamically. 1998-07-28 20:26:01 +00:00
mycroft 131e747015 Make these compile without __AUDIT__. 1998-07-27 09:47:44 +00:00
mycroft 3d7514132e const poisoning. 1998-07-26 16:01:12 +00:00
mycroft f4a2a13036 const poisoning. 1998-07-26 13:00:41 +00:00
tv 74e388d273 Fubar: XPG4 (SUS'98) _does_ specify two digit year behavior without %C.
Change text back to "conforms to."
1998-05-05 14:24:00 +00:00
tv db7189d433 As inspired by PR #5268 from jpo@easterngraphics.com:
- make string comparisons case-insensitive
- add description of whitespace in the format string
- note that %t and %n match no whitespace as well as some whitespace
- change wording of standard to say "includes all requirements of"
  instead of "conforms to" XPG4 as our %y is extended beyond XPG4
1998-05-05 14:15:32 +00:00
tv c7e3d05330 Correct doc for tm.tm_sec to document range 0..61, not 0..60 (strptime(3)
legally assigns 61 here if specified by the user)
1998-03-19 16:26:35 +00:00
tv 3c5e426d70 Fixes from PRs 5056 and 5161, partly rethought:
- %C and %y can be used in conjunction properly, though %y can have its
  old behaviour if used without %C
- %I formats hous 0..11 with 0 representing "12"; this is correct both
  with and without am/pm (%p rule fixed to compensate)
- %j fixed for range [0..365] in struct tm
- %m fixed for range [0..11] in struct tm
- %S fixed for range [0..61] in struct tm
1998-03-19 16:21:35 +00:00
kleink 59ea4930e2 Change interval specification style from (a-b) to [a,b] where appropriate. 1998-02-11 18:52:24 +00:00
perry 312aca536f add LIBRARY section to man page 1998-02-05 18:45:17 +00:00
jtc c9f8519040 sync with tzcode1998b 1998-01-22 07:17:18 +00:00
jtc 1c631d03ad sync with tzcode1998a 1998-01-22 07:06:56 +00:00
mycroft b7728ce9c9 Pull in tzfile.h. 1998-01-20 21:39:40 +00:00
mycroft a5f873989a Update dates. 1998-01-20 21:10:08 +00:00
mycroft bfec060b83 Update documentation of %y to reflect y2k change. 1998-01-20 20:48:56 +00:00
mycroft 7f0df00dd7 The rollover for the previous is 1969, not 1970. 1998-01-20 20:47:46 +00:00
mycroft 13156da2e5 Fix an old comment 1998-01-20 20:41:49 +00:00
mycroft fc6492b391 Treat 2-digit year < 70 as year - 2000, per XPG. 1998-01-20 20:39:06 +00:00
perry b51ed80fd5 RCS Id Police. 1998-01-09 04:11:49 +00:00
lukem 14e91f97ec WARNSify 1997-10-17 14:26:43 +00:00
lukem 35e2907fec warnsify 1997-10-17 14:23:45 +00:00
lukem 2a55b0f192 rcsid police 1997-10-09 10:07:40 +00:00
jtc 0f031182c5 sync with tzcode1997g 1997-09-05 02:11:55 +00:00
jtc 2080f3c806 Music has been expanded and renamed Arts.htm 1997-09-05 02:11:27 +00:00
jtc 5bd15d6468 import tzcode1997g 1997-09-05 02:07:13 +00:00
jtc 990a11b9c6 Fix files using old TNF copyright notice 1997-07-30 23:53:32 +00:00
jtc 43fa6fe319 If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore.  The library will use those
names internally.  Weak aliases are used to provide the original names
to the API.

This is only the first part of this change.  It is most of the functions
which are implemented in C for all NetBSD ports.  Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
1997-07-21 14:06:24 +00:00
kleink 0d71e88959 Add standards conformance statement. 1997-07-14 23:35:02 +00:00
christos 3ad08ca2f9 Fix RCSID's 1997-07-13 20:25:30 +00:00
cjs 420dff88f0 Remove bogus `#ifdef unix'. 1997-06-21 21:26:23 +00:00
jtc 359f61a781 Sync with tzcode1997e 1997-06-18 01:12:39 +00:00
jtc ef16fd639e import tzcode1997e 1997-06-18 00:41:05 +00:00
kleink 0e1fa19edf Nuke a spurious (but under !__STDC__ fatal) space from last commit. 1997-06-03 10:19:45 +00:00
kleink c9e453859c Replace some hand-crafted concatenation with the __CONCAT() macro. 1997-06-03 10:04:20 +00:00
kleink 2f11ceb63c Add a reference to the strptime(3) manual page. 1997-05-25 19:34:44 +00:00
kleink d5ab17a222 Add a strptime(3) manual page. 1997-05-25 19:29:36 +00:00
kleink 2eaf62bf51 Rewritten from scratch. Implement missing conversions and provide support
for E and O modifiers, though our locale does not support `alternate'
conversions and formats - we just stick to the unmodified rules in that case.
1997-05-25 19:26:43 +00:00
kleink 14311d9dca KNF. 1997-05-06 13:06:48 +00:00
kleink 891c1283c5 * POSIX: use tzname for the %Z conversion, not tm->tm_zone.
* KNF, RCSid police.
1997-04-29 20:00:14 +00:00
mrg cbf5ef7c50 move str[fp]time into libc/time. 1997-04-23 01:17:59 +00:00
mrg 2d2ae90504 note possible security concerns. 1997-04-22 12:33:17 +00:00
is 2b9aa0e3fe The protoypes for ctime() and tzset() are in <time.h>. Move #include <time.h>
to the start of the SYNOPSIS so that people won't need to search them.
1997-04-18 17:32:04 +00:00
mouse 80c0d60f84 alternate -> alternative, per PR 2643 1997-03-08 13:47:08 +00:00
mrg 9cd5492c02 - convert unsafe strcpy(), strcat() and sprintf() to the `n' versions.
- some KNF.
1997-01-23 14:01:45 +00:00
jtc 95c287709b set HAVE_STRERROR 1996-09-13 17:46:49 +00:00
jtc 9b9f8829d1 sync with tzcode96l 1996-09-10 22:04:29 +00:00
jtc b27646e2c2 import tzcode96l 1996-09-10 21:59:47 +00:00
jtc bd587f836f Changed manpages to reflect fact that localtime file is in /etc 1996-01-30 19:54:34 +00:00
jtc 0f94396cf3 sync with tzcode96c 1996-01-20 02:29:47 +00:00
jtc c875c647a0 sync with tzcode96a 1996-01-08 22:50:54 +00:00
jtc c743e76aff import tzcode96a 1996-01-08 22:45:14 +00:00
jtc 31ed1143ff merge in changes from 1.1 release branch 1995-11-28 06:41:14 +00:00
jtc 0ed73b3dc5 /usr/local/etc/zoneinfo -> /usr/share/zoneinfo; PR #1398 1995-08-22 19:28:15 +00:00
jtc 3924aee202 Added comment explaining why we are using a different algorithm than
what was adopted in tzcode95c to solve the problem of the first char
detzcode() extracts requiring sign extention (this is needed for
machines with 64 bit longs).

Our implementation is a bit more efficent, but requires a new macro,
SIGN_EXTEND_CHAR(), and a conditional to set it appropriately).

One minor enhancement for machines without ANSI compilers that have 32
bit longs would be to define SIGN_EXTEND_CHAR() to be the identity
macro.
1995-03-16 19:14:16 +00:00
jtc 990d7c70e0 Added some #defines for NetBSD's defaults. 1995-03-14 18:49:49 +00:00
jtc be80b6891a Removed "new" from references to newctime(3).
Removed -lz from SYNOPSIS.
1995-03-10 18:21:24 +00:00
jtc c12abbe244 Added NetBSD Id. 1995-03-10 18:12:38 +00:00
jtc 0cd8c3623b Added NetBSD Id.
Removed "new" from newctime(3) references.
1995-03-10 18:09:54 +00:00
jtc 3a34b570e9 Strictly speaking, these files probably don't belong in the libc sources.
On the other hand, it makes it easier to track the master tzcode sources
if we try to keep the distribution together as much as possible.

The zic and zdump commands will access the files the need with make's
.PATH facility.
1995-03-10 07:08:14 +00:00
jtc 27c1463773 Added some manpages and manpage links (moved from libc/gen). 1995-03-10 06:05:38 +00:00
jtc 09bcdc8226 A slightly modified version of Chris' patch so that detzcode will sign
extend properly on machines with 64 bit longs.
This patch has been submitted to the tz mailing list.
1995-03-10 05:57:35 +00:00
jtc 3d319539ac Change long to time_t as appropriate.
Add const qualifier to function argument descriptions as appropriate.
1995-03-10 00:09:36 +00:00
jtc 633548e60b Get rid of NEW (as in NEWCTIME and NEWTZSET). 1995-03-10 00:05:54 +00:00
jtc 981bebbf27 Add NetBSD ID's 1995-03-09 23:50:15 +00:00
jtc 93ae1c3e13 tzset.3, renamed from newtzset.3, from TZCODE95B. 1995-03-09 23:48:00 +00:00
jtc 214492959c ctime.3 from TZCODE95B, renamed from newctime.3. 1995-03-09 23:46:58 +00:00
jtc ac90835477 Add NetBSD Id's. 1995-03-09 23:41:11 +00:00
jtc 65c381f59e Fix typo. 1995-03-09 23:35:13 +00:00
jtc ea8e219f0c Makefile for new time stuff 1995-03-09 23:26:43 +00:00
jtc 347a7d733b Changed to use NetBSD's defaults 1995-03-09 23:25:36 +00:00
jtc 1fac1c1776 New time and date code from ADO 1995-03-09 23:21:48 +00:00