aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--HD44780.c13
-rw-r--r--mail.c17
-rw-r--r--processor.c11
3 files changed, 27 insertions, 14 deletions
diff --git a/HD44780.c b/HD44780.c
index 0832d57..a92d051 100644
--- a/HD44780.c
+++ b/HD44780.c
@@ -1,4 +1,4 @@
-/* $Id: HD44780.c,v 1.18 2001/03/15 09:47:13 reinelt Exp $
+/* $Id: HD44780.c,v 1.19 2001/03/15 15:49:22 ltoetsch Exp $
*
* driver for display modules based on the HD44780 chip
*
@@ -20,6 +20,9 @@
*
*
* $Log: HD44780.c,v $
+ * Revision 1.19 2001/03/15 15:49:22 ltoetsch
+ * fixed compile HD44780.c, cosmetics
+ *
* Revision 1.18 2001/03/15 09:47:13 reinelt
*
* some fixes to ppdef
@@ -182,7 +185,10 @@ static LCD Lcd;
static unsigned short Port=0;
static char *PPdev=NULL;
+
+#ifdef WITH_PPDEV
static int PPfd=-1;
+#endif
static char Txt[4][40];
static BAR Bar[4][40];
@@ -754,6 +760,7 @@ int HD_flush (void)
int HD_quit (void)
{
+#ifdef WITH_PPDEV
if (PPdev) {
debug ("closing ppdev %s", PPdev);
if (ioctl(PPfd, PPRELEASE)) {
@@ -763,7 +770,9 @@ int HD_quit (void)
error ("close(%s) failed: %s", PPdev, strerror(errno));
return -1;
}
- } else {
+ } else
+#endif
+ {
debug ("closing raw port 0x%x", Port);
if (ioperm(Port, 3, 0)!=0) {
error ("HD44780: ioperm(0x%x) failed: %s", Port, strerror(errno));
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
/*
diff --git a/processor.c b/processor.c
index fdda661..ad87868 100644
--- a/processor.c
+++ b/processor.c
@@ -1,4 +1,4 @@
-/* $Id: processor.c,v 1.21 2001/03/15 09:47:13 reinelt Exp $
+/* $Id: processor.c,v 1.22 2001/03/15 15:49:23 ltoetsch Exp $
*
* main data processing
*
@@ -20,6 +20,9 @@
*
*
* $Log: processor.c,v $
+ * Revision 1.22 2001/03/15 15:49:23 ltoetsch
+ * fixed compile HD44780.c, cosmetics
+ *
* Revision 1.21 2001/03/15 09:47:13 reinelt
*
* some fixes to ppdef
@@ -460,12 +463,6 @@ static void print_token (int token, char **p, char *start, int maxlen)
}
break;
- case T_MAIL:
- case T_MAIL_UNSEEN:
- val=query(token);
- *p+=sprintf (*p, "%3.0f", val);
- break;
-
case T_EXEC:
i = (token>>8)-'0';
*p+=sprintf (*p, "%.*s",cols-(*p-start), exec[i].s);