OpenBSD CVS

CVS log for src/usr.bin/cal/cal.c


[BACK] Up to [local] / src / usr.bin / cal

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.31 / (download) - annotate - [select for diffs], Sun Dec 4 23:50:47 2022 UTC (17 months, 2 weeks ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.30: +1 -2 lines
Diff to previous 1.30 (colored)

userspace: remove vestigial '?' cases from top-level getopt(3) loops

getopt(3) returns '?' when it encounters a flag not present in the in
the optstring or if a flag is missing its option argument.  We can
handle this case with the "default" failure case with no loss of
legibility.  Hence, remove all the redundant "case '?':" lines.

Prompted by dlg@.  With help from dlg@ and millert@.

Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2

ok naddy@ millert@ dlg@

Revision 1.30 / (download) - annotate - [select for diffs], Fri Oct 9 01:37:06 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.29: +3 -3 lines
Diff to previous 1.29 (colored)

Change all tame callers to namechange to pledge(2).

Revision 1.29 / (download) - annotate - [select for diffs], Mon Oct 5 13:30:30 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.28: +4 -1 lines
Diff to previous 1.28 (colored)

tame "stdio rpath" or tame "stdio" suffices for all of these programs.
fairly easy to audit by running nm and noticing nothing beyond base
stdio except for fopen/freopen.  Then review all callpaths to those
functions, and place the tame() calls.
ok sthen

Revision 1.28 / (download) - annotate - [select for diffs], Tue Mar 17 19:31:30 2015 UTC (9 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

Eliminate use of TM_YEAR_BASE.  OK guenther@ deraadt@ miod@

Revision 1.27 / (download) - annotate - [select for diffs], Sun Mar 15 00:41:27 2015 UTC (9 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.26: +1 -2 lines
Diff to previous 1.26 (colored)

tzfile.h is an internal header that should never have been installed.
What's worse, the tzfile.h that gets installed is over 20 years old
and doesn't match the real tzfile.h in libc/time.  This makes the
tree safe for /usr/include/tzfile.h removal.  The TM_YEAR_BASE
define has been moved to time.h temporarily until its usage is
replaced by 1900 in the tree.  Actual removal of tzfile.h is pending
a ports build.  Based on a diff from deraadt@

Revision 1.26 / (download) - annotate - [select for diffs], Wed Nov 20 21:33:17 2013 UTC (10 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

unsigned char casts are needed for these isdigit & isprint calls
ok benno

Revision 1.25 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:36 2009 UTC (14 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.24: +1 -12 lines
Diff to previous 1.24 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

Revision 1.24 / (download) - annotate - [select for diffs], Thu Jan 1 21:07:17 2009 UTC (15 years, 4 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.23: +38 -25 lines
Diff to previous 1.23 (colored)

Fix iso weekno calculation by using a different algorithm. Still hard
to follow, but this one has a documented origin at least; ok pyr@
jasper@

Revision 1.23 / (download) - annotate - [select for diffs], Fri Apr 18 14:41:04 2008 UTC (16 years, 1 month ago) by pyr
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.22: +93 -16 lines
Diff to previous 1.22 (colored)

Allow cal to show week numbers. Switch between sunday based week numbering
and ISO 8601 monday based week numbering with overlapping weeks if the -m
flag is present.

many positive feedback received.
ok mbalmer@, jasper@, simon@
input from todd@

Revision 1.22 / (download) - annotate - [select for diffs], Thu Apr 10 15:07:04 2008 UTC (16 years, 1 month ago) by pyr
Branch: MAIN
Changes since 1.21: +53 -16 lines
Diff to previous 1.21 (colored)

Introduce the -m flag which shows weeks as starting on mondays.
input from tom@ through markus@
ok henning@, mbalmer@ and jmc@

Revision 1.21 / (download) - annotate - [select for diffs], Sun Oct 29 22:51:09 2006 UTC (17 years, 6 months ago) by tom
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.20: +4 -5 lines
Diff to previous 1.20 (colored)

Optimise a couple of printf()s; originally from Han Boetes.

Reminded by, and ok, otto@.

Revision 1.20 / (download) - annotate - [select for diffs], Tue Apr 25 05:18:26 2006 UTC (18 years ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.19: +5 -3 lines
Diff to previous 1.19 (colored)

atoi/strtonum from han boetes

Revision 1.19 / (download) - annotate - [select for diffs], Fri Mar 24 03:44:14 2006 UTC (18 years, 2 months ago) by ray
Branch: MAIN
Changes since 1.18: +5 -5 lines
Diff to previous 1.18 (colored)

KNF, no binary change.

From Han Boetes.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Dec 8 14:54:30 2005 UTC (18 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

oops - forgot to remind tom to update usage();

Revision 1.17 / (download) - annotate - [select for diffs], Wed Dec 7 12:31:05 2005 UTC (18 years, 5 months ago) by tom
Branch: MAIN
Changes since 1.16: +8 -9 lines
Diff to previous 1.16 (colored)

Tidy up month parsing: don't accept "mayor" for "may", or "4x" for "4".
And strptime(3) %b and %B conversions are the same, so don't bother
trying both.

ok otto@

Revision 1.16 / (download) - annotate - [select for diffs], Sun Sep 25 21:05:04 2005 UTC (18 years, 7 months ago) by jmc
Branch: MAIN
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

cal now (well, has done for a while) accepts a single argument
of the abbreviated month name: update SYNOPSIS, usage(), and
DESCRIPTION to reflect this;

remove a sentence that was repeated in the text - replace it with
something marginally more useful;

be clear that both numerical and string arguments are now accepted;

escape some hyphens whilst here;

Revision 1.15 / (download) - annotate - [select for diffs], Wed Aug 24 05:19:41 2005 UTC (18 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.14: +12 -10 lines
Diff to previous 1.14 (colored)

range check months 1-12; ok tedu millert others

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jul 6 06:45:58 2005 UTC (18 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.13: +5 -5 lines
Diff to previous 1.13 (colored)

spacing

Revision 1.13 / (download) - annotate - [select for diffs], Wed Jul 6 05:31:08 2005 UTC (18 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.12: +14 -16 lines
Diff to previous 1.12 (colored)

warning clean and constiness

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jul 6 05:24:30 2005 UTC (18 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.11: +33 -6 lines
Diff to previous 1.11 (colored)

drop in parsemonth from freebsd.
use it to parse month, so "cal june 2005" works as expected.
if only one arg is given, see if it could be a month
ok deraadt

Revision 1.11 / (download) - annotate - [select for diffs], Wed Apr 13 18:52:59 2005 UTC (19 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.10: +4 -3 lines
Diff to previous 1.10 (colored)

do not trust snprintf return value; ok otto mickey

Revision 1.10 / (download) - annotate - [select for diffs], Tue Jun 10 22:20:45 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.9: +13 -28 lines
Diff to previous 1.9 (colored)

mostly ansi cleanup; pval ok

Revision 1.9 / (download) - annotate - [select for diffs], Tue Jun 3 02:56:06 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.8: +3 -7 lines
Diff to previous 1.8 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.8 / (download) - annotate - [select for diffs], Wed May 29 09:23:25 2002 UTC (21 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.7: +6 -5 lines
Diff to previous 1.7 (colored)

more snprintf

Revision 1.7 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:44 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.6: +12 -12 lines
Diff to previous 1.6 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Apr 25 01:09:15 1998 UTC (26 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0, OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

nothing important...

Revision 1.5 / (download) - annotate - [select for diffs], Mon Mar 30 06:59:23 1998 UTC (26 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.4: +7 -5 lines
Diff to previous 1.4 (colored)

Y2K fixes from Andreas.Gunnarsson@emw.ericsson.se; culled from various places

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jan 15 23:42:15 1997 UTC (27 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

getopt(3) returns -1 when out of args, not EOF, whee!

Revision 1.3 / (download) - annotate - [select for diffs], Sun Aug 11 00:46:44 1996 UTC (27 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.2: +4 -4 lines
Diff to previous 1.2 (colored)

use 2-char day names; from wosch@cs.tu-berlin.de

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 26 05:31:43 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

rcsid

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:44:56 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:44:56 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.