mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-17 06:48:47 +02:00
Fixed bug in TkRemind which caused a crash if "-m" option was used for
a month beginning on a Sunday.
This commit is contained in:
@@ -15,6 +15,9 @@ CHANGES TO REMIND
|
||||
|
||||
- Fixed confusing error in rem2ps help messages.
|
||||
|
||||
- Fixed bug in TkRemind which caused a crash if the "-m" option was used
|
||||
for a month beginning on Sunday. Doh!!!
|
||||
|
||||
* Version 3.0 Patch 14
|
||||
|
||||
+ CHANGE IN COPYING POLICY
|
||||
|
||||
7
tkremind
7
tkremind
@@ -11,7 +11,7 @@
|
||||
#
|
||||
#--------------------------------------------------------------
|
||||
|
||||
# $Id: tkremind,v 1.8 1996-09-28 01:43:17 dfs Exp $
|
||||
# $Id: tkremind,v 1.9 1996-09-28 19:14:37 dfs Exp $
|
||||
|
||||
# the next line restarts using wish \
|
||||
exec wish "$0" "$@"
|
||||
@@ -160,9 +160,12 @@ proc GetWeekdayNames {} {
|
||||
# day -- day whose row number is needed
|
||||
#---------------------------------------------------------------------------
|
||||
proc RowNumber {firstDay mondayFirst day} {
|
||||
# If month starts on Sunday, but Monday is in first column, handle it...
|
||||
set adjust 0
|
||||
if {$mondayFirst && !$firstDay} {incr adjust}
|
||||
set modDay [expr $day - $mondayFirst]
|
||||
if { $modDay < 0 } { set modDay 6 }
|
||||
return [expr ($modDay + $firstDay - 1) / 7 + 1]
|
||||
return [expr ($modDay + $firstDay - 1) / 7 + 1 + $adjust]
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user