public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [0000/0010] cal: code revisit part I
@ 2013-10-27 20:42 Sami Kerola
  2013-10-27 20:42 ` [PATCH 01/10] cal: use control structure for run time configuration Sami Kerola
                   ` (10 more replies)
  0 siblings, 11 replies; 16+ messages in thread
From: Sami Kerola @ 2013-10-27 20:42 UTC (permalink / raw)
  To: util-linux; +Cc: kerolasa

Hi Karel, and others,

I promised earlier to put some effort in making the cal(1) a little bit
less messy.  The patch set begins by adding a structure that contains
what user wants.  Last two changes are hopefully most interesting.  They
add run time configuration that is filled, and used later.

I got the --one and --three outputs working, but I am not completely
happy about the --three.  Quite frankly better function would take input
how many horizontal calendar outputs are needed, and would do exactly
that.  Such function would be more reusable when considering yearly
output, and the fact it has two column output when in julian mode.

Karel, it is be best not to merge the last patch.  It is more of
work-in-progress, comments would be great.


The following changes since commit 433d05ff9afeb4a374943cb35d1b8b19613c8039:

  libfdisk: (gpt) allow to work with hybrid GPT (2013-10-23 16:59:45 +0200)

are available in the git repository at:

  git://github.com/kerolasa/lelux-utiliteetit.git cal-ng

for you to fetch changes up to 69e4ed597fb54710cdc3337e3af14aedbc2f481c:

  cal: make cal --three to use content structures (2013-10-27 20:27:49 +0000)

----------------------------------------------------------------
Sami Kerola (10):
      cal: use control structure for run time configuration
      cal: add input variable names to function prototypes
      cal: make day_in_week() use same variable names as other functions
      cal: simplify ascii_wnum() function
      cal: determine output width at beginning of run and reuse result
      tests: cal: take account week numbers when determing month lenght
      cal: make user request to be part of read-only control struct
      cal: determine how many header lines are needed at initialization
      cal: add month contents structure
      cal: make cal --three to use content structures

 misc-utils/cal.c            | 637 +++++++++++++++++++++++++++-----------------
 tests/expected/cal/bigyearw |  12 +-
 2 files changed, 391 insertions(+), 258 deletions(-)



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-11-01  9:29 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-27 20:42 [0000/0010] cal: code revisit part I Sami Kerola
2013-10-27 20:42 ` [PATCH 01/10] cal: use control structure for run time configuration Sami Kerola
2013-10-31 11:29   ` Karel Zak
2013-10-27 20:42 ` [PATCH 02/10] cal: add input variable names to function prototypes Sami Kerola
2013-10-27 20:42 ` [PATCH 03/10] cal: make day_in_week() use same variable names as other functions Sami Kerola
2013-10-27 20:42 ` [PATCH 04/10] cal: simplify ascii_wnum() function Sami Kerola
2013-10-27 20:42 ` [PATCH 05/10] cal: determine output width at beginning of run and reuse result Sami Kerola
2013-10-31 11:34   ` Karel Zak
2013-10-27 20:42 ` [PATCH 06/10] tests: cal: take account week numbers when determing month lenght Sami Kerola
2013-10-27 20:42 ` [PATCH 07/10] cal: make user request to be part of read-only control struct Sami Kerola
2013-10-31 11:49   ` Karel Zak
2013-11-01  9:29     ` Sami Kerola
2013-10-27 20:42 ` [PATCH 08/10] cal: determine how many header lines are needed at initialization Sami Kerola
2013-10-27 20:42 ` [PATCH 09/10] cal: add month contents structure Sami Kerola
2013-10-27 20:42 ` [PATCH 10/10] cal: make cal --three to use content structures Sami Kerola
2013-10-31 12:14 ` [0000/0010] cal: code revisit part I Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox