-/* $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
*
*
*
* $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
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];
int HD_quit (void)
{
+#ifdef WITH_PPDEV
if (PPdev) {
debug ("closing ppdev %s", PPdev);
if (ioctl(PPfd, PPRELEASE)) {
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));
-/* $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
*
*
*
* $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
*
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
/*
-/* $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
*
*
*
* $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
}
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);