Commit Graph

27 Commits

Author SHA1 Message Date
joerg 49dbe234f7 static + __dead 2011-08-29 13:55:22 +00:00
roy 98eb889579 Userland now builds and uses terminfo instead of termcap.
OK: core@, jdc@
2010-02-03 15:34:37 +00:00
lukem 53d5aab9a2 fix WARNS=4 issues 2009-04-11 11:26:34 +00:00
lukem 98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
dholland 5e6732eb9c Don't allow negative args for the -A and -B options, because they
lead to SIGSEGV in the output formatting code.
Fixes PR 37657 from Jeffrey E. Bedard.
2008-01-01 17:45:01 +00:00
wiz 8caeef46da Sort options. 2007-12-24 13:56:00 +00:00
joerg 358c956d05 Also recognize year-month as suggested by Alan Barrett. 2007-12-19 16:45:41 +00:00
joerg c98485db44 Make syntax checking more strict and recognize year/month.
One Finish and German developer agree that month year is a stupid
order, the French and British guys disagree and the only natural
choice left is to make it understand ISO style.
2007-12-19 15:52:50 +00:00
lukem 658ed3362c appease gcc -Wuninitialized 2005-06-02 01:35:57 +00:00
agc 89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
atatat cfda71101a Reform the Gregorian Reform. This means that the previously hard
coded meaning of 1752/09/03 is only a default, and that everything is
now calculated dynamically.

You can now use -R reform-spec to specify an alternate reform.  Read
the fine (new) man page for details on this.  There is also a new -r
option which will make cal print the month (or year, if -y is also
given) in which the Gregorian Reform started.  I say started only
because if you apply the reform at 9999/1/22, a chunk of January is
knocked out, February and March are missing entirely, and April starts
on the 5th.  The use of -r with -y does pretty much what you'd expect.

Also, implement -d day-of-week so that you can tell cal to start the
week on something other that a Sunday.  This addresses PR bin/8539 at
long last.
2003-07-24 01:19:45 +00:00
yamt 808b43aeb1 fix garbages printed with -h option.
- always clear linebuffer.
- don't use an uninitialized variable.
2003-07-22 14:22:09 +00:00
atatat 85cee2b43a Add -h to cal, which makes it highlight the current date, if it's
present in the displayed calender.  It uses libtermcap to discover the
proper sequences to turn on bold, or uses overstriking if output is
not to a terminal.  If you use two -h options with terminal output,
the date is presented in reverse video instead of bold.

Next we'll have to make the Gregorian gap vary with TZ settings, since
the current method (do it only for September 1752) is decidely
Anglo-centric.  ;-P
2003-06-05 00:21:20 +00:00
yamt c81873c76e - add -A and -B option.
- change -3 to a synonym of "-A1 -B1".
  (to make compatible other implementations)
- eliminate duplicated codes.
- fix crashes for -3.
2002-10-25 20:06:56 +00:00
perry 037dfc0e18 add -3 option (display three month range) 2002-06-22 21:14:18 +00:00
perry 534ffc6dd8 ansi prototypes, un__P, and some KNF 2002-06-21 19:58:48 +00:00
christos ac193186ef char -> unsigned char 1998-11-06 22:49:30 +00:00
mycroft 519d858510 __AUDIT__ cleanup. 1998-07-28 19:22:54 +00:00
ws b6a9340ab5 Fix leap_year calculation (1900 wasn't a leap year) 1998-04-17 14:01:56 +00:00
christos 7bc244d512 Don't hardcode 1900... 1998-02-04 15:17:49 +00:00
lukem b4d27c3a21 WARNSify, fix .Nm usage 1997-10-18 12:24:53 +00:00
glass 2db3772ce4 merged with 4.4Lite 1995-03-26 03:10:21 +00:00
ws 9bce9062d9 Minor fix for date of 3 Sep 1752
doesn't affect program due to usage of this constant
found by Frank Lancaster (fl@tools.de)
1995-01-16 19:06:47 +00:00
cgd b8de9939be pull in string.h 1994-12-24 15:50:40 +00:00
cgd 20469574af make sure strings are null-terminated, from christos@deshaw.com 1994-01-25 00:49:35 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00