aboutsummaryrefslogtreecommitdiffstats
path: root/mail.c
diff options
context:
space:
mode:
authorltoetsch <ltoetsch@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2001-03-15 15:49:23 +0000
committerltoetsch <ltoetsch@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2001-03-15 15:49:23 +0000
commitf28003f1779e7e560ccc70e90d88b376208f6cd6 (patch)
tree64c5a9fdad30453afad2161d9a5ea98af4cdbf69 /mail.c
parentcafef33d38d19a9075897b7484a5cb2c594da1da (diff)
downloadlcd4linux-f28003f1779e7e560ccc70e90d88b376208f6cd6.tar.gz
[lcd4linux @ 2001-03-15 15:49:22 by ltoetsch]
fixed compile HD44780.c, cosmetics git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@125 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'mail.c')
-rw-r--r--mail.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/mail.c b/mail.c
index 1815809..7e07118 100644
--- a/mail.c
+++ b/mail.c
@@ -1,4 +1,4 @@
-/* $Id: mail.c,v 1.7 2001/03/15 14:25:05 ltoetsch Exp $
+/* $Id: mail.c,v 1.8 2001/03/15 15:49:23 ltoetsch Exp $
*
* email specific functions
*
@@ -20,6 +20,9 @@
*
*
* $Log: mail.c,v $
+ * Revision 1.8 2001/03/15 15:49:23 ltoetsch
+ * fixed compile HD44780.c, cosmetics
+ *
* Revision 1.7 2001/03/15 14:25:05 ltoetsch
* added unread/total news
*
@@ -95,14 +98,18 @@ int Mail (int index, int *num, int *unseen)
if (index<0 || index>MAILBOXES) return -1;
- if (now[index] == 0) { /* not first time, to give faster a chance */
- now[index] = -1;
+ if (now[index] == 0) { /* first time, to give faster a chance */
+ now[index] = -1-index;
+ return 0;
+ }
+ if (now[index] < -1) { /* wait different time to avoid long startup */
+ now[index]++;
return 0;
}
- if (now[index] > 0) { /* first time, immediately, else wait */
+ if (now[index] > 0) { /* not first time, delay */
sprintf(txt1, "Delay_e%d", index);
if (time(NULL)<=now[index]+atoi(cfg_get(txt1)?:"5"))
- return 0; // More then 5/Delay_eX seconds after last check?
+ return 0; // no more then 5/Delay_eX seconds after last check?
}
time(&now[index]); // for Mailbox #index
/*