mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Limit summary lines to 150 characters in threaded mode
SVN revision: 1489
This commit is contained in:
parent
14242294bd
commit
7d88d100ef
15
src/elogd.c
15
src/elogd.c
@ -6,6 +6,9 @@
|
|||||||
Contents: Web server program for Electronic Logbook ELOG
|
Contents: Web server program for Electronic Logbook ELOG
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.752 2005/09/18 14:00:46 ritt
|
||||||
|
Limit summary lines to 150 characters in threaded mode
|
||||||
|
|
||||||
Revision 1.751 2005/09/18 13:45:31 ritt
|
Revision 1.751 2005/09/18 13:45:31 ritt
|
||||||
Limit summary lines to 40 characters
|
Limit summary lines to 40 characters
|
||||||
|
|
||||||
@ -15545,10 +15548,18 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode,
|
|||||||
rsprintf("<tr><td class=\"summary\">");
|
rsprintf("<tr><td class=\"summary\">");
|
||||||
|
|
||||||
if (expand == 2) {
|
if (expand == 2) {
|
||||||
for (i = i_line = 0; i < (int) sizeof(str) - 1; i++) {
|
for (i = i_line = line_len = 0; i < (int) sizeof(str) - 1; i++,line_len++) {
|
||||||
str[i] = text[i];
|
str[i] = text[i];
|
||||||
if (str[i] == '\n')
|
if (str[i] == '\n') {
|
||||||
i_line++;
|
i_line++;
|
||||||
|
line_len = 0;
|
||||||
|
} else
|
||||||
|
/* limit line length to 150 characters */
|
||||||
|
if (line_len > 150 && text[i] == ' ') {
|
||||||
|
str[i] = '\n';
|
||||||
|
i_line++;
|
||||||
|
line_len = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (i_line == n_line)
|
if (i_line == n_line)
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user