From 1fdd96ddf35b503a0dd282aa8c4fdc221d2ca46b Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Thu, 19 Jan 2017 11:09:55 +0100 Subject: [PATCH] Bug 775493 - Usage of underscore's in parameter names --- doxygen-1.8.13-#775493.patch | 93 ++++++++++++++++++++++++++++++++++++ doxygen.spec | 9 +++- 2 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 doxygen-1.8.13-#775493.patch diff --git a/doxygen-1.8.13-#775493.patch b/doxygen-1.8.13-#775493.patch new file mode 100644 index 0000000..0a20583 --- /dev/null +++ b/doxygen-1.8.13-#775493.patch @@ -0,0 +1,93 @@ +diff --git a/src/commentscan.l b/src/commentscan.l +index fad09d9..f26cabd 100644 +--- a/src/commentscan.l ++++ b/src/commentscan.l +@@ -125,6 +125,8 @@ static bool handleCopyBrief(const QCString &); + static bool handleCopyDetails(const QCString &); + static bool handleParBlock(const QCString &); + static bool handleEndParBlock(const QCString &); ++static bool handleParam(const QCString &); ++static bool handleRetval(const QCString &); + + typedef bool (*DocCmdFunc)(const QCString &name); + +@@ -247,7 +249,7 @@ static DocCmdMap docCmdMap[] = + { "line", 0, TRUE }, + { "note", 0, TRUE }, + { "par", 0, TRUE }, +- { "param", 0, TRUE }, ++ { "param", &handleParam, TRUE }, + { "tparam", 0, TRUE }, + { "post", 0, TRUE }, + { "pre", 0, TRUE }, +@@ -257,7 +259,7 @@ static DocCmdMap docCmdMap[] = + { "return", 0, TRUE }, + { "returns", 0, TRUE }, + { "exception", 0, TRUE }, +- { "retval", 0, TRUE }, ++ { "retval", &handleRetval, TRUE }, + { "sa", 0, TRUE }, + { "see", 0, TRUE }, + { "since", 0, TRUE }, +@@ -971,6 +973,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" + %x XRefItemParam2 + %x XRefItemParam3 + %x FileDocArg1 ++%x ParamArg1 + %x EnumDocArg1 + %x NameSpaceDocArg1 + %x PackageDocArg1 +@@ -1564,6 +1567,30 @@ RCSTAG "$"{ID}":"[^\n$]+"$" + BEGIN( Comment ); + } + ++ /* --------- handle arguments of the param command ------------ */ ++{ID}/{B}*"," { ++ if (yytext[0]=='_' && Config_getBool(MARKDOWN_SUPPORT)) ++ { ++ addOutput('\\'); ++ } ++ addOutput(yytext); ++ } ++"," { ++ addOutput(" , "); ++ } ++{ID} { ++ if (yytext[0]=='_' && Config_getBool(MARKDOWN_SUPPORT)) ++ { ++ addOutput('\\'); ++ } ++ addOutput(yytext); ++ BEGIN( Comment ); ++ } ++. { ++ unput(yytext[0]); ++ BEGIN( Comment ); ++ } ++ + /* --------- handle arguments of the file/dir/example command ------------ */ + + {DOCNL} { // no file name specfied +@@ -2400,6 +2427,22 @@ static bool handleFile(const QCString &) + return stop; + } + ++static bool handleParam(const QCString &) ++{ ++ // we need process param and retval arguments to escape leading underscores in case of ++ // markdown processing, see bug775493 ++ addOutput("@param "); ++ BEGIN( ParamArg1 ); ++ return FALSE; ++} ++ ++static bool handleRetval(const QCString &) ++{ ++ addOutput("@retval "); ++ BEGIN( ParamArg1 ); ++ return FALSE; ++} ++ + static bool handleDir(const QCString &) + { + bool stop=makeStructuralIndicator(Entry::DIRDOC_SEC); diff --git a/doxygen.spec b/doxygen.spec index b71f1c8..1b239d5 100644 --- a/doxygen.spec +++ b/doxygen.spec @@ -2,7 +2,7 @@ Summary: A documentation system for C/C++ Name: doxygen Epoch: 1 Version: 1.8.13 -Release: 2%{?dist} +Release: 3%{?dist} # No version is specified. License: GPL+ @@ -12,7 +12,9 @@ Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz Source1: doxywizard.png Source2: doxywizard.desktop -Patch0: https://github.com/doxygen/doxygen/pull/555.patch#/doxygen-xmlgen-regression.patch +# upstream patches +Patch100: https://github.com/doxygen/doxygen/pull/555.patch#/doxygen-xmlgen-regression.patch +Patch101: doxygen-1.8.13-#775493.patch BuildRequires: perl BuildRequires: tex(dvips) @@ -132,6 +134,9 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE2} # intentionally left blank %changelog +* Thu Jan 19 2017 Than Ngo - 1:1.8.13-3 +- Bug 775493 - Usage of underscore's in parameter names + * Tue Jan 17 2017 Björn Esser - 1:1.8.13-2 - Add upstream patch to fix regression (rhbz#1413296)