History log of /freebsd-10-stable/usr.bin/ncal/ncal.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 309336 30-Nov-2016 vangyzen

MFC r308340

ncal: fix a reference to an out-of-scope stack buffer

PR: 214237
Submitted by: Jonathan de Boyne Pollard
Sponsored by: Dell EMC


# 300473 23-May-2016 truckman

MFC r300005

swprintf() and apparently wcsftime() want the their output buffer size
specified in terms of the the number of wide characters and not
sizeof(buffer).

Reported by: Coverity
CID: 1007605, 1007606


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 241737 19-Oct-2012 ed

More -Wmissing-variable-declarations fixes.

In addition to adding `static' where possible:

- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.


# 232004 22-Feb-2012 maxim

o Use ISO 3166 county code for Sweden.

PR: standards/165400
Submitted by: Carsten Hey
MFC after: 1 week


# 223931 11-Jul-2011 edwin

ncal(1) highlights the current date (or a date provided via parameter)
even if stdout is not a tty. If stdout is not a tty the data is
normally processed by other tools and no control sequences are
expected.

PR: bin/158580
MFC after: 1 week


# 212032 30-Aug-2010 edwin

Use basename(3) to determine the name of the program.

Submitted by: Alexander Best <arundel@>


# 205427 21-Mar-2010 edwin

Replace -b with -C and -B (as proposed by Alexander).
Add -3, -A and -B to the usage.
Update regression test for the new parameters.


# 205071 12-Mar-2010 edwin

- With the introduction of -A, -B and -3, not all combinations of
arguments makes sense anymore. For example, what would a combination
of -3 (show three months) and -y (show the whole year) do?
We will abort on these cases.
- Move the debug option -d to -H (from highlight), while -d is now
used for setting the day of "today" so that -y and friends can
be tested.


# 204908 09-Mar-2010 edwin

- Fix the highlighting for non-terminals when the last week is not
7 days long.
- "-m <N> <YYYY>" now prints only the month, not the whole year.


# 204849 07-Mar-2010 edwin

- document the -3, -A and -B properly in Synopsis.
- add highlight of current date for non-terminals.
- fix -J option.
- code cleanup.

MFC after: 2 weeks


# 204697 04-Mar-2010 edwin

- Implement -3 option (show previous, this and next month) option.
- Add -A option (months after this month).
- Add -B option (months before this month).
- Fix highlighting of today in year overview.
- Fix aligning of "foreign" characters.

MFC after: 2 weeks


# 200462 13-Dec-2009 delphij

Revert most part of 200420 as requested, as more review and polish is
needed.


# 200420 11-Dec-2009 delphij

Remove unneeded header includes from usr.bin/ except contributed code.

Tested with: make universe


# 194447 18-Jun-2009 ume

Since the width is always 2, it is enough to put just one
trailing space is enough.

MFC after: 1 week


# 194366 17-Jun-2009 ume

Fix column width of weekday names for multibyte locales.

Noticed by: nyan
Discussed with: matusita, takawata
MFC after: 1 week


# 191737 02-May-2009 rdivacky

Mention -h in usage() and manpage. Rename term_{r,e} to term_{so,se}.

Suggested by: ru
Approved by: ed (mentor)


# 191690 30-Apr-2009 ru

Fixed multi-byte character support to actually work.


# 191364 21-Apr-2009 rdivacky

Couple of changes based on feedback

o Change mr/me to so/se [1].
o Introduce a -h option to disable highlighting. [2]
o Spell STDOUT_FILENO as such and pass NULL to tgetent()
to handle the case of unset TERM. [3]

Suggested by: naddy mips.inka.de (Christian Weisgerber) [1]
Requested by: danfe, deischen [2]
Suggested by: jmallett [3]
Approved by: ed (mentor)


# 191330 20-Apr-2009 rdivacky

Implement highlighting of today in month view of cal/ncal just like
gnu cal does. This is currently disabled for year view because of hard
coded padding in that case. This will hopefully be fixed soon.

Reviewed by: Simon 'corecode' Schubert <corecode fs.ei.tum.de>
Approved by: ed


# 189804 14-Mar-2009 das

Multibyte character support for cal(1).

PR: 131578


# 186401 22-Dec-2008 wollman

Implement a new feature for the "-m" option: if the month number is
followed by 'f' or 'p', use the following or preceding month of that
number, respectively. Document this. Also includes other minor
grammatical and punctuation fixes to the manual page (capitalize
Easter, etc.).

MFC after: 1 month


# 138036 23-Nov-2004 wollman

Add a `-m month' flag to provide a more convenient interface for
displaying a calendar for a specific month of the current year than
`cal $(date +"%Y") month'. A few minor code cleanups. Set WARNS=1.
(This code is WARNS=5 clean except for "`O' modifier used with `%B'
strftime format", which is legal in FreeBSD but GCC doesn't know about.)

MFC after: 1 week


# 104369 02-Oct-2002 roam

Teach ncal(1) about month names specified on the command line.

Reviewed by: -audit
Approved by: silence on -audit
MFC after: 3 weeks


# 95641 28-Apr-2002 markm

Easy warns fixes; constify.


# 78027 10-Jun-2001 ache

Handle ASCII and US-ASCII aliases


# 78016 10-Jun-2001 ache

Remove "SU" - not valid country code
Fix locale comparison with "C", add "POSIX"


# 74618 21-Mar-2001 ache

Properly deal with one char weekdays


# 74612 21-Mar-2001 ache

Uppercase first month letter
Terminate weekday string


# 74573 21-Mar-2001 ache

Use nl_langinfo instead of %EF


# 53963 30-Nov-1999 ache

Use %EF instead of hardcoded order for each country


# 51201 12-Sep-1999 ache

use %OB for months names


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 48566 04-Jul-1999 billf

Clean up some ambiguous nested if/elses.


# 45064 27-Mar-1999 helbig

Due to the switch form Julian to Gregorian calender,
even a whole month might be missing.
This caused a bug for the LN -calender, whose switch was
on Dec 12, 9999.


# 32525 15-Jan-1998 helbig

Handle option -j correctly.
Synchronize usage message with man page.
PR: bin/5488


# 32310 07-Jan-1998 charnier

Sync usage and synopsis. Add rcsid.


# 32282 05-Jan-1998 helbig

1. Don't be confused if the first day of a month is dropped due to
Gregorian Reformation. E. G. in Albania December 1, 1912 doesn't exist.
2. Add some countries in the switch table (BE, FI, LN, LU)
3. Correct some entries from the new found source of calendar knowledge:
http://www.pip.dknet.dk/~c-t/calendar.html,
That is Claus Tondering's Calendar FAQ.


# 32215 03-Jan-1998 helbig

Use locale to guess the switch date.
Localize formatting of date of easter.
Suggested by: ache


# 32139 31-Dec-1997 helbig

Ensure 2 letter abbreviations of weekdays (even if LANG=C
and invoked as "cal").


# 31745 15-Dec-1997 helbig

This commit was generated by cvs2svn to compensate for changes in r31744,
which included commits to RCS files with non-trunk default branches.


# 31744 15-Dec-1997 helbig

Add new command ncal.