DragonFly commits List (threaded) for 2009-05
DragonFly BSD
DragonFly commits List (threaded) for 2009-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

DragonFly-2.3.0.896.g5a8256 master usr.bin/ncal ncal.c


From: Simon Schubert <corecode@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 6 May 2009 14:30:15 -0700 (PDT)

commit 5a8256dd5646d3f6d6802bb9eb41f286e965d317
Author: Simon Schubert <corecode@dragonflybsd.org>
Date:   Wed May 6 11:00:23 2009 +0200

    ncal: always generate full lines to enable today hilight in year view
    
    Ncal would only fill lines up to the last day in a month and use a printf
    padding later to align all output nicely (when using year view).  This
    breaks when using a hilight, because the ANSI sequences consume additional
    characters which are of zero print width.  Instead of letting printf do
    the padding, generate padded lines ourselves.
    
    Also avoid code duplication in the hilight code and switch on hilighting
    for the year view.

Summary of changes:
 usr.bin/ncal/ncal.c |  120 ++++++++++++++++++++++++--------------------------
 1 files changed, 58 insertions(+), 62 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5a8256dd5646d3f6d6802bb9eb41f286e965d317


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]