Re-indent CFontzPacket_flush to match file's indent style. Strip trailing spaces.

This commit is contained in:
mmdolze
2009-11-01 10:25:08 +00:00
parent 24338eccd7
commit 6540908435
+17 -13
View File
@@ -477,8 +477,9 @@ CFontzPacket_flush (Driver *drvthis)
if (p->model == 633) {
/*
* For CF633 we don't use delta update yet.
* Older HW/FW types only support updates of full or partial line starting from pos 0.
* For CF633 we don't use delta update yet. Older HW/FW types
* only support updates of full or partial line starting from
* pos 0.
*/
unsigned char *xp = p->framebuf;
unsigned char *xq = p->backingstore;
@@ -504,22 +505,25 @@ CFontzPacket_flush (Driver *drvthis)
}
}
}
else { /* (p->model != 633) */
else {
/*
* CF631 / CF635 protocol is more flexible and we can do real delta update.
* CF631 / CF635 protocol is more flexible and we can do real
* delta update.
*/
for (i = 0; i < p->height; i++) {
/* Strategy:
/*-
* Strategy:
* - not more than one update command per line
* - leave out leading and trailing parts that are identical
* - leave out leading and trailing parts that
* are identical
*/
// set pointers to start of the line in frame buffer & backing store
/* set pointers to start of the line in frame buffer & backing store */
unsigned char *sp = p->framebuf + (i * p->width);
unsigned char *sq = p->backingstore + (i * p->width);
// set pointers to end of the line in frame buffer & backing store
/* set pointers to end of the line in frame buffer & backing store */
unsigned char *ep = sp + (p->width - 1);
unsigned char *eq = sq + (p->width - 1);
int length = 0;
@@ -527,11 +531,11 @@ CFontzPacket_flush (Driver *drvthis)
debug(RPT_DEBUG, "Framebuf: '%.*s'", p->width, sp);
debug(RPT_DEBUG, "Backingstore: '%.*s'", p->width, sq);
// skip over leading identical portions of the line
/* skip over leading identical portions of the line */
for (j = 0; (sp <= ep) && (*sp == *sq); sp++, sq++, j++)
;
// skip over trailing identical portions of the line
/* skip over trailing identical portions of the line */
for (length = p->width - j; (length > 0) && (*ep == *eq); ep--, eq--, length--)
;
@@ -540,8 +544,8 @@ CFontzPacket_flush (Driver *drvthis)
unsigned char out[length + 3];
/* ... send then to the LCD */
out[0] = j; // column
out[1] = i; // line
out[0] = j; /* column */
out[1] = i; /* line */
debug(RPT_DEBUG, "%s: l=%d c=%d count=%d string='%.*s'",
__FUNCTION__, out[0], out[1], length, length, sp);
@@ -550,7 +554,7 @@ CFontzPacket_flush (Driver *drvthis)
send_bytes_message(p->fd, CF633_Send_Data_to_LCD, length + 2, out);
modified++;
}
} // i < p->height
} /* i < p->height */
if (modified)
memcpy(p->backingstore, p->framebuf, p->width * p->height);