From c458e2f7039e4447f51ce21edb3e3d60fb697576 Mon Sep 17 00:00:00 2001 From: Kim Woelders Date: Wed, 17 Sep 2008 20:13:49 +0000 Subject: [PATCH] Fix dox links followed by punctuation. SVN revision: 36060 --- dox/format.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/dox/format.c b/dox/format.c index 97999c70..bb1c16f2 100644 --- a/dox/format.c +++ b/dox/format.c @@ -745,8 +745,22 @@ RenderPage(Window win, int page_num, int w, int h) { wd[j++] = '\0'; strcpy(link_link, wd + j); - link_link[strlen(link_link) - 1] = '\0'; - strcpy(wd, link_txt); + k = strlen(link_link) - 1; + if (k <= 0) + continue; + for (j = k; j > 0 && link_link[j] != ')'; j--) + ; + if (j < k) + { + link_link[j] = '\0'; + strcpy(wd, link_txt); + strcat(wd, link_link + j + 1); + } + else + { + link_link[k] = '\0'; + strcpy(wd, link_txt); + } islink = 2; } else