aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorltoetsch <ltoetsch@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2001-03-16 09:28:08 +0000
committerltoetsch <ltoetsch@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2001-03-16 09:28:08 +0000
commit8cb47a24a9ab1b5bbf81819d4567be4308db2b54 (patch)
treed9f5d967aa61555c0e264ebb36e0739f64bfb171
parentf28003f1779e7e560ccc70e90d88b376208f6cd6 (diff)
downloadlcd4linux-8cb47a24a9ab1b5bbf81819d4567be4308db2b54.tar.gz
[lcd4linux @ 2001-03-16 09:28:08 by ltoetsch]
bugfixes git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@126 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to '')
-rw-r--r--README.Text6
-rw-r--r--TODO5
-rw-r--r--Text.c14
-rw-r--r--mail2.c9
-rw-r--r--processor.c12
5 files changed, 35 insertions, 11 deletions
diff --git a/README.Text b/README.Text
index 77d419d..465f0d3 100644
--- a/README.Text
+++ b/README.Text
@@ -1,5 +1,5 @@
#
-# $Id: README.Text,v 1.1 2001/03/09 13:08:11 ltoetsch Exp $
+# $Id: README.Text,v 1.2 2001/03/16 09:28:08 ltoetsch Exp $
#
This is the README file for the Text display driver for lcd4linux.
@@ -14,7 +14,9 @@ size: [columns]x[rows], e.g. "20x4"
TextBar: if this is set, Bars display the values max, len1 and len2.
Of course, lcd4linux should be started in the foreground with this driver.
-The driver shows also a window with lcd4linux's diagnostics.
+
+The driver shows also a window with lcd4linux's diagnostics. In this window
+CR and LF are displayed as underscores.
Example:
./lcd4linux -q -vv -F -cDisplay=Text -ctick=1000 -ctack=1000
diff --git a/TODO b/TODO
index a7c15ca..e3528cd 100644
--- a/TODO
+++ b/TODO
@@ -78,5 +78,6 @@ add a new Token 'nc' for 'network collisions'
add translation tables ('german umlauts' don't
follow any scheme on most displays)
-2001-03-15 Leopold Toetsch <lt@toetsch.at>
-Text display has troubles with '\r'
+// 2001-03-15 Leopold Toetsch <lt@toetsch.at>
+// Text display has troubles with '\r'
+// done 2001-03-16, replace \r,\n with '_' -lt
diff --git a/Text.c b/Text.c
index 9138c0b..1468947 100644
--- a/Text.c
+++ b/Text.c
@@ -1,4 +1,4 @@
-/* $Id: Text.c,v 1.2 2001/03/09 15:04:53 reinelt Exp $
+/* $Id: Text.c,v 1.3 2001/03/16 09:28:08 ltoetsch Exp $
*
* pure ncurses based text driver
*
@@ -20,6 +20,9 @@
*
*
* $Log: Text.c,v $
+ * Revision 1.3 2001/03/16 09:28:08 ltoetsch
+ * bugfixes
+ *
* Revision 1.2 2001/03/09 15:04:53 reinelt
*
* rename 'raster' to 'Text in Text.c
@@ -115,6 +118,7 @@ int Text_init (LCD *Self)
delwin(w);
w = newwin(rows+2,cols+2,0,0);
err_rows = scr_rows-rows-3;
+ err_rows = min(99, err_rows);
if (err_rows >= 4) {
err_win = newwin(err_rows, scr_cols, rows+3, 0);
err_rows -= 3;
@@ -134,8 +138,12 @@ int curs_err(char *buffer)
static int lines;
static char *lb[100];
int start, i;
+ char *p;
if (err_win) {
+ /* replace \r, \n with underscores */
+ while ((p = strpbrk(buffer, "\r\n")) != NULL)
+ *p='_';
if (lines >= err_rows) {
free(lb[0]);
for (i=1; i<=err_rows; i++)
@@ -161,6 +169,10 @@ int curs_err(char *buffer)
int Text_put (int row, int col, char *text)
{
+ char *p;
+
+ if ((p = strpbrk(text, "\r\n")) != NULL)
+ *p='\0';
if (col < Lcd.cols)
mvwprintw(w, row+1 , col+1, "%.*s", Lcd.cols-col, text);
return 0;
diff --git a/mail2.c b/mail2.c
index af095fc..c26830f 100644
--- a/mail2.c
+++ b/mail2.c
@@ -1,4 +1,4 @@
-/* $Id: mail2.c,v 1.3 2001/03/15 14:25:05 ltoetsch Exp $
+/* $Id: mail2.c,v 1.4 2001/03/16 09:28:08 ltoetsch Exp $
*
* mail: pop3, imap, news functions
*
@@ -20,6 +20,9 @@
*
*
* $Log: mail2.c,v $
+ * Revision 1.4 2001/03/16 09:28:08 ltoetsch
+ * bugfixes
+ *
* Revision 1.3 2001/03/15 14:25:05 ltoetsch
* added unread/total news
*
@@ -222,11 +225,11 @@ static int check_nntp(char *user, char *pass, char *machine,
err = 0;
totg = unsg = 0; /* total, unseen */
while (fgets(line, sizeof(line)-1, fp) && err < 5) {
- char group[BUFLEN];
+ char group[256];
char *p;
int smin, smax, lmin, lmax;
- if (sscanf(line, "%s:", group) != 1) {
+ if (sscanf(line, "%255[^:]:", group) != 1) {
error("Couldn't read group in '%s'", line);
err++;
continue;
diff --git a/processor.c b/processor.c
index ad87868..76ff683 100644
--- a/processor.c
+++ b/processor.c
@@ -1,4 +1,4 @@
-/* $Id: processor.c,v 1.22 2001/03/15 15:49:23 ltoetsch Exp $
+/* $Id: processor.c,v 1.23 2001/03/16 09:28:08 ltoetsch Exp $
*
* main data processing
*
@@ -20,6 +20,9 @@
*
*
* $Log: processor.c,v $
+ * Revision 1.23 2001/03/16 09:28:08 ltoetsch
+ * bugfixes
+ *
* Revision 1.22 2001/03/15 15:49:23 ltoetsch
* fixed compile HD44780.c, cosmetics
*
@@ -561,8 +564,11 @@ static char *process_row (int r)
if (*s=='%') {
token = *(unsigned char*)++s;
if (token>T_EXTENDED) token += (*(unsigned char*)++s)<<8;
- for (q = p, len=0; *q && isspace(*q); q++)
- len++;
+ if (!s[1])
+ len = cols - (s - row[r] - 1);
+ else
+ for (q = s+1, len=0; *q && isspace(*q); q++)
+ len++;
print_token (token, &p, buffer, len);
} else if (*s=='$') {
ass='logmsg'> git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1148 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2011-07-27st2205-width-height-swap.patch from Hans de Goedemichael1-2/+2 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1147 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2011-07-27hwmon patch from Hans de Goedemichael1-0/+14 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1146 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2011-07-27patch to support SureElectronicsDE-LD023 from Matt Joicemichael1-3/+16 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1145 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2011-05-06Fixed keypad widget in GLCD2USBharbaum1-0/+7 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1144 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2011-02-12timer.c: fixed detection of positive clock skew (and some typos)mzuther4-10/+10 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1143 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2011-01-23timer.c: fixed clock skew detectionmzuther1-26/+46 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1142 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2011-01-23timer.c: skip intermediate timer intervalsmzuther2-16/+46 "timer_inc()" now checks how many trigger intervals have passed since a given timer has been updated. This might be due to "negative clock skew" (think of summer time) or the fact that some processing took too long (i.e. fetching of a web site). These missed trigger intervals are then skipped and the user is notified so that he may adapt his timer settings. This handling is essential, otherwise unprocessed timers might stack up and would trigger continuously while at the same time becoming notoriously late and unreliable. git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1141 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2011-01-05fix for a bug introduced in the DE-LD021 drivermichael1-3/+3 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1140 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2011-01-04indentationmichael2-3/+3 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1139 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2011-01-04support for Sure Electronics DE-LD021 by Natanael Olaizmichael1-10/+8 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1138 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2011-01-02driver for EFN LED modules by Tilman Glötznermichael9-21/+469 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1137 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2010-11-28commented, corrected and beautified both timer and timer group codemzuther11-197/+511 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1136 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2010-11-27finished commenting the timer codemzuther2-46/+138 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1135 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2010-11-20started commenting the timer codemzuther5-52/+170 I'm not done yet, but my system is currently very unstable, and I don't want the changes to get lost... :( git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1134 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2010-11-19Added brightness support for GLCD2USBharbaum5-28/+8014 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1133 3ae390bd-cb1e-0410-b409-cd5a39f66f1f