Commit Graph

26 Commits

Author SHA1 Message Date
christos bb58ba64b2 - knf
- use cpp -traditional, since the default has now changed. We want to allow
  unmatched single quotes!
- use fparseln, instead of a fixed 2k buffer.
- make all locals static and move to the top. This is so we can eventually
  make calendar understand languages other than us_en
- add braces and continue's to clarify things.
- replace gratuitous fprintf uses with warnx.
- replace vforks() with forks() since we tried to print errors with stdio.
- add more warnings so that we know how things fail.

XXX: Eventually we'll have to remove the cpp dependency, and we should:
	- make it use m4 instead [bad, breaks compatibility]
    or
	- add a small cpp like parser for #include [bad, too much code]
2001-12-04 15:55:32 +00:00
cgd a8ec668ddf convert to use getprogname() 2001-02-19 23:03:42 +00:00
cgd 9725bb291b __CONCAT does token pasting, not string concatnation. if something like:
__CONCAT("foo","bar");
actually works to concantate strings, it's because the preprocessor expands
it into "foo""bar" as separate strings, and then ANSI string concatenation
is performed on that.  It's more straightforward to just use ANSI string
concatenation directly, and newer GCCs complain (rightly) about misuse
of token pasting.
2000-12-20 01:03:16 +00:00
christos e8048693f8 Open only plain files [please someone add O_REG_ONLY]. Since /etc/daily
runs calendar -a, a malicious user can put a fifo in his home directory
to prevent calendar from completing. Many thanks to: dynamo@ime.net
2000-11-29 15:29:51 +00:00
simonb 2c0eddaf19 Don't declare 'extern opt*' getopt variables.
Don't need to declare __progname in getmmdd() - it's already done earlier
in this file.
2000-04-14 06:07:14 +00:00
drochner 85cbf55d16 Since our gcc doesn't warn about NULL format strings anymore, we can
fix the incorrect err(1, "%s", "") et al.
Closes PR bin/7592 by cgd.
1999-11-09 15:06:30 +00:00
lukem 3f8c4dac86 revert previous 1999-11-02 10:55:47 +00:00
lukem 0895d2339e remove superfluous '-' in getopt string 1999-11-02 10:52:49 +00:00
christos 9b6b9cac77 - factor out common code
- char -> unsigned char
1998-11-06 22:56:38 +00:00
wsanchez 1426fb14d2 Use __CONCAT to concatenate strings "-I" and _PATH_CALENDARS. 1998-10-12 20:51:06 +00:00
wsanchez 76847494e0 Replace _PATH_INCLUE with _PATH_CALENDARS for clarity. 1998-10-12 20:38:55 +00:00
mycroft 519d858510 __AUDIT__ cleanup. 1998-07-28 19:22:54 +00:00
mycroft f9f7e98dab const poisoning. 1998-07-27 07:41:31 +00:00
kleink c31696e747 Need <time.h> for time(), localtime(), strftim() and mktime() prototypes. 1998-04-01 20:50:17 +00:00
christos ae32ae7441 - Y2K fixes
- fix usage message
1998-02-04 15:19:50 +00:00
lukem 0b3de1cab3 WARNSify, fix .Nm usage, deprecate register 1997-10-18 12:27:31 +00:00
thorpej a73d0efd45 Enhancements from Ty Sarna <tsarna@endicor.com>, per PR #3935. Allow
user to:
- get entries from a file other than "calendar".
- get entries for a different date than today.
- get entries for a whole week in advance, or only one day.
1997-08-26 19:58:10 +00:00
lukem 19474db41e Ensure calendar doesn't go past \0 in a string.
From Douglas Crosher <dtc@scrooge.ee.swin.oz.au> in [bin/1018]
1997-06-20 08:11:34 +00:00
jtc 29ab121b2f Sync with 4.4lite2 1995-09-02 05:38:38 +00:00
glass e9d0e83acb merged with 4.4Lite. 1995-03-27 08:46:11 +00:00
hpeyerl fdecad7de9 Fix for verbal dayname parsing and support for CALENDAR_DIR
environment variable.  Also take out a superfluous word in the
manpage.
1995-03-26 03:59:07 +00:00
cgd 7bcf44497f invoke cpp with -P 1994-12-30 21:57:09 +00:00
cgd 749dc802ca fix "bin/135: calendar bug", and another bug found while looking into it.
the reported bug was fixed with the reported fix, from Keith White
<kwhite@csi.UOttawa.CA>.  The newly-found bug was fixed by me.
1994-02-22 09:46:29 +00:00
cgd 156269bbe4 off-by-one fix, from fen@netcom.com (Fen Labalme, and more (from me) 1994-01-05 13:13:00 +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