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

Simon Schubert corecode at crater.dragonflybsd.org
Wed May 6 14:31:09 PDT 2009


commit 5a8256dd5646d3f6d6802bb9eb41f286e965d317
Author: Simon Schubert <corecode at 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





More information about the Commits mailing list