From 6bbf3e5f2e6777feeaf19e42d9c8bb5b2da0a428 Mon Sep 17 00:00:00 2001 From: Frederic Culot Date: Tue, 16 Jan 2007 07:49:54 +0000 Subject: use of getstring() defines --- src/recur.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/recur.c') diff --git a/src/recur.c b/src/recur.c index ac66521..8f13cca 100755 --- a/src/recur.c +++ b/src/recur.c @@ -1,8 +1,8 @@ -/* $calcurse: recur.c,v 1.18 2006/12/15 15:26:05 culot Exp $ */ +/* $calcurse: recur.c,v 1.19 2007/01/16 07:51:47 culot Exp $ */ /* * Calcurse - text-based organizer - * Copyright (c) 2004-2006 Frederic Culot + * Copyright (c) 2004-2007 Frederic Culot * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -562,21 +562,22 @@ void recur_repeat_item(int sel_year, int sel_month, int sel_day, while (freq == 0) { status_mesg(mesg_freq_1, ""); - if (getstring(swin, colr, user_input, MAX_LENGTH, 0, 1) == 0) { + if (getstring(swin, colr, user_input, MAX_LENGTH, 0, 1) == + GETSTRING_VALID) { freq = atoi(user_input); if (freq == 0) { status_mesg(mesg_wrong_freq, wrong_type_2); wgetch(swin); } user_input[0] = '\0'; - } else { + } else return; - } } while (!date_entered) { status_mesg(mesg_until_1, ""); - if (getstring(swin, colr, user_input, 11, 0, 1) == 0) { + if (getstring(swin, colr, user_input, 11, 0, 1) == + GETSTRING_VALID) { if (strlen(user_input) == 1 && strncmp(user_input, "0", 1) == 0 ) { until = 0; @@ -602,9 +603,8 @@ void recur_repeat_item(int sel_year, int sel_month, int sel_day, date_entered = 0; } } - } else { + } else return; - } } date = date2sec(sel_year, sel_month, sel_day, 0, 0); -- cgit v1.2.3-54-g00ecf