- version update to 1.9.7

* https://www.doxygen.nl/manual/changelog.html#log_1_9_7
- modified patches
  % doxygen-no-libclang-cpp.patch (refreshed)
  % doxygen-no-lowercase-man-names.patch (refreshed)
- deleted patches
  - Fix-boundingbox-parsing_part1.patch (upstreamed)
  - Fix-boundingbox-parsing_part2.patch (upstreamed)
  - Fix-boundingbox-parsing_part3.patch (upstreamed)
  - Fix-boundingbox-parsing_part4.patch (upstreamed)

OBS-URL: https://build.opensuse.org/package/show/devel:tools/doxygen?expand=0&rev=184
This commit is contained in:
Petr Gajdos 2023-06-23 12:40:27 +00:00 committed by Git OBS Bridge
parent 71086afb4b
commit 24047c07e7
12 changed files with 470 additions and 2211 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,216 +0,0 @@
From 7b2a6027775b0158304635a98de0f9b5672f163a Mon Sep 17 00:00:00 2001
From: Dimitri van Heesch <doxygen@gmail.com>
Date: Wed, 4 Jan 2023 10:55:36 +0100
Subject: [PATCH] issue #9319: Doc build fails with cairo 1.17.6
---
TinyDeflate/gunzip.hh | 26 ++++++-----
src/CMakeLists.txt | 1 +
src/dotrunner.cpp | 104 ++++++++++++++++++++++++++++++++++++++++++
src/doxygen.cpp | 2 -
4 files changed, 120 insertions(+), 13 deletions(-)
diff --git a/TinyDeflate/gunzip.hh b/TinyDeflate/gunzip.hh
index c0039d5f832..c237298fdb0 100644
--- a/TinyDeflate/gunzip.hh
+++ b/TinyDeflate/gunzip.hh
@@ -944,23 +944,27 @@ namespace gunzip_ns
// The following routines are macros rather than e.g. lambda functions,
// in order to make them inlined in the function structure, and breakable/resumable.
+ #define CONCAT(a, b) a##b
// Bit-by-bit input routine
- #define DummyGetBits(numbits) do { \
- auto p = state.template GetBits<bool(Abortable&Flag_InputAbortable)>(std::forward<InputFunctor>(input), numbits); \
- if((Abortable & Flag_InputAbortable) && !~p) return -2; \
+ #define DummyGetBits_(line,numbits) do { \
+ auto CONCAT(pd,line) = state.template GetBits<bool(Abortable&Flag_InputAbortable)>(std::forward<InputFunctor>(input), numbits); \
+ if((Abortable & Flag_InputAbortable) && !~CONCAT(pd,line)) return -2; \
} while(0)
+ #define DummyGetBits(numbits) DummyGetBits_(__LINE__, numbits)
- #define GetBits(numbits, target) \
- auto p = state.template GetBits<bool(Abortable&Flag_InputAbortable)>(std::forward<InputFunctor>(input), numbits); \
- if((Abortable & Flag_InputAbortable) && !~p) return -2; \
- target = p
+ #define GetBits_(line,numbits, target) \
+ auto CONCAT(pb,line) = state.template GetBits<bool(Abortable&Flag_InputAbortable)>(std::forward<InputFunctor>(input), numbits); \
+ if((Abortable & Flag_InputAbortable) && !~CONCAT(pb,line)) return -2; \
+ target = CONCAT(pb,line)
+ #define GetBits(numbits, target) GetBits_(__LINE__, numbits, target)
// Huffman tree read routine.
- #define HuffRead(tree, target) \
- auto p = state.template HuffRead<bool(Abortable&Flag_InputAbortable)>(std::forward<InputFunctor>(input), tree); \
- if((Abortable & Flag_InputAbortable) && !~p) return -2; \
- target = p
+ #define HuffRead_(line, tree, target) \
+ auto CONCAT(ph,line) = state.template HuffRead<bool(Abortable&Flag_InputAbortable)>(std::forward<InputFunctor>(input), tree); \
+ if((Abortable & Flag_InputAbortable) && !~CONCAT(ph,line)) return -2; \
+ target = CONCAT(ph,line)
+ #define HuffRead(tree, target) HuffRead_(__LINE__, tree, target)
#define Fail_If(condition) do { \
/*assert(!(condition));*/ \
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e9df895ce3a..0e33638c42d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,6 +1,7 @@
# vim:ts=4:sw=4:expandtab:autoindent:
include_directories(
+ ${PROJECT_SOURCE_DIR}/TinyDeflate
${PROJECT_SOURCE_DIR}/filesystem
${PROJECT_SOURCE_DIR}/libmd5
${PROJECT_SOURCE_DIR}/liblodepng
diff --git a/src/dotrunner.cpp b/src/dotrunner.cpp
index d3b2615f4ed..5be9f20de9c 100644
--- a/src/dotrunner.cpp
+++ b/src/dotrunner.cpp
@@ -16,6 +16,8 @@
#include <cassert>
#include <cmath>
+#include <gunzip.hh>
+
#include "dotrunner.h"
#include "util.h"
#include "portable.h"
@@ -31,6 +33,9 @@
#define MAX_LATEX_GRAPH_INCH 150
#define MAX_LATEX_GRAPH_SIZE (MAX_LATEX_GRAPH_INCH * 72)
+//#define DBG(x) printf x
+#define DBG(x) do {} while(0)
+
//-----------------------------------------------------------------------------------------
// since dot silently reproduces the input file when it does not
@@ -108,6 +113,7 @@ static bool resetPDFSize(const int width,const int height, const QCString &base)
bool DotRunner::readBoundingBox(const QCString &fileName,int *width,int *height,bool isEps)
{
+#if 0
const char *bb = isEps ? "%%PageBoundingBox:" : "/MediaBox [";
size_t bblen = strlen(bb);
FILE *f = Portable::fopen(fileName,"rb");
@@ -139,6 +145,104 @@ bool DotRunner::readBoundingBox(const QCString &fileName,int *width,int *height,
err("Failed to extract bounding box from generated diagram file %s\n",qPrint(fileName));
fclose(f);
return FALSE;
+#endif
+ std::ifstream f = Portable::openInputStream(fileName);
+ if (!f.is_open())
+ {
+ err("Failed to open file %s for extracting bounding box\n",qPrint(fileName));
+ return false;
+ }
+
+ // read file contents into string 'contents'
+ std::stringstream buffer;
+ buffer << f.rdbuf();
+ std::string contents = buffer.str();
+
+ // start of bounding box marker we are looking for
+ const std::string boundingBox = isEps ? "%%PageBoundingBox:" : "/MediaBox [";
+
+ // helper routine to extract the bounding boxes width and height
+ auto extractBoundingBox = [&fileName,&boundingBox,&width,&height](const char *s) -> bool
+ {
+ int x,y;
+ double w,h;
+ if (sscanf(s+boundingBox.length(),"%d %d %lf %lf",&x,&y,&w,&h)==4)
+ {
+ *width = static_cast<int>(std::ceil(w));
+ *height = static_cast<int>(std::ceil(h));
+ return true;
+ }
+ err("Failed to extract bounding box from generated diagram file %s\n",qPrint(fileName));
+ return false;
+ };
+
+ // compressed segment start and end markers
+ const std::string streamStart = "stream\n";
+ const std::string streamEnd = "\nendstream";
+
+ const size_t l = contents.length();
+ size_t i=0;
+ while (i<l)
+ {
+ if (!isEps && contents[i]=='s' && strncmp(&contents[i],streamStart.c_str(),streamStart.length())==0)
+ { // compressed stream start
+ int col=17;
+ i+=streamStart.length();
+ const size_t start=i;
+ DBG(("---- start stream at offset %08x\n",(int)i));
+ while (i<l)
+ {
+ if (contents[i]=='\n' && strncmp(&contents[i],streamEnd.c_str(),streamEnd.length())==0)
+ { // compressed block found in range [start..i]
+ DBG(("\n---- end stream at offset %08x\n",(int)i));
+ // decompress it into decompressBuf
+ std::vector<char> decompressBuf;
+ const char *source = &contents[start];
+ const size_t sourceLen = i-start;
+ size_t sourcePos = 0;
+ decompressBuf.reserve(sourceLen*2);
+ auto getter = [source,&sourcePos,sourceLen]() -> int {
+ return sourcePos<sourceLen ? static_cast<unsigned char>(source[sourcePos++]) : EOF;
+ };
+ auto putter = [&decompressBuf](const char c) -> int {
+ decompressBuf.push_back(c); return c;
+ };
+ Deflate(getter,putter);
+ // convert decompression buffer to string
+ std::string s(decompressBuf.begin(), decompressBuf.end());
+ DBG(("decompressed_data=[[[\n%s\n]]]\n",s.c_str()));
+ // search for bounding box marker
+ const size_t idx = s.find(boundingBox);
+ if (idx!=std::string::npos) // found bounding box in uncompressed data
+ {
+ return extractBoundingBox(s.c_str()+idx);
+ }
+ // continue searching after end stream marker
+ i+=streamEnd.length();
+ break;
+ }
+ else // compressed stream character
+ {
+ if (col>16) { col=0; DBG(("\n%08x: ",static_cast<int>(i))); }
+ DBG(("%02x ",static_cast<unsigned char>(contents[i])));
+ col++;
+ i++;
+ }
+ }
+ }
+ else if (((isEps && contents[i]=='%') || (!isEps && contents[i]=='/')) &&
+ strncmp(&contents[i],boundingBox.c_str(),boundingBox.length())==0)
+ { // uncompressed bounding box
+ return extractBoundingBox(&contents[i]);
+ }
+ else // uncompressed stream character
+ {
+ i++;
+ }
+ }
+ err("Failed to find bounding box in generated diagram file %s\n",qPrint(fileName));
+ // nothing found
+ return false;
}
//---------------------------------------------------------------------------------
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 78b72ebfecc..55068e74dcb 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -11930,8 +11930,6 @@ void parseInput()
{
Portable::setenv("DOTFONTPATH",qPrint(curFontPath));
}
- // issue 9319
- Portable::setenv("CAIRO_DEBUG_PDF","1");
}

View File

@ -1,93 +0,0 @@
From f3514d578633cad3e39d6787f81085e46bafbaf4 Mon Sep 17 00:00:00 2001
From: Dimitri van Heesch <doxygen@gmail.com>
Date: Wed, 4 Jan 2023 22:49:00 +0100
Subject: [PATCH] Fix and work around compiler warnings and remove dead code
---
TinyDeflate/gunzip.hh | 4 ++--
src/dotrunner.cpp | 42 +++++++++---------------------------------
2 files changed, 11 insertions(+), 35 deletions(-)
diff --git a/TinyDeflate/gunzip.hh b/TinyDeflate/gunzip.hh
index c237298fdb0..a631815a255 100644
--- a/TinyDeflate/gunzip.hh
+++ b/TinyDeflate/gunzip.hh
@@ -430,7 +430,7 @@ namespace gunzip_ns
static_assert((T)false, "result_of<CallableType> is invalid; use "
"result_of<CallableType(zero or more argument types)> instead.");
};
- #if __cplusplus > 202000UL
+ #if __cplusplus > 201703UL
template <typename F, typename... Args>
struct result_of<F(Args...)> : std::invoke_result<F, Args...> {};
#else
@@ -702,7 +702,7 @@ namespace gunzip_ns
// Note: Throws away progress already made traversing the tree
return ~std::uint_least32_t(0); // error flag
}
- cur = (unsigned(cur) << 1) | bool(p);
+ cur = (unsigned(cur) << 1) | unsigned(bool(p));
#ifdef DEFL_DO_HUFF_STATS
if(len > maxlen)
{
diff --git a/src/dotrunner.cpp b/src/dotrunner.cpp
index 5be9f20de9c..9246029cb61 100644
--- a/src/dotrunner.cpp
+++ b/src/dotrunner.cpp
@@ -16,7 +16,16 @@
#include <cassert>
#include <cmath>
+#ifdef _MSC_VER
+#pragma warning( push )
+#pragma warning( disable : 4242 )
+#pragma warning( disable : 4244 )
+#endif
#include <gunzip.hh>
+#ifdef _MSC_VER
+#pragma warning( pop )
+#endif
+
#include "dotrunner.h"
#include "util.h"
@@ -113,39 +122,6 @@ static bool resetPDFSize(const int width,const int height, const QCString &base)
bool DotRunner::readBoundingBox(const QCString &fileName,int *width,int *height,bool isEps)
{
-#if 0
- const char *bb = isEps ? "%%PageBoundingBox:" : "/MediaBox [";
- size_t bblen = strlen(bb);
- FILE *f = Portable::fopen(fileName,"rb");
- if (!f)
- {
- //printf("readBoundingBox: could not open %s\n",fileName);
- return FALSE;
- }
- const int maxLineLen=1024;
- char buf[maxLineLen];
- while (fgets(buf,maxLineLen,f)!=NULL)
- {
- const char *p = strstr(buf,bb);
- if (p) // found PageBoundingBox or /MediaBox string
- {
- int x,y;
- double w,h;
- fclose(f);
- if (sscanf(p+bblen,"%d %d %lf %lf",&x,&y,&w,&h)!=4)
- {
- //printf("readBoundingBox sscanf fail\n");
- return FALSE;
- }
- *width = static_cast<int>(std::ceil(w));
- *height = static_cast<int>(std::ceil(h));
- return TRUE;
- }
- }
- err("Failed to extract bounding box from generated diagram file %s\n",qPrint(fileName));
- fclose(f);
- return FALSE;
-#endif
std::ifstream f = Portable::openInputStream(fileName);
if (!f.is_open())
{

View File

@ -1,66 +0,0 @@
From 8129939c312e4b5060042fdb93bd071b7b133381 Mon Sep 17 00:00:00 2001
From: Dimitri van Heesch <doxygen@gmail.com>
Date: Thu, 5 Jan 2023 11:16:24 +0100
Subject: [PATCH] issue #9319: Doc build fails with cairo 1.17.6
- Improve detection of "flate" encoded streams
---
TinyDeflate/gunzip.hh | 2 +-
src/dotrunner.cpp | 20 +++++++++++++++++++-
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/TinyDeflate/gunzip.hh b/TinyDeflate/gunzip.hh
index a631815a255..652058ab823 100644
--- a/TinyDeflate/gunzip.hh
+++ b/TinyDeflate/gunzip.hh
@@ -430,7 +430,7 @@ namespace gunzip_ns
static_assert((T)false, "result_of<CallableType> is invalid; use "
"result_of<CallableType(zero or more argument types)> instead.");
};
- #if __cplusplus > 201703UL
+ #if __cplusplus > 202000UL
template <typename F, typename... Args>
struct result_of<F(Args...)> : std::invoke_result<F, Args...> {};
#else
diff --git a/src/dotrunner.cpp b/src/dotrunner.cpp
index 9246029cb61..2e87a0d4a37 100644
--- a/src/dotrunner.cpp
+++ b/src/dotrunner.cpp
@@ -20,6 +20,7 @@
#pragma warning( push )
#pragma warning( disable : 4242 )
#pragma warning( disable : 4244 )
+#pragma warning( disable : 4996 )
#endif
#include <gunzip.hh>
#ifdef _MSC_VER
@@ -156,11 +157,28 @@ bool DotRunner::readBoundingBox(const QCString &fileName,int *width,int *height,
const std::string streamStart = "stream\n";
const std::string streamEnd = "\nendstream";
+ auto detectDeflateStreamStart = [&streamStart](const char *s)
+ {
+ size_t len = streamStart.length();
+ bool streamOK = strncmp(s,streamStart.c_str(),len)==0;
+ if (streamOK) // ASCII marker matches, check stream header bytes as well
+ {
+ unsigned short header1 = static_cast<unsigned char>(s[len])<<8; // CMF byte
+ if (header1) // not end of string
+ {
+ unsigned short header = (static_cast<unsigned char>(s[len+1])) | header1; // FLG byte
+ // check for correct header (see https://www.rfc-editor.org/rfc/rfc1950)
+ return ((header&0x8F20)==0x0800) && (header%31)==0;
+ }
+ }
+ return false;
+ };
+
const size_t l = contents.length();
size_t i=0;
while (i<l)
{
- if (!isEps && contents[i]=='s' && strncmp(&contents[i],streamStart.c_str(),streamStart.length())==0)
+ if (!isEps && contents[i]=='s' && detectDeflateStreamStart(&contents[i]))
{ // compressed stream start
int col=17;
i+=streamStart.length();

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:297f8ba484265ed3ebd3ff3fe7734eb349a77e4f95c8be52ed9977f51dea49df
size 5293513

3
doxygen-1.9.7.src.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:87007641c38e2c392c8596f36711eb97633b984c8430f389e7bcf6323a098d94
size 5736446

View File

@ -1,7 +1,9 @@
--- doxygen-1.8.20/src/CMakeLists.txt.orig 2020-10-06 15:56:02.841527965 +0200
+++ doxygen-1.8.20/src/CMakeLists.txt 2020-10-06 16:07:14.226206979 +0200
@@ -341,7 +341,7 @@
set(CLANG_LIBS libclang clangTooling)
Index: doxygen-1.9.7/src/CMakeLists.txt
===================================================================
--- doxygen-1.9.7.orig/src/CMakeLists.txt
+++ doxygen-1.9.7/src/CMakeLists.txt
@@ -368,7 +368,7 @@ if (use_libclang)
add_definitions(-DCINDEX_NO_EXPORTS)
else() # dynamically linked version of clang
llvm_config(doxymain USE_SHARED support)
- set(CLANG_LIBS libclang clang-cpp)

View File

@ -1,8 +1,8 @@
Index: doxygen-1.9.2/src/fortranscanner.l
Index: doxygen-1.9.7/src/fortranscanner.l
===================================================================
--- doxygen-1.9.2.orig/src/fortranscanner.l
+++ doxygen-1.9.2/src/fortranscanner.l
@@ -2314,7 +2314,6 @@ static void initEntry(yyscan_t yyscanner
--- doxygen-1.9.7.orig/src/fortranscanner.l
+++ doxygen-1.9.7/src/fortranscanner.l
@@ -2657,7 +2657,6 @@ static void initEntry(yyscan_t yyscanner
static void addCurrentEntry(yyscan_t yyscanner,bool case_insens)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;

View File

@ -0,0 +1,439 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 21094ebd0d..c7778710d2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -121,6 +121,11 @@ if (CMAKE_SYSTEM_NAME MATCHES "Windows")
endif()
endif()
+# needed for JavaCC
+set(JAVA_CC_EXTRA_FLAGS "-DJAVACC_CHAR_TYPE=\"unsigned char\"")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${JAVA_CC_EXTRA_FLAGS}")
+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${JAVA_CC_EXTRA_FLAGS}")
+
if(POLICY CMP0063)
cmake_policy(SET CMP0063 NEW)
endif()
diff --git a/src/qcstring.h b/src/qcstring.h
index bee80bde85..272c7fd6a1 100644
--- a/src/qcstring.h
+++ b/src/qcstring.h
@@ -84,6 +84,7 @@ int qstricmp( const char *str1, const char *str2 );
int qstrnicmp( const char *str1, const char *str2, size_t len );
+using JavaCCString = std::basic_string<unsigned char>;
/** This is an alternative implementation of QCString. It provides basically
* the same functions but uses std::string as the underlying string type
@@ -102,6 +103,19 @@ class QCString
QCString( std::string &&s) : m_rep(std::move(s)) {}
+ /** For converting a JavaCC string */
+ QCString( const JavaCCString &s)
+ {
+ m_rep.resize(s.size());
+ memcpy(m_rep.data(),s.data(),s.size());
+ }
+ QCString &operator=( const JavaCCString &s)
+ {
+ m_rep.resize(s.size());
+ memcpy(m_rep.data(),s.data(),s.size());
+ return *this;
+ }
+
/** creates a string with room for size characters
* @param[in] size the number of character to allocate (also counting the 0-terminator!)
*/
diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp
index df2769b613..5ee317d8b9 100644
--- a/src/vhdljjparser.cpp
+++ b/src/vhdljjparser.cpp
@@ -88,8 +88,8 @@ struct VHDLOutlineParser::Private
void VHDLOutlineParser::Private::parseVhdlfile(const QCString &fileName,
const char* inputBuffer,bool inLine)
{
- JAVACC_STRING_TYPE s =inputBuffer;
- CharStream *stream = new CharStream(s.c_str(), (int)s.size(), 1, 1);
+ QCString s =inputBuffer;
+ CharStream *stream = new CharStream(reinterpret_cast<const JJChar*>(s.data()), (int)s.size(), 1, 1);
VhdlParserTokenManager *tokenManager = new VhdlParserTokenManager(stream);
VhdlTokenManagerErrorHandler *tokErrHandler=new VhdlTokenManagerErrorHandler(fileName.data());
vhdlParser=new VhdlParser(tokenManager);
@@ -186,11 +186,14 @@ void VHDLOutlineParser::lineCount()
p->yyLineNr++;
}
-void VHDLOutlineParser::lineCount(const char* text)
+void VHDLOutlineParser::lineCount(const QCString &text)
{
- for (const char* c=text ; *c ; ++c )
+ if (!text.isEmpty())
{
- if (*c == '\n') p->yyLineNr++;
+ for (const char* c=text.data() ; *c ; ++c )
+ {
+ if (*c == '\n') p->yyLineNr++;
+ }
}
}
@@ -259,7 +262,7 @@ QCString VHDLOutlineParser::getNameID()
return QCString().setNum(idCounter++);
}
-void VHDLOutlineParser::handleFlowComment(const char* doc)
+void VHDLOutlineParser::handleFlowComment(const QCString &doc)
{
lineCount(doc);
@@ -551,11 +554,9 @@ void VHDLOutlineParser::addVhdlType(const char *n,int startLine,int section,
}
}
-void VHDLOutlineParser::createFunction(const char *imp,uint64_t spec,const char *fn)
+void VHDLOutlineParser::createFunction(const QCString &impure,uint64_t spec,const QCString &fname)
{
VhdlParser::SharedState *s = &p->shared;
- QCString impure(imp);
- QCString fname(fn);
s->current->spec=spec;
s->current->section=Entry::FUNCTION_SEC;
@@ -862,10 +863,11 @@ void VHDLOutlineParser::error_skipto(int kind)
// "if"/"while".
}
-QCString filter2008VhdlComment(const char *s)
+QCString filter2008VhdlComment(const QCString &s)
{
+ if (s.length()<4) return s;
GrowBuf growBuf;
- const char *p=s+3; // skip /*!
+ const char *p=s.data()+3; // skip /*!
char c='\0';
while (*p == ' ' || *p == '\t') p++;
while ((c=*p++))
diff --git a/src/vhdljjparser.h b/src/vhdljjparser.h
index 26b7964f80..d62bc62d05 100644
--- a/src/vhdljjparser.h
+++ b/src/vhdljjparser.h
@@ -43,15 +43,14 @@ class VHDLOutlineParser : public OutlineParserInterface
void setLineParsed(int tok);
int getLine(int tok);
int getLine();
- void lineCount(const char*);
+ void lineCount(const QCString &);
void lineCount();
void addProto(const char *s1,const char *s2,const char *s3,const char *s4,const char *s5,const char *s6);
- //void addConfigureNode(const char* a,const char*b, bool,bool isLeaf,bool inlineConf);
- void createFunction(const char *impure,uint64_t spec,const char *fname);
+ void createFunction(const QCString &impure,uint64_t spec,const QCString &fname);
void addVhdlType(const char *n,int startLine,int section, uint64_t spec,const char* args,const char* type,Protection prot);
void addCompInst(const char *n, const char* instName, const char* comp,int iLine);
void handleCommentBlock(const QCString &doc,bool brief);
- void handleFlowComment(const char*);
+ void handleFlowComment(const QCString &);
void initEntry(Entry *e);
void newEntry();
bool isFuncProcProced();
@@ -75,6 +74,6 @@ class VHDLOutlineParser : public OutlineParserInterface
const EntryList &getVhdlInstList();
-QCString filter2008VhdlComment(const char *s);
+QCString filter2008VhdlComment(const QCString &s);
#endif
diff --git a/vhdlparser/CMakeLists.txt b/vhdlparser/CMakeLists.txt
index 7dd36bc5f9..2b6bfbc92a 100644
--- a/vhdlparser/CMakeLists.txt
+++ b/vhdlparser/CMakeLists.txt
@@ -34,6 +34,13 @@ add_custom_command(
)
set_source_files_properties(${GENERATED_SRC}/VhdlParser_adj.cc PROPERTIES GENERATED 1)
+add_custom_command(
+ COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/vhdlparser/vhdl_adj.py ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParserTokenManager.cc ${GENERATED_SRC}/VhdlParserTokenManager_adj.cc
+ DEPENDS ${PROJECT_SOURCE_DIR}/vhdlparser/VhdlParserTokenManager.cc ${PROJECT_SOURCE_DIR}/vhdlparser/vhdl_adj.py
+ OUTPUT ${GENERATED_SRC}/VhdlParserTokenManager_adj.cc
+)
+set_source_files_properties(${GENERATED_SRC}/VhdlParserTokenManager_adj.cc PROPERTIES GENERATED 1)
+
include_directories(
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/vhdlparser
@@ -44,7 +51,7 @@ ParseException.cc
Token.cc
TokenMgrError.cc
${GENERATED_SRC}/VhdlParser_adj.cc
-VhdlParserTokenManager.cc
+${GENERATED_SRC}/VhdlParserTokenManager_adj.cc
)
add_dependencies(vhdlparser
generate_configvalues_header
diff --git a/vhdlparser/JavaCC.h.in b/vhdlparser/JavaCC.h.in
deleted file mode 100644
index 5889e93acf..0000000000
--- a/vhdlparser/JavaCC.h.in
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. JavaCC.h Version 7.0 */
-/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-#ifndef JAVACC_JAVACC_H_
-#define JAVACC_JAVACC_H_
-
-#include <string>
-#include <memory>
-#include <cassert>
-#include <functional>
-
-#ifndef JAVACC_CHAR_TYPE
-#define JAVACC_CHAR_TYPE char
-#endif
-
-#ifndef JAVACC_STRING_TYPE
-#define JAVACC_STRING_TYPE std::basic_string<JAVACC_CHAR_TYPE>
-#endif
-
-#define JAVACC_SIMPLE_STRING std::basic_string<char>
-
-typedef JAVACC_CHAR_TYPE JJChar;
-typedef JAVACC_STRING_TYPE JJString;
-typedef JAVACC_STRING_TYPE JJStringBuffer;
-typedef JAVACC_SIMPLE_STRING JJSimpleString;
-
-// Abstraction on stream classes to read a block of data into a buffer.
-class ReaderStream {
-public:
- // Read block of data into a buffer and return the actual number read.
- virtual size_t read(JAVACC_CHAR_TYPE *buffer, int offset, size_t len) { return 0; }
- virtual bool endOfInput() { return true; }
- virtual ~ReaderStream() {}
-};
-
-const JAVACC_CHAR_TYPE EMPTY[] = { 0 };
-
-#ifndef MAX
-#define MAX(a,b) ((a)>=(b)?(a):(b))
-#endif
-#ifndef MIN
-#define MIN(a,b) ((a)<=(b)?(a):(b))
-#endif
-
-template<typename T>
-struct JJEnter
-{
- JJEnter(T f_) : f{f_} {f();}
- ~JJEnter(){}
- T f;
-};
-template<typename T>
-struct JJExit
-{
- JJExit(T f_) : f{f_} {}
- ~JJExit(){f();}
- T f;
-};
-
-#endif
-/* JavaCC - OriginalChecksum=b719dd5e5f87efc5315d14df0b701850 (do not edit this line) */
diff --git a/vhdlparser/VhdlParser.cc b/vhdlparser/VhdlParser.cc
index b392af44e7..61ce96e357 100644
--- a/vhdlparser/VhdlParser.cc
+++ b/vhdlparser/VhdlParser.cc
@@ -144,7 +144,7 @@ return QCString(t->image);
t = jj_consume_token(INERTIAL_T);
}
if (!hasError) {
-s=t->image+" ";
+s=QCString(t->image)+" ";
}
break;
}
@@ -9959,7 +9959,7 @@ if(s.isEmpty())
m_sharedState->currP=0;
if(tok)
s1=tok->image;
- outlineParser()->createFunction(m_sharedState->currName.data(),VhdlDocGen::PROCESS,s1.data());
+ outlineParser()->createFunction(m_sharedState->currName,VhdlDocGen::PROCESS,s1);
outlineParser()->createFlow();
m_sharedState->currName="";
outlineParser()->newEntry();
@@ -12945,7 +12945,7 @@ void VhdlParser::subprogram_specification() {QCString s;Token *tok=0;Token *t;
}
if (!hasError) {
m_sharedState->currP=VhdlDocGen::PROCEDURE;
- outlineParser()->createFunction(s.data(),m_sharedState->currP,0);
+ outlineParser()->createFunction(s,m_sharedState->currP,0);
m_sharedState->tempEntry=m_sharedState->current;
m_sharedState->current->startLine=outlineParser()->getLine(PROCEDURE_T);
m_sharedState->current->bodyLine=outlineParser()->getLine(PROCEDURE_T);
@@ -13058,10 +13058,10 @@ m_sharedState->currP=VhdlDocGen::FUNCTION;
}
}
if (!hasError) {
-if(tok)
- outlineParser()->createFunction(tok->image.c_str(),m_sharedState->currP,s.data());
+if (tok)
+ outlineParser()->createFunction(tok->image,m_sharedState->currP,s);
else
- outlineParser()->createFunction(0,m_sharedState->currP,s.data());
+ outlineParser()->createFunction(QCString(),m_sharedState->currP,s);
m_sharedState->tempEntry=m_sharedState->current;
m_sharedState->current->startLine=outlineParser()->getLine(FUNCTION_T);
diff --git a/vhdlparser/VhdlParserTokenManager.cc b/vhdlparser/VhdlParserTokenManager.cc
index 9b704e51d7..21761ba7e6 100644
--- a/vhdlparser/VhdlParserTokenManager.cc
+++ b/vhdlparser/VhdlParserTokenManager.cc
@@ -3513,7 +3513,7 @@ void VhdlParserTokenManager::SkipLexicalActions(Token *matchedToken){
QCString doc(image.data());
int count=doc.contains("--!");
parser->outlineParser()->setMultCommentLine();
- parser->outlineParser()->lineCount(image.data());
+ parser->outlineParser()->lineCount(image);
if (count == 1)
parser->outlineParser()->oneLineComment(doc);
else
@@ -3523,26 +3523,26 @@ void VhdlParserTokenManager::SkipLexicalActions(Token *matchedToken){
}
case 7 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- parser->outlineParser()->handleFlowComment(image.data());
+ parser->outlineParser()->handleFlowComment(image);
break;
}
case 8 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- parser->outlineParser()->lineCount(image.data());
+ parser->outlineParser()->lineCount(image);
break;
}
case 9 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
{
- QCString q = filter2008VhdlComment(image.data());
- parser->outlineParser()->lineCount(image.data());
+ QCString q = filter2008VhdlComment(image);
+ parser->outlineParser()->lineCount(image);
parser->outlineParser()->handleCommentBlock(QCString(q),TRUE);image.clear();
}
break;
}
case 10 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- parser->outlineParser()->lineCount(image.data());image.clear();
+ parser->outlineParser()->lineCount(image);image.clear();
break;
}
default :
diff --git a/vhdlparser/vhdl_adj.py b/vhdlparser/vhdl_adj.py
index 8f549aaa80..ffb97065b5 100644
--- a/vhdlparser/vhdl_adj.py
+++ b/vhdlparser/vhdl_adj.py
@@ -13,11 +13,17 @@
# input used in their production; they are not affected by this license.
import sys
+import re
+
+message_re = re.compile('message\s*\+=\s*("[^"]*")')
def main():
inputFile = open(sys.argv[1], 'r')
outputFile = open(sys.argv[2], 'w')
for line in inputFile:
+ # fix literal strings
+ line = re.sub(message_re,'message += reinterpret_cast<const JJChar*>(\\1)',line)
+ # fix missing return statements
outputFile.write(line.replace("assert(false);","assert(false);return QCString();"))
if __name__ == '__main__':
diff --git a/vhdlparser/vhdlparser.jj b/vhdlparser/vhdlparser.jj
index 0000367626..8b06e373fc 100644
--- a/vhdlparser/vhdlparser.jj
+++ b/vhdlparser/vhdlparser.jj
@@ -92,7 +92,7 @@ SKIP:
QCString doc(image.data());
int count=doc.contains("--!");
parser->outlineParser()->setMultCommentLine();
- parser->outlineParser()->lineCount(image.data());
+ parser->outlineParser()->lineCount(image);
if (count == 1)
parser->outlineParser()->oneLineComment(doc);
else
@@ -100,10 +100,10 @@ SKIP:
}
}
- |<VHDL_FLOWCHART_COMMENT: "--#" (~["\n", "\r"])* ("\n" | "\r" | "\r\n")?> { parser->outlineParser()->handleFlowComment(image.data());}
+ |<VHDL_FLOWCHART_COMMENT: "--#" (~["\n", "\r"])* ("\n" | "\r" | "\r\n")?> { parser->outlineParser()->handleFlowComment(image);}
|<VHDL_COMMENT: "--" (~["\n", "\r"])* ("\n" | "\r" | "\r\n")?>
{
- parser->outlineParser()->lineCount(image.data());}
+ parser->outlineParser()->lineCount(image);}
}
// VHDL 2008 comment /* .... */
@@ -113,14 +113,14 @@ SKIP :
<MULT_DOXYGEN_VHDL_COMMENT_2008 : "/*!" (~["*"])* "*" ("*" | ~["*","/"] (~["*"])* "*")* "/">
{
{
- QCString q = filter2008VhdlComment(image.data());
- parser->outlineParser()->lineCount(image.data());
+ QCString q = filter2008VhdlComment(image);
+ parser->outlineParser()->lineCount(image);
parser->outlineParser()->handleCommentBlock(QCString(q),TRUE);image.clear();
}
}
| <MULT_VHDL_2008_COMMENT : "/*" (~["*"])* "*" ("*" | ~["*","/"] (~["*"])* "*")* "/">
{
- parser->outlineParser()->lineCount(image.data());image.clear();}
+ parser->outlineParser()->lineCount(image);image.clear();}
}
/* KEYWORDS */
@@ -357,7 +357,7 @@ QCString actual_designator() :
{
t=<OPEN_T> { return QCString(t->image); }
|
-LOOKAHEAD([ <INERTIAL_T> ] expression()) [ t=<INERTIAL_T> {s=t->image+" ";}] str=expression() { return s+str; }
+LOOKAHEAD([ <INERTIAL_T> ] expression()) [ t=<INERTIAL_T> {s=QCString(t->image)+" ";}] str=expression() { return s+str; }
|
LOOKAHEAD(5) str=subtype_indication() {return str;}
|
@@ -2544,7 +2544,7 @@ void process_statement() : {QCString s,s1,s2;Token *tok=0;Token *tok1=0;}
m_sharedState->currP=0;
if(tok)
s1=tok->image;
- outlineParser()->createFunction(m_sharedState->currName.data(),VhdlDocGen::PROCESS,s1.data());
+ outlineParser()->createFunction(m_sharedState->currName,VhdlDocGen::PROCESS,s1);
outlineParser()->createFlow();
m_sharedState->currName="";
outlineParser()->newEntry();
@@ -3136,7 +3136,7 @@ void subprogram_specification() : {QCString s;Token *tok=0;Token *t;}
<PROCEDURE_T> s=designator()
{
m_sharedState->currP=VhdlDocGen::PROCEDURE;
- outlineParser()->createFunction(s.data(),m_sharedState->currP,0);
+ outlineParser()->createFunction(s,m_sharedState->currP,0);
m_sharedState->tempEntry=m_sharedState->current;
m_sharedState->current->startLine=outlineParser()->getLine(PROCEDURE_T);
m_sharedState->current->bodyLine=outlineParser()->getLine(PROCEDURE_T);
@@ -3150,10 +3150,10 @@ void subprogram_specification() : {QCString s;Token *tok=0;Token *t;}
[ (tok=<PURE_T> | tok=<IMPURE_T>) ] t=<FUNCTION_T> { m_sharedState->currP=VhdlDocGen::FUNCTION;} s=designator() [subprogram_header()]
{
- if(tok)
- outlineParser()->createFunction(tok->image.c_str(),m_sharedState->currP,s.data());
+ if (tok)
+ outlineParser()->createFunction(tok->image,m_sharedState->currP,s);
else
- outlineParser()->createFunction(0,m_sharedState->currP,s.data());
+ outlineParser()->createFunction(QCString(),m_sharedState->currP,s);
m_sharedState->tempEntry=m_sharedState->current;
m_sharedState->current->startLine=outlineParser()->getLine(FUNCTION_T);

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Fri Jun 23 12:00:15 UTC 2023 - pgajdos@suse.com
- version update to 1.9.7
* https://www.doxygen.nl/manual/changelog.html#log_1_9_7
- modified patches
% doxygen-no-libclang-cpp.patch (refreshed)
% doxygen-no-lowercase-man-names.patch (refreshed)
- deleted patches
- Fix-boundingbox-parsing_part1.patch (upstreamed)
- Fix-boundingbox-parsing_part2.patch (upstreamed)
- Fix-boundingbox-parsing_part3.patch (upstreamed)
- Fix-boundingbox-parsing_part4.patch (upstreamed)
-------------------------------------------------------------------
Mon Apr 24 12:16:18 UTC 2023 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -22,7 +22,7 @@
%endif
Name: doxygen
Version: 1.9.6
Version: 1.9.7
Release: 0
Summary: Automated C, C++, and Java Documentation Generator
# qtools are used for building and they are GPL-3.0 licensed
@ -34,11 +34,6 @@ Source0: https://www.doxygen.nl/files/doxygen-%{version}.src.tar.gz
Patch1: %{name}-no-lowercase-man-names.patch
# The unified libclang-cpp library doesn't exist on older Leap / SLE
Patch10: doxygen-no-libclang-cpp.patch
# Fix PDF boudingbox parsing when dot uses cairo >= 1.17.6 -- https://github.com/doxygen/doxygen/issues/9319
Patch20: https://github.com/doxygen/doxygen/commit/966d69c603b5.patch#/Fix-boundingbox-parsing_part1.patch
Patch21: https://github.com/doxygen/doxygen/commit/7b2a6027775b.patch#/Fix-boundingbox-parsing_part2.patch
Patch22: https://github.com/doxygen/doxygen/commit/f3514d578633.patch#/Fix-boundingbox-parsing_part3.patch
Patch23: https://github.com/doxygen/doxygen/commit/8129939c312e.patch#/Fix-boundingbox-parsing_part4.patch
BuildRequires: bison
BuildRequires: cmake >= 2.8.12
BuildRequires: flex
@ -73,10 +68,6 @@ as well.
%patch10 -p1
%endif
%endif
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%build
%cmake \

View File

@ -17,7 +17,7 @@
Name: doxywizard
Version: 1.9.6
Version: 1.9.7
Release: 0
Summary: Graphical User Interface for Doxygen
# qtools are used for building and they are GPL-3.0 licensed
@ -73,6 +73,8 @@ configuration files.
%if 0%{?suse_version} > 1230 && 0%{?suse_version} != 1315
%check
# https://github.com/doxygen/doxygen/issues/10053
rm -r testing/061*
export LANG=C.UTF-8
# testing doxygen package here to avoid build
# cycle between latex and doxygen