From 24968886824da7d4af308a113d550f4dc97bba48 Mon Sep 17 00:00:00 2001 From: Frederic Culot Date: Wed, 4 Apr 2007 19:38:18 +0000 Subject: MAX_LENGTH replaced by stdio.h's BUFSIZ --- src/recur.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/recur.c') diff --git a/src/recur.c b/src/recur.c index 5f8467c..48d5db6 100755 --- a/src/recur.c +++ b/src/recur.c @@ -1,4 +1,4 @@ -/* $calcurse: recur.c,v 1.23 2007/03/10 16:48:19 culot Exp $ */ +/* $calcurse: recur.c,v 1.24 2007/04/04 19:38:18 culot Exp $ */ /* * Calcurse - text-based organizer @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -121,7 +122,9 @@ struct recur_event_s *recur_event_new(char *mesg, long day, int id, * Correspondance between the defines on recursive type, * and the letter to be written in file. */ -char recur_def2char(int define){ +char +recur_def2char(int define) +{ char recur_char; switch (define) { @@ -138,7 +141,8 @@ char recur_def2char(int define){ recur_char = 'Y'; break; } - return recur_char; + + return (recur_char); } /* @@ -572,7 +576,7 @@ recur_repeat_item(int sel_year, int sel_month, int sel_day, int ch = 0; int valid_date = 0, date_entered = 0; int year = 0, month = 0, day = 0; - char user_input[MAX_LENGTH] = ""; + char user_input[BUFSIZ] = ""; char *mesg_type_1 = _("Enter the repetition type: (D)aily, (W)eekly, (M)onthly, (Y)early"); char *mesg_type_2 = _("[D/W/M/Y] "); @@ -617,7 +621,7 @@ recur_repeat_item(int sel_year, int sel_month, int sel_day, while (freq == 0) { status_mesg(mesg_freq_1, ""); - if (getstring(swin, user_input, MAX_LENGTH, 0, 1) == + if (getstring(swin, user_input, BUFSIZ, 0, 1) == GETSTRING_VALID) { freq = atoi(user_input); if (freq == 0) { -- cgit v1.2.3-54-g00ecf