mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-10 18:23:28 +00:00
Automatic hot links terminated with a '.' get correctly displayed
SVN revision: 793
This commit is contained in:
parent
c63024399c
commit
f2ba0ff6e9
12
src/elogd.c
12
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.264 2004/02/25 14:39:26 midas
|
||||||
|
Automatic hot links terminated with a '.' get correctly displayed
|
||||||
|
|
||||||
Revision 1.263 2004/02/25 10:22:22 midas
|
Revision 1.263 2004/02/25 10:22:22 midas
|
||||||
Made 'subst <attrib> = $<attrib>' work correctly
|
Made 'subst <attrib> = $<attrib>' work correctly
|
||||||
|
|
||||||
@ -4272,11 +4275,18 @@ void rsputs2(const char *str)
|
|||||||
if (strncmp(str + i, list[l], strlen(list[l])) == 0) {
|
if (strncmp(str + i, list[l], strlen(list[l])) == 0) {
|
||||||
p = (char *) (str + i + strlen(list[l]));
|
p = (char *) (str + i + strlen(list[l]));
|
||||||
i += strlen(list[l]);
|
i += strlen(list[l]);
|
||||||
for (k = 0; *p && strcspn(p, " ,\t\n\r({[)}]"); k++, i++)
|
for (k = 0; *p && strcspn(p, " ,;\t\n\r({[)}]"); k++, i++)
|
||||||
link[k] = *p++;
|
link[k] = *p++;
|
||||||
link[k] = 0;
|
link[k] = 0;
|
||||||
i--;
|
i--;
|
||||||
|
|
||||||
|
/* link may not end with a '.' (like in a sentence) */
|
||||||
|
if (link[k-1] == '.') {
|
||||||
|
link[k-1] = 0;
|
||||||
|
k--;
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
|
||||||
/* check if link contains coloring */
|
/* check if link contains coloring */
|
||||||
p = strchr(link, '\001');
|
p = strchr(link, '\001');
|
||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user