diff options
author | albert-github <albert.tests@gmail.com> | 2021-02-16 10:44:05 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2021-02-16 10:44:05 (GMT) |
commit | 9e4d6df2e549c2251d2bd3a88431cec0b262fad8 (patch) | |
tree | 41a50f46efdfbf0964d043ce88a71ad60a43b623 /src/pre.l | |
parent | a136cfef5489af08ada5ed8c928a5876133b9f3e (diff) | |
download | Doxygen-9e4d6df2e549c2251d2bd3a88431cec0b262fad8.zip Doxygen-9e4d6df2e549c2251d2bd3a88431cec0b262fad8.tar.gz Doxygen-9e4d6df2e549c2251d2bd3a88431cec0b262fad8.tar.bz2 |
Get preprocessor output without line numbers
For easier comparison of the original source with a doxygen preprocessed source the line numbers can be a bit of an obstacle.
To remove the line numbers in the preprocessor output the option `NoLineno` has been added.
(In case `Preprocessor` is not invoked, `NoLineno` has no effect).
Diffstat (limited to 'src/pre.l')
-rw-r--r-- | src/pre.l | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -3390,11 +3390,12 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output char *newPos=output.data()+output.curPos(); Debug::print(Debug::Preprocessor,0,"Preprocessor output of %s (size: %d bytes):\n",fileName,newPos-orgPos); int line=1; - Debug::print(Debug::Preprocessor,0,"---------\n00001 "); + Debug::print(Debug::Preprocessor,0,"---------\n"); + if (!Debug::isFlagSet(Debug::NoLineNo)) Debug::print(Debug::Preprocessor,0,"00001 "); while (orgPos<newPos) { putchar(*orgPos); - if (*orgPos=='\n') Debug::print(Debug::Preprocessor,0,"%05d ",++line); + if (*orgPos=='\n' && !Debug::isFlagSet(Debug::NoLineNo)) Debug::print(Debug::Preprocessor,0,"%05d ",++line); orgPos++; } Debug::print(Debug::Preprocessor,0,"\n---------\n"); |