OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.37 / (download) - annotate - [select for diffs], Fri Feb 1 16:22:53 2019 UTC (5 years, 3 months ago) by millert
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, 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, HEAD
Changes since 1.36: +7 -3 lines
Diff to previous 1.36 (colored)

Fix regresion that prevented -A0 from working as before.
This can be used to disable the default behavior of reporting events
for the weekend on a Friday.

Revision 1.36 / (download) - annotate - [select for diffs], Tue Jan 29 20:08:56 2019 UTC (5 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.35: +1 -3 lines
Diff to previous 1.35 (colored)

Fix a bug with -flag where later events may be shown when they should not be.
The problem is caused by the special handling of Friday, where calendar will
show the upcoming events for the weeked as well.  This change disables the
special handling of Friday for the -B option, as was already done for -A.
From Andy Bradford.

Revision 1.35 / (download) - annotate - [select for diffs], Mon Dec 7 18:46:35 2015 UTC (8 years, 4 months ago) by espie
Branch: MAIN
CVS Tags: 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.34: +8 -3 lines
Diff to previous 1.34 (colored)

tweak the code a bit and add a -w option to display day of week.
okay jmc@, millert@

Revision 1.34 / (download) - annotate - [select for diffs], Sat Nov 21 12:50:58 2015 UTC (8 years, 5 months ago) by semarie
Branch: MAIN
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored)

add "getpw" promise to calendar(1) (in doall case only)

used with -a in order to iterate on all users using getpwent(3).

ok matthieu@ pascal@

Revision 1.33 / (download) - annotate - [select for diffs], Mon Nov 16 17:49:35 2015 UTC (8 years, 5 months ago) by pascal
Branch: MAIN
Changes since 1.32: +10 -1 lines
Diff to previous 1.32 (colored)

pledge calendar:

* "stdio rpath proc exec" in normal mode (execs cpp)
* "stdio rpath tmppath fattr id proc exec" in -a mode, which is typically
  run as root (hint hint)

ok deraadt@

Revision 1.32 / (download) - annotate - [select for diffs], Fri Oct 23 11:43:16 2015 UTC (8 years, 6 months ago) by zhuk
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

A bit of whitespace cleanup, to make further diffs smaller.

