OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.51 / (download) - annotate - [select for diffs], Tue Dec 7 14:00:33 2021 UTC (2 years, 4 months ago) by robert
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, HEAD
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored)

switch from tradcpp(1) to cpp(1); ok jsg@

Revision 1.50 / (download) - annotate - [select for diffs], Sun Oct 24 21:24:16 2021 UTC (2 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

For open/openat, if the flags parameter does not contain O_CREAT, the
3rd (variadic) mode_t parameter is irrelevant.  Many developers in the past
have passed mode_t (0, 044, 0644, or such), which might lead future people
to copy this broken idiom, and perhaps even believe this parameter has some
meaning or implication or application. Delete them all.
This comes out of a conversation where tb@ noticed that a strange (but
intentional) pledge behaviour is to always knock-out high-bits from
mode_t on a number of system calls as a safety factor, and his bewilderment
that this appeared to be happening against valid modes (at least visually),
but no sorry, they are all irrelevant junk.  They could all be 0xdeafbeef.
ok millert

Revision 1.49 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:00 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: 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
Changes since 1.48: +3 -3 lines
Diff to previous 1.48 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.48 / (download) - annotate - [select for diffs], Tue Jan 29 22:28:30 2019 UTC (5 years, 3 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)

replace some archaic quotes with plain variations.
ok deraadt millert

Revision 1.47 / (download) - annotate - [select for diffs], Mon Sep 25 19:13:56 2017 UTC (6 years, 7 months ago) by krw
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
Changes since 1.46: +7 -5 lines
Diff to previous 1.46 (colored)

Calling waitpid(pid,...) where pid is either uninitialized or
-1 because vflork() failed is bad. Initialize pid to -1 and call
waitpid() only when pid != -1.

Uninitialized use of pid found by clang.

Suggestion of -1 from millert@.

ok millert@

Revision 1.46 / (download) - annotate - [select for diffs], Mon Aug 21 21:41:13 2017 UTC (6 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.45: +7 -4 lines
Diff to previous 1.45 (colored)

Use waitpid()/EINTR idiom for the specific pid, rather than generic wait(),
in case the parent process was started with a dangling child.  This style
ensures any potential parent:child interlock isn't disrupted due to the
"wrong" child being waited on first.  Then the other other childs can safely
zombie.
ok millert jca brynet

Revision 1.45 / (download) - annotate - [select for diffs], Thu Aug 10 14:26:31 2017 UTC (6 years, 8 months ago) by tb
Branch: MAIN
Changes since 1.44: +2 -6 lines
Diff to previous 1.44 (colored)

Remove KOI8 lines after 5.9 is out.

From Jan Stary, Klemens Nanni and others

Revision 1.44 / (download) - annotate - [select for diffs], Wed Aug 31 09:38:47 2016 UTC (7 years, 8 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.43: +5 -2 lines
Diff to previous 1.43 (colored)

fix fd leaks in error paths
ok guenther@

Revision 1.43 / (download) - annotate - [select for diffs], Tue Dec 8 19:04:50 2015 UTC (8 years, 4 months ago) by mmcc
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.42: +5 -9 lines
Diff to previous 1.42 (colored)

Remove NULL-checks before free(). ok tb@

Revision 1.42 / (download) - annotate - [select for diffs], Fri Oct 23 12:36:23 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)

delete ) that jumped in

Revision 1.41 / (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.40: +5 -5 lines
Diff to previous 1.40 (colored)

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

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

Fix BODUN handling after switch to UTF-8.

Still wondering if this functionality should be removed, but I'll leave
the decision to those who drink alcohol.

Input from & okay tedu@.

Revision 1.39 / (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.38: +8 -4 lines
Diff to previous 1.38 (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.38 / (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.37: +1 -2 lines
Diff to previous 1.37 (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.37 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:06 2015 UTC (9 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.36 / (download) - annotate - [select for diffs], Tue Nov 26 13:18:53 2013 UTC (10 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.35: +10 -7 lines
Diff to previous 1.35 (colored)

unsigned char casts for ctype
ok krw

Revision 1.35 / (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.34: +1 -15 lines
Diff to previous 1.34 (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.34 / (download) - annotate - [select for diffs], Wed Oct 17 20:10:44 2007 UTC (16 years, 6 months ago) by chl
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
Changes since 1.33: +2 -3 lines
Diff to previous 1.33 (colored)

remove "unused variable" warnings

tested by deraadt@ on a gcc2 arch

looks ok ray@ ok deraadt@

Revision 1.33 / (download) - annotate - [select for diffs], Mon Dec 11 20:50:54 2006 UTC (17 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.32: +5 -4 lines
Diff to previous 1.32 (colored)

rfc 3834 support: Auto-Submitted: auto-generated on lots of things; from Tamas TEVESZ; ok millert

Revision 1.32 / (download) - annotate - [select for diffs], Thu Nov 24 19:36:10 2005 UTC (18 years, 5 months ago) by moritz
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.31: +5 -5 lines
Diff to previous 1.31 (colored)

fix use after free introduced in r1.30. ok deraadt@

Revision 1.31 / (download) - annotate - [select for diffs], Wed Nov 16 16:45:11 2005 UTC (18 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.30: +75 -80 lines
Diff to previous 1.30 (colored)

knf & cleanup; mickey ok

Revision 1.30 / (download) - annotate - [select for diffs], Mon Nov 14 15:56:35 2005 UTC (18 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.29: +9 -14 lines
Diff to previous 1.29 (colored)

use asprintf(); ok mickey

Revision 1.29 / (download) - annotate - [select for diffs], Fri Apr 15 14:28:56 2005 UTC (19 years ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.28: +4 -4 lines
Diff to previous 1.28 (colored)

Remove standard defines from cpp processing, to prevent accidental
substitutions (e.g. i386 -> 1). From John L. Scarfone, PR 4176.
ok deraadt@

Revision 1.28 / (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.27: +2 -2 lines
Diff to previous 1.27 (colored)

cleanup extra includes and -Wall

Revision 1.27 / (download) - annotate - [select for diffs], Fri Dec 10 15:00:27 2004 UTC (19 years, 4 months ago) by mickey
Branch: MAIN
Changes since 1.26: +22 -4 lines
Diff to previous 1.26 (colored)

allow calendar files in julian

Revision 1.26 / (download) - annotate - [select for diffs], Wed Jun 2 14:58:46 2004 UTC (19 years, 11 months ago) by tom
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

Don't want text in err() call following malloc failures.

ok henning@

Revision 1.25 / (download) - annotate - [select for diffs], Wed Jan 14 23:54:11 2004 UTC (20 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.24: +4 -3 lines
Diff to previous 1.24 (colored)

calendar relies on cpp -traditional behavior so explicitly specify -traditional
when running cpp.  mickey@ OK

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

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

Revision 1.23 / (download) - annotate - [select for diffs], Sun Apr 6 19:59:12 2003 UTC (21 years, 1 month ago) by grange
Branch: MAIN
Changes since 1.22: +6 -6 lines
Diff to previous 1.22 (colored)

kill strcat
ok mickey@

Revision 1.22 / (download) - annotate - [select for diffs], Thu Mar 13 09:09:29 2003 UTC (21 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.21: +5 -4 lines
Diff to previous 1.21 (colored)

lots of sprintf -> snprintf and strcpy -> strlcpy; checked by tedu

Revision 1.21 / (download) - annotate - [select for diffs], Wed Dec 18 20:34:44 2002 UTC (21 years, 4 months ago) by mickey
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

t'was not enough space malloced when generating the bodun entries

Revision 1.20 / (download) - annotate - [select for diffs], Wed Oct 16 00:30:58 2002 UTC (21 years, 6 months ago) by vincent
Branch: MAIN
Changes since 1.19: +11 -8 lines
Diff to previous 1.19 (colored)

 don't bork if there's a "calendar" directory in the current directory....

 ok millert

Revision 1.19 / (download) - annotate - [select for diffs], Mon Nov 19 19:02:13 2001 UTC (22 years, 5 months ago) by mpech
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.18: +4 -4 lines
Diff to previous 1.18 (colored)

kill more registers

millert@ ok

Revision 1.18 / (download) - annotate - [select for diffs], Wed Oct 3 18:17:48 2001 UTC (22 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

error printout fix; raj@cerias.purdue.edu

Revision 1.17 / (download) - annotate - [select for diffs], Thu Sep 27 18:19:20 2001 UTC (22 years, 7 months ago) by mickey
Branch: MAIN
Changes since 1.16: +18 -10 lines
Diff to previous 1.16 (colored)

some fixes and cleanups some from dfa@solo.ee, some pointed
out by pjanzen@ .

Revision 1.16 / (download) - annotate - [select for diffs], Thu Sep 27 02:55:01 2001 UTC (22 years, 7 months ago) by mickey
Branch: MAIN
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

-Wall passage for prev commit

Revision 1.15 / (download) - annotate - [select for diffs], Wed Sep 26 20:38:55 2001 UTC (22 years, 7 months ago) by mickey
Branch: MAIN
Changes since 1.14: +23 -5 lines
Diff to previous 1.14 (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.14 / (download) - annotate - [select for diffs], Mon Sep 3 16:15:08 2001 UTC (22 years, 8 months ago) by pjanzen
Branch: MAIN
Changes since 1.13: +5 -31 lines
Diff to previous 1.13 (colored)

No longer any reason to care if calendar file is a pipe or not.

Revision 1.13 / (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.12: +16 -25 lines
Diff to previous 1.12 (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.12 / (download) - annotate - [select for diffs], Mon Jul 9 07:04:48 2001 UTC (22 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.11: +4 -4 lines
Diff to previous 1.11 (colored)

correct type on last arg to execl(); nordin@cse.ogi.edu

Revision 1.11 / (download) - annotate - [select for diffs], Tue Jun 5 21:27:16 2001 UTC (22 years, 11 months ago) by pjanzen
Branch: MAIN
Changes since 1.10: +6 -6 lines
Diff to previous 1.10 (colored)

errx->err where errno is set

Revision 1.10 / (download) - annotate - [select for diffs], Thu Dec 7 19:36:37 2000 UTC (23 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.9: +44 -17 lines
Diff to previous 1.9 (colored)

only accept real files for the calendar file.  requires some cute
nonblocking hackery.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Aug 2 04:10:47 2000 UTC (23 years, 9 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.8: +6 -3 lines
Diff to previous 1.8 (colored)

$HOME paranoia: never use getenv("HOME") w/o checking for NULL and non-zero

Revision 1.8 / (download) - annotate - [select for diffs], Thu Nov 25 03:46:47 1999 UTC (24 years, 5 months ago) by pjanzen
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.7: +4 -4 lines
Diff to previous 1.7 (colored)

Parse dates only before the first <tab> character; otherwise, weekly events
whose description starts with a valid month are misparsed.

Revision 1.7 / (download) - annotate - [select for diffs], Tue Apr 20 23:03:25 1999 UTC (25 years ago) by pjanzen
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

Don't call sendmail with "-f root" since sendmail isn't run by a "trusted
user".  Removes the X-Authentication-Warning.  From FreeBSD.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Dec 13 07:31:08 1998 UTC (25 years, 4 months ago) by pjanzen
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.5: +83 -68 lines
Diff to previous 1.5 (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.5 / (download) - annotate - [select for diffs], Sun Nov 8 04:31:13 1998 UTC (25 years, 6 months ago) by pjanzen
Branch: MAIN
Changes since 1.4: +91 -17 lines
Diff to previous 1.4 (colored)

Sort output by date; include framework for showing periodic events more than
once

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

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

Revision 1.3 / (download) - annotate - [select for diffs], Sat Feb 14 21:07:21 1998 UTC (26 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.2: +7 -4 lines
Diff to previous 1.2 (colored)

Give correct format to strftime(3) instead of using "%c" and making
assumptions as to what that will look like (which is idiotic as %c
is locale-dependent).

Revision 1.2 / (download) - annotate - [select for diffs], Fri Sep 12 04:12:48 1997 UTC (26 years, 7 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.1: +4 -3 lines
Diff to previous 1.1 (colored)

Kill extra newline in err()/warn().

Revision 1.1 / (download) - annotate - [select for diffs], Thu Dec 5 06:04:40 1996 UTC (27 years, 5 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1

FreeBSD calendar(1) + OpenBSD changes.

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.