Bug 775493 - Usage of underscore's in parameter names
This commit is contained in:
		
							parent
							
								
									2920bf432f
								
							
						
					
					
						commit
						1fdd96ddf3
					
				
							
								
								
									
										93
									
								
								doxygen-1.8.13-#775493.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										93
									
								
								doxygen-1.8.13-#775493.patch
									
									
									
									
									
										Normal file
									
								
							| @ -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 ------------ */
 | ||||||
|  | +<ParamArg1>{ID}/{B}*","                 {
 | ||||||
|  | +                                          if (yytext[0]=='_' && Config_getBool(MARKDOWN_SUPPORT))
 | ||||||
|  | +                                          {
 | ||||||
|  | +                                            addOutput('\\');
 | ||||||
|  | +                                          }
 | ||||||
|  | +                                          addOutput(yytext);
 | ||||||
|  | +                                        }
 | ||||||
|  | +<ParamArg1>","                          {
 | ||||||
|  | +                                          addOutput(" , ");
 | ||||||
|  | +                                        }
 | ||||||
|  | +<ParamArg1>{ID}                         {
 | ||||||
|  | +                                          if (yytext[0]=='_' && Config_getBool(MARKDOWN_SUPPORT))
 | ||||||
|  | +                                          {
 | ||||||
|  | +                                            addOutput('\\');
 | ||||||
|  | +                                          }
 | ||||||
|  | +                                          addOutput(yytext);
 | ||||||
|  | +                                          BEGIN( Comment );
 | ||||||
|  | +                                        }
 | ||||||
|  | +<ParamArg1>.                            {
 | ||||||
|  | +                                          unput(yytext[0]);
 | ||||||
|  | +                                          BEGIN( Comment );
 | ||||||
|  | +                                        }
 | ||||||
|  | +
 | ||||||
|  |    /* --------- handle arguments of the file/dir/example command ------------ */ | ||||||
|  |   | ||||||
|  |  <FileDocArg1>{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); | ||||||
| @ -2,7 +2,7 @@ Summary: A documentation system for C/C++ | |||||||
| Name:    doxygen | Name:    doxygen | ||||||
| Epoch:   1 | Epoch:   1 | ||||||
| Version: 1.8.13 | Version: 1.8.13 | ||||||
| Release: 2%{?dist} | Release: 3%{?dist} | ||||||
| 
 | 
 | ||||||
| # No version is specified. | # No version is specified. | ||||||
| License: GPL+ | License: GPL+ | ||||||
| @ -12,7 +12,9 @@ Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz | |||||||
| Source1: doxywizard.png | Source1: doxywizard.png | ||||||
| Source2: doxywizard.desktop | 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: perl | ||||||
| BuildRequires: tex(dvips) | BuildRequires: tex(dvips) | ||||||
| @ -132,6 +134,9 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE2} | |||||||
| # intentionally left blank | # intentionally left blank | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Thu Jan 19 2017 Than Ngo <than@redhat.com> - 1:1.8.13-3 | ||||||
|  | - Bug 775493 - Usage of underscore's in parameter names | ||||||
|  | 
 | ||||||
| * Tue Jan 17 2017 Björn Esser <besser82@fedoraproject.org> - 1:1.8.13-2 | * Tue Jan 17 2017 Björn Esser <besser82@fedoraproject.org> - 1:1.8.13-2 | ||||||
| - Add upstream patch to fix regression (rhbz#1413296) | - Add upstream patch to fix regression (rhbz#1413296) | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user