summaryrefslogtreecommitdiff
path: root/misc-utils/cal.c
AgeCommit message (Collapse)AuthorFilesLines
2008-04-16cal: use HAVE_LIB{NCURSES,NCURSESW} instead HAVE_NCURSESKarel Zak1-4/+4
The HAVE_NCURSES is obsolete macro. The autotool generates HAVE_LIBxxx macros. Signed-off-by: Karel Zak <kzak@redhat.com>
2008-01-17cal: fix weekday alignment for certain localesPádraig Brady1-63/+86
For example this had too much padding: LANG=zh_CN.utf8 cal -j while this had too little padding: LANG=hu_HU.utf8 cal This had invalid chars: LANG=li_BE.utf8 cal This had too few chars: LANG=si_LK.utf8 cal Note some locales may display with slightly worse alignment (fa_IR.utf8 for example), but that is only because the terminal is not merging the combining characters. This happens on gnome-terminal-2.18.3-1.fc8 at least. Signed-off-by: Pádraig Brady <P@draigBrady.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2007-10-16cal: replace errs.h with libc err.hKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-10-11cal: add support for highlighting an arbitrary datePádraig Brady1-21/+28
This is done by calling cal with the extra day parameter like: cal 14 9 1752 Note the tests were updated to use the new syntax. Note also that this patch changes the -y option to always print a full year, even if a month or the -[13] options are specified. This matches the cal operation from bsdmainutils on debian and also allows one to print a full year while highlighting a particular date. Signed-off-by: Pádraig Brady <P@draigBrady.com>
2007-10-03cal: avoid -Wformat warningsJim Meyering1-2/+2
Avoid this warning from gcc -Wformat: "format not a string literal and no format arguments". Signed-off-by: Jim Meyering <jim@meyering.net>
2007-09-19build-sys: nls/locale handling in util-linux-ng generalMike Frysinger1-1/+0
On Monday 03 September 2007, Karel Zak wrote: > http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/590/focus=592 > > I agree that we need a better support for compilation without > locales, but from my point of view NLS != all locales stuff. The NLS > support is subset only. thinking about the input from everyone, i'd propose the attached ... Only pull in locale.h as needed and move it to the common nls.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2007-07-10cal: add test codeKarel Zak1-1/+10
This patch allows to override the time() and define a different time by TEST_TIME env. variable. The code has to be compiled with -DTEST_CAL. Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-12cal: widechar code cleanupKarel Zak1-21/+17
This patch make widechar code (cal headers initialization) more robust. That's possible to format wide char strings by swprintf() and non-widechar version by sprintf(). This is better than the old solution with wcscat(). Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-12cal: ifdef cleanup, non-curses/tempcap code fixesKarel Zak1-20/+16
This patche: - removes extra #ifdef-s, - fixes \n usage when compiled without curses/termcap Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-12cal: fix a segfault and -3m highlightingKarel Zak1-9/+38
Fixes a segfault for certain values of $TERM Fixes alignment issues when the highlighted day (today) is in the last week of the month. Signed-off-by: Pádraig Brady <P@draigBrady.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-30build-sys: fix ifdef ENABLE_WIDECHAR usageKarel Zak1-8/+8
There has been unexpected mix of HAVE_WIDECHAR and ENABLE_WIDECHAR macros. The ENABLE_WIDECHAR is old version and has to be replaced everywhere otherwise we will see bugs with multibyte stuff. Signed-off-by: Karel Zak <kzak@redhat.com>
2006-12-07Imported from util-linux-2.13-pre2 tarball.Karel Zak1-2/+2
2006-12-07Imported from util-linux-2.13-pre1 tarball.Karel Zak1-17/+17
2006-12-07Imported from util-linux-2.12j tarball.Karel Zak1-164/+268
2006-12-07Imported from util-linux-2.11x tarball.Karel Zak1-0/+2
2006-12-07Imported from util-linux-2.11v tarball.Karel Zak1-1/+1
2006-12-07Imported from util-linux-2.11r tarball.Karel Zak1-1/+1
2006-12-07Imported from util-linux-2.11o tarball.Karel Zak1-3/+6
2006-12-07Imported from util-linux-2.11n tarball.Karel Zak1-4/+28
2006-12-07Imported from util-linux-2.11m tarball.Karel Zak1-17/+83
2006-12-07Imported from util-linux-2.11b tarball.Karel Zak1-1/+1
2006-12-07Imported from util-linux-2.10s tarball.Karel Zak1-9/+104
2006-12-07Imported from util-linux-2.10m tarball.Karel Zak1-5/+2
2006-12-07Imported from util-linux-2.10f tarball.Karel Zak1-9/+14
2006-12-07Imported from util-linux-2.9v tarball.Karel Zak1-23/+17
2006-12-07Imported from util-linux-2.9i tarball.Karel Zak1-15/+36
2006-12-07Imported from util-linux-2.8 tarball.Karel Zak1-6/+0
2006-12-07Imported from util-linux-2.7.1 tarball.Karel Zak1-9/+20
2006-12-07Imported from util-linux-2.5 tarball.Karel Zak1-23/+39
2006-12-07Imported from util-linux-2.2 tarball.Karel Zak1-0/+450