Package: bsdmainutils
Version: 6.0.17
Severity: normal
Tags: patch

I'm using calendar until now without big problems but I like to see
the weekend's events again. I don't make aliases for calendar and the
output of calendar is as follows:

# start
$ date
Fri Feb  4 20:34:13 BRST 2005
$ calendar
Feb 04  Cybernet inaugurated, 1969
Feb 04  Patricia Hearst kidnapped by Symbionese Liberation Army, 1974
(...)
Feb 05  Bonne fÃte aux Agathe !
Feb 05  Pour la sainte Agathe, sÃme ton oignon,
        FÃt-il dans la glace, il deviendra bon.
$ calendar -w 50
Feb 04  Cybernet inaugurated, 1969
Feb 04  Patricia Hearst kidnapped by Symbionese Liberation Army, 1974
(...)
Feb 05  Bonne fÃte aux Agathe !
Feb 05  Pour la sainte Agathe, sÃme ton oignon,
        FÃt-il dans la glace, il deviendra bon.
$
# end

I don't have (big) problems with character sets.

The right output ends on Feb/7 (and not on Feb/5) because today is a
Fri and the last command have to show a lot lines.

The patch can be very sample (as follows) but I'm unsure of the
correct behavior of the command line flags. I see the OpenBSD version
of this code and the output will differ a bit (before and after). Is
this right?

diff -du3ra --unidirectional-new-file 
bsdmainutils-6.0.17-old/usr.bin/calendar/day.c 
bsdmainutils-6.0.17/usr.bin/calendar/day.c
--- bsdmainutils-6.0.17-old/usr.bin/calendar/day.c      2004-11-01 
14:00:48.000000000 -0300
+++ bsdmainutils-6.0.17/usr.bin/calendar/day.c  2005-02-04 20:04:48.000000000 
-0200
@@ -381,7 +381,7 @@
         * leap years).  Only one event can match, and it's easy to find.
         * Note we can't check special events, because they can wander widely.
         */
-               if (((v1 = lookahead) < 50) && (interval == YEARLY)) {
+               if (((v1 = offset) < 50) && (interval == YEARLY)) {
                        memcpy(&tmtmp, tp, sizeof(struct tm));
                        tmtmp.tm_mday = dayp;
                        tmtmp.tm_mon = monthp - 1;
@@ -506,7 +506,7 @@
                                warnx("time out of range: %ls", endp);
                        else {
                                tdiff = difftime(ttmp, f_time)/ SECSPERDAY;
-                               if (tdiff <= lookahead || (bodun && tdiff == 
-1)) {
+                               if (tdiff <= offset || (bodun && tdiff == -1)) {
                                        if (tdiff >=  0 ||
                                            (bodun && tdiff == -1)) {
                                        if ((tmp = malloc(sizeof(struct 
match))) == NULL)


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (150, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.10
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages bsdmainutils depends on:
ii  bsdutils                    1:2.12p-2    Basic utilities from 4.4BSD-Lite
ii  debconf [debconf-2.0]       1.4.42       Debian configuration management sy
ii  debianutils                 2.11.2       Miscellaneous utilities specific t
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  libncurses5                 5.4-4        Shared libraries for terminal hand

-- debconf information:
  bsdmainutils/calendar_lib_is_not_empty:
  bsdmainutils/calendar_config_moved:


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to