Quantcast

bug? - \snippet works, but not snippetlineno, snippetdoc ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug? - \snippet works, but not snippetlineno, snippetdoc ?

Monique Semp
Hello, Doxygen users,
 
Short story:
 
In Doxygen 1.8.10, on Windows 7, parsing .c code, the output for the \snippetlineno and \snippetdoc commands seems broken. That is, the output does not match the content of the output for \snippet (which shows the expected code, proving that I do have correct file referencing). Similarly, the \include, \includelineno, and \includedoc output seems to be buggy, although not in the same way.
 
I have my good-enough usage (using the \includelineno command), so I do not have an immediate question that needs an answer. This message is by way of info in case anyone wants to look into the issue further.
 
------------------
 
Details:
 
I’ve successfully set up an example file, snippet_one.inc, that uses “//! [snippet_name]” delimiters as the first and last lines of the file.
 
I can include the snippet content (that’s between the delimiters) in multiple other file’s multiple other functions’ Doxygen comment output via the “\snippet    snippet_one.inc    snippet_name” command. So I know that I’ve correctly included the path in the EXAMPLE_PATH configuration, and that all relative paths are correctly working.
 
* However, the output for the “\snippet” command appears with color syntax coding but no line numbers, contrary to how the \code samples appear (no color, but line numbered). I did not expect to see the line numbers (given the existence of the \snippetlineno command), but I didn’t expect or want the color syntax coding. (More about color coding for the \code command, below.)
 
* When I tried the “\snippetlineno” command, the output changed to just a single line, “<file-name> <snippet_name>”; no code appeared. I didn’t change anything else except “snippet” –> “snippetlineno”.
 
* I tried the “\snippetdoc” variant, and I got the same “<file-name> <snippet_name>” output.
 
--
(I also normally use the “@” form of doxygen commands instead of the “\” form, so I tried the “\” form for the snippetlineno and snippetdoc, but the results didn’t change.)
--
 
I figured I’d try the related “\include” and “\includelineno”, and “\includedoc” commands, and they also seem broken, but not the same way as the \snippet, \snippetlineno, \snippetdoc set.
 
* The “\include” output (where I removed the “//! [snippet_name]” delimiters from the snippet_one.inc doc, and in the target file function block used just the filename without the <snippet_name>) was the same as the “\snippet” output: the code has color syntax coding but no line numbers.
 
* The “\includelineno” output is the closest to what I’m looking for: it correctly includes the line numbers, but also still color codes things. (I don’t really care, but it is odd to see when the regular \code output isn’t color-coded.
 
(I did find that if I explicitly set the language for the \code command, “\code {.c}”, I do not get the line numbers, but I do get color coding. Seems that someone figured this out about which formatters are used for which languages: http://stackoverflow.com/questions/21406101/doxygen-code-line-numbers.)
 
* The “\includedoc” output doesn’t have the code, just the “<file-name>” string.
 
--
Other than the OPTIMIZE_OUTPUT_FOR_C = YES config option, I’m not sure if any other config options might be relevant?
 
-Monique
 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

\code for .c code - output differs for .h/.c files

Monique Semp
So to add to the following comment from a related thread:
 
I did find that if I explicitly set the language for the \code command, “\code {.c}”, I do not get the line numbers, but I do get color coding. Seems that someone figured this out about which formatters are used for which languages: http://stackoverflow.com/questions/21406101/doxygen-code-line-numbers.)
 
And depending on whether I’m documenting a regular function (in a .c file) or a member function in a typedef struct (in a .h file), the \code command’s output is opposite with respect to line numbers and color-coding:
 
* In the .c file: With NO language qualifier, I get line numbers but no color-coding. WITH the {.c} qualifier, I get color coding but no line numbers.
 
* In the .h file: With NO language qualifier, I get color coding but no line numbers. WITH the {.unparsed} qualifier, I get line numbers but no color-coding.
 
Other than the OPTIMIZE_OUTPUT_FOR_C = YES config option, I’m not sure if any other config options might be relevant?
 
So again, I can work with this, but I have to ask whether this is by design or a bug?
 
-Monique
 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bug? - \snippet works, but not snippetlineno, snippetdoc ?

albert
In reply to this post by Monique Semp
Monique,

Have not read the email completely, but you wrote "In Doxygen 1.8.10, on Windows 7, parsing .c code, the output for the \snippetlineno and \snippetdoc commands seems broken.", these commands are new in doxygen 1.8.12 and there are also some changes in handling line numbers in a more consistent way in the 1.8.12 version. Please have a look at the results for the 1.8.12 version.

Albert

On Mon, Oct 3, 2016 at 9:45 PM, Monique Semp <[hidden email]> wrote:
Hello, Doxygen users,
 
Short story:
 
In Doxygen 1.8.10, on Windows 7, parsing .c code, the output for the \snippetlineno and \snippetdoc commands seems broken. That is, the output does not match the content of the output for \snippet (which shows the expected code, proving that I do have correct file referencing). Similarly, the \include, \includelineno, and \includedoc output seems to be buggy, although not in the same way.
 
I have my good-enough usage (using the \includelineno command), so I do not have an immediate question that needs an answer. This message is by way of info in case anyone wants to look into the issue further.
 
------------------
 
Details:
 
I’ve successfully set up an example file, snippet_one.inc, that uses “//! [snippet_name]” delimiters as the first and last lines of the file.
 
I can include the snippet content (that’s between the delimiters) in multiple other file’s multiple other functions’ Doxygen comment output via the “\snippet    snippet_one.inc    snippet_name” command. So I know that I’ve correctly included the path in the EXAMPLE_PATH configuration, and that all relative paths are correctly working.
 
* However, the output for the “\snippet” command appears with color syntax coding but no line numbers, contrary to how the \code samples appear (no color, but line numbered). I did not expect to see the line numbers (given the existence of the \snippetlineno command), but I didn’t expect or want the color syntax coding. (More about color coding for the \code command, below.)
 
* When I tried the “\snippetlineno” command, the output changed to just a single line, “<file-name> <snippet_name>”; no code appeared. I didn’t change anything else except “snippet” –> “snippetlineno”.
 
* I tried the “\snippetdoc” variant, and I got the same “<file-name> <snippet_name>” output.
 
--
(I also normally use the “@” form of doxygen commands instead of the “\” form, so I tried the “\” form for the snippetlineno and snippetdoc, but the results didn’t change.)
--
 
I figured I’d try the related “\include” and “\includelineno”, and “\includedoc” commands, and they also seem broken, but not the same way as the \snippet, \snippetlineno, \snippetdoc set.
 
* The “\include” output (where I removed the “//! [snippet_name]” delimiters from the snippet_one.inc doc, and in the target file function block used just the filename without the <snippet_name>) was the same as the “\snippet” output: the code has color syntax coding but no line numbers.
 
* The “\includelineno” output is the closest to what I’m looking for: it correctly includes the line numbers, but also still color codes things. (I don’t really care, but it is odd to see when the regular \code output isn’t color-coded.
 
(I did find that if I explicitly set the language for the \code command, “\code {.c}”, I do not get the line numbers, but I do get color coding. Seems that someone figured this out about which formatters are used for which languages: http://stackoverflow.com/questions/21406101/doxygen-code-line-numbers.)
 
* The “\includedoc” output doesn’t have the code, just the “<file-name>” string.
 
--
Other than the OPTIMIZE_OUTPUT_FOR_C = YES config option, I’m not sure if any other config options might be relevant?
 
-Monique
 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Loading...