Re: [PATCH 14/16] cal: move global variables to local scope

Karel Zak
2013-05-14T10:49:43Z

On Thu, May 02, 2013 at 07:51:39PM +0100, Sami Kerola wrote:
> Also include small change to function parameter coding style. The braces
> are from function line to new line, and return value is in same line with
> the function.

The version you send to mailing list seems correct, but the version
in your cal-again branch is completely broken. It's obvious that
nobody has tried "make cal" for the branch :-(

Anyway, I'm really not sure if this change:

> -void monthly(int, int, int);
> +void monthly(const int, const int, const char *, const char **, int, int, int);

makes the code more readable. Maybe you can drop the patch at all for now.

From long term point of view it would be better to introduce
'cal_context' struct for all the stuff. It's a way how to make the
code more readable and extendible.

Karel

--
Karel Zak <kzak@redhat.com>