Revision 1.31 / (download) - annotate - [select for diffs], Sat Apr 18 18:28:37 2015 UTC (9 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.30: +9 -3 lines
Diff to previous 1.30 (colored)

Convert many atoi() calls to strtonum(), adding range checks and failure
handling along the way.
Reviews by Brendan MacDonell, Jeremy Devenport, florian, doug, millert

Revision 1.30 / (download) - annotate - [select for diffs], Sun Mar 15 00:41:28 2015 UTC (9 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.29: +1 -2 lines
Diff to previous 1.29 (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.29 / (download) - annotate - [select for diffs], Sun Feb 8 23:40:34 2015 UTC (9 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

in getopt() blocks, stop incrementing flag variable which are supposed
to just be 0/1
ok miod florian

Revision 1.28 / (download) - annotate - [select for diffs], Tue Jan 31 08:29:25 2012 UTC (12 years, 3 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, 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
Changes since 1.27: +6 -2 lines
Diff to previous 1.27 (colored)

also kill descendants on child timeout; from pjantzen@

Revision 1.27 / (download) - annotate - [select for diffs], Mon Sep 12 21:23:00 2011 UTC (12 years, 7 months ago) by jmc
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

- (-t) use macros instead of punctuation, to avoid marking up the
whole argument as an Ar block
- (-t) remove a superfluous set of [] around "mm"

ok sobrado millert

Revision 1.26 / (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_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.25: +1 -15 lines
Diff to previous 1.25 (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.25 / (download) - annotate - [select for diffs], Wed Nov 16 16:45:11 2005 UTC (18 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.24: +7 -7 lines
Diff to previous 1.24 (colored)

knf & cleanup; mickey ok

Revision 1.24 / (download) - annotate - [select for diffs], Tue Aug 9 12:32:58 2005 UTC (18 years, 8 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.23: +4 -2 lines
Diff to previous 1.23 (colored)

handle -A0 correctly; from koen@egelink.nl

Revision 1.23 / (download) - annotate - [select for diffs], Fri Dec 10 15:31:01 2004 UTC (19 years, 4 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

cleanup extra includes and -Wall

Revision 1.22 / (download) - annotate - [select for diffs], Tue Sep 9 08:39:53 2003 UTC (20 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.21: +4 -4 lines
Diff to previous 1.21 (colored)

sort the options in SYNOPSIS and sync usage();

Revision 1.21 / (download) - annotate - [select for diffs], Tue Jun 10 22:20:45 2003 UTC (20 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.20: +5 -8 lines
Diff to previous 1.20 (colored)

mostly ansi cleanup; pval ok

Revision 1.20 / (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.19: +3 -7 lines
Diff to previous 1.19 (colored)

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

Revision 1.19 / (download) - annotate - [select for diffs], Sun Dec 8 16:50:07 2002 UTC (21 years, 5 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

GNU semantics say that if optstring begins with '-' then
each non-option shall be treated as arguments to option '\1'.

BSD getopt match '-' in optstring with a '-' on the command line.
This is used to support deprecated options like "su -" that would
otherwise prevent the use of getopt().

Resolving this simply requires that the leading '-' be moved somewhere
else (I moved it to the end of optstring) since position within
optstring is not meaningful.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Jun 23 03:07:21 2002 UTC (21 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.17: +7 -7 lines
Diff to previous 1.17 (colored)

uid_t and gid_t are unsigned

Revision 1.17 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:44 2002 UTC (22 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (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.16 / (download) - annotate - [select for diffs], Wed Sep 26 20:38:55 2001 UTC (22 years, 7 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.15: +9 -4 lines
Diff to previous 1.15 (colored)

special procesing for cyrillic calendars (.ru, .ua, .by for now).
does not affect any existing behaviour for everything else.
old idea expressed by form@; millert@ ok

Revision 1.15 / (download) - annotate - [select for diffs], Mon Sep 3 15:53:00 2001 UTC (22 years, 8 months ago) by pjanzen
Branch: MAIN
Changes since 1.14: +121 -13 lines
Diff to previous 1.14 (colored)

- Prevent users from hanging or killing 'calendar -a', at the cost of
one additional fork() per user who has a calendar file.  Side effect is
that root runs much less code.
- Use login caps so we don't, for example, give a user more processes than
he's allowed.
- tmpfile() rather than mkstemp() means never leaving junk behind.
- Don't let 'calendar -a' take more than a day.

Reviewed by millert@

Revision 1.14 / (download) - annotate - [select for diffs], Tue Nov 21 14:01:38 2000 UTC (23 years, 5 months ago) by aaron
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.13: +4 -3 lines
Diff to previous 1.13 (colored)

Sync usage() output with man page; mpech@prosoft.org.lv

Revision 1.12.6.1 / (download) - annotate - [select for diffs], Fri Oct 6 21:16:11 2000 UTC (23 years, 7 months ago) by jason
Branch: OPENBSD_2_7
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored) next main 1.13 (colored)

Pull in patch from current (even more to come):
Fix (millert):
warnx?/errx? paranoia (use "%s" not a bare string unless it is a
constant).  These are not security holes but it is worth fixing
them anyway both for robustness and so folks looking for examples
in the tree are not misled into doing something potentially dangerous.
Furthermore, it is a bad idea to assume that pathnames will not
include '%' in them and that error routines don't return strings
with '%' in them (especially in light of the possibility of locales).

Revision 1.13 / (download) - annotate - [select for diffs], Fri Jun 30 16:00:11 2000 UTC (23 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

warnx?/errx? paranoia (use "%s" not a bare string unless it is a
constant).  These are not security holes but it is worth fixing
them anyway both for robustness and so folks looking for examples
in the tree are not misled into doing something potentially dangerous.
Furthermore, it is a bad idea to assume that pathnames will not
include '%' in them and that error routines don't return strings
with '%' in them (especially in light of the possibility of locales).

Revision 1.12 / (download) - annotate - [select for diffs], Sun Dec 13 07:31:07 1998 UTC (25 years, 4 months ago) by pjanzen
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5
Branch point for: OPENBSD_2_7
Changes since 1.11: +22 -7 lines
Diff to previous 1.11 (colored)

Show periodic events the correct number of times.
Calculate special events (Easter) correctly regardless of which year
they occur in (thus fixing user/562).
Keep locales and special event names from propogating from one user
to the next during "calendar -a".
Set up a framework to handle special events other than Easter (for instance,
Jewish events, eventually).
Various other fixes.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Nov 4 11:32:02 1998 UTC (25 years, 6 months ago) by pjanzen
Branch: MAIN
Changes since 1.10: +4 -3 lines
Diff to previous 1.10 (colored)

Various fixes, including closing user/630.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Sep 15 07:12:03 1997 UTC (26 years, 7 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.9: +4 -4 lines
Diff to previous 1.9 (colored)

Don't do a setlogin() as it affects everything in the session, not
just that process.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Sep 8 23:49:57 1997 UTC (26 years, 8 months ago) by millert
Branch: MAIN
Changes since 1.8: +3 -2 lines
Diff to previous 1.8 (colored)

call setlogin(2)

Revision 1.8 / (download) - annotate - [select for diffs], Tue Aug 26 23:37:21 1997 UTC (26 years, 8 months ago) by millert
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

Make -t option use a date string like date(1).

Revision 1.7 / (download) - annotate - [select for diffs], Fri Jun 20 08:41:53 1997 UTC (26 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +3 -5 lines
Diff to previous 1.6 (colored)

sigh, who wrote this

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

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

Revision 1.5 / (download) - annotate - [select for diffs], Thu Dec 5 06:04:38 1996 UTC (27 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.4: +46 -327 lines
Diff to previous 1.4 (colored)

FreeBSD calendar(1) + OpenBSD changes.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Dec 4 09:06:00 1996 UTC (27 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.3: +20 -9 lines
Diff to previous 1.3 (colored)

security holes: seek and ye shall find

Revision 1.3 / (download) - annotate - [select for diffs], Mon Sep 16 16:36:04 1996 UTC (27 years, 7 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)

/tmp// -> /tmp/

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 26 05:31:45 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:57 1995 UTC (28 years, 6 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:57 1995 UTC (28 years, 6 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.