Re: [PATCH 05/10] cal: determine output width at beginning of run and reuse result

Karel Zak
2013-10-31T11:34:59Z

On Sun, Oct 27, 2013 at 08:42:31PM +0000, Sami Kerola wrote:
> +struct cal_width {
> + size_t dy; /* day width in characters in printout */
> + size_t wk; /* week width == (7 * dlen + possible week num) */
> +};

Is it really necessary to have a special struct for this setting? I
see that everywhere in the code you have

ctl.width.wk or ctl.width.wk

what about to add

int day_width;
int week_width;

to the control struct?

BTW, yes, it's C, but ... "dy" and "wk" seems pretty unreadable :-)

Karel

--
Karel Zak <kzak@redhat.com>