> + struct cal_month m1, m2, m3, *i; > + int first_month; > + long first_year; > + > + m1.next = &m2; > + m2.next = &m3; > + m3.next = NULL; ... > + set_consecutive_months(&m1, first_month, first_year); Maybe you can add something like: m1 = cal_new_months(clt->req); to allocate and initialize all necessary months and join all to the list according to the user's request (where should be info if whole year or 1 or 3 months are requested). And then ... cal_free_months() Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html