Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include file hotlinks, with "../" in path, not working (Origin: bugzilla #634962) #4018

Open
doxygen opened this issue Jul 2, 2018 · 1 comment

Comments

@doxygen
Copy link
Owner

doxygen commented Jul 2, 2018

status REOPENED severity normal in component general for ---
Reported in version 1.7.2 on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2010-11-16 01:59:46 +0000, Albert Castillo wrote:

Created attachment 174580
Doxygen configuration file

Using Doxygen for Windows: v1.7.2
Windows XP, SP3

I have a source file which includes these files (excerpt from the included
and source files in the generated documentation):

00036 #include "../hw_ints.h"
00037 #include "../hw_memmap.h"
00038 #include "../hw_nvic.h"
00039 #include "../hw_sysctl.h"
00040 #include "../hw_types.h"
00041 #include "cpu.h"
00042 #include "debug.h"
00043 #include "interrupt.h"
00044 #include "sysctl.h"


Problem: For lines # 41-44, the file names are actually hotlinks in the HTML
files so that I can just click on them to go to the source code. But, for
the included files which start with "../", the file names are not hotlinked.
I cannot click on the file name to go to the source file.

In the actual documentation, the include files which start with "../" are
correctly parsed and documented though. Just the hot links to these files
does not work. These hot links are great and save time moving around the
source code. Please fix this as it is an important and useful feature....

On 2010-12-03 22:46:40 +0000, Dimitri van Heesch wrote:

Confirmed. Should be fixed in the next subversion update.

On 2011-01-03 19:01:13 +0000, Dimitri van Heesch wrote:

This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.3. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional
information
that you think can be relevant.

On 2012-02-07 12:54:56 +0000, Jens.Bohrmann@hydac.com wrote:

In current Version 1.7.6.1 the bug is present again.

On 2013-08-24 13:56:17 +0000, albert wrote:

Created attachment 253011
Example source code showing the problem

The problem, non hyperlinked ../hw_ints.h in source code, is still present.
The problem can be seen in the source code of file s1.c.

Tested the following versions:
1.7.2, 1.7.4, 1.7.6.1 and 1.8.5 problem present
1.7.3 problem not present
@albert-github
Copy link
Collaborator

albert-github commented Sep 12, 2020

I had a look at the problem and it looks to me that it has to do with the handling of the include file rule:

<ReadInclude>[^\n\"\>]+/(">"|"\"")

in code.l
In the 1.7.2 version we see here:

                                          FileDef *fd=0;
                                          //printf("looking for include %s\n",yytext);
                                          if ((fd=findFileDef(Doxygen::inputNameDict,yytext,ambig)) &&
                                              fd->isLinkable())
                                          {

in the 1.7.3 version (so some handling for relative paths is added):

                                          FileDef *fd=0;
                                          QCString absPath = yytext;
                                          if (g_sourceFileDef && QDir::isRelativePath(absPath))
                                          {
                                            absPath = QDir::cleanDirPath(g_sourceFileDef->getPath()+"/"+absPath);
                                          }

                                          //printf("looking for include %s -> %s\n",yytext,absPath.data());
                                          if ((fd=findFileDef(Doxygen::inputNameDict,absPath,ambig)) &&
                                              fd->isLinkable())
                                          {

and in the 1.7.4 version (the handling for the relative path is removed again):

                                          //QCString absPath = yytext;
                                          //if (g_sourceFileDef && QDir::isRelativePath(absPath))
                                          //{
                                          //  absPath = QDir::cleanDirPath(g_sourceFileDef->getPath()+"/"+absPath);
                                          //}

                                          FileDef *fd=findFileDef(Doxygen::inputNameDict,yytext,ambig);
                                          //printf("looking for include %s -> %s fd=%p\n",yytext,absPath.data(),fd);
                                          if (fd && fd->isLinkable())
                                          {

and this is in the current (1.8.20) version still the case (only the commented "relative path lines " are removed).

The problem might be related to:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants