From a779a09771f7373b8d1e77d7a9182fd3ed9008e5 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 9 Feb 2015 13:24:29 +0100 Subject: [PATCH] Fixed creation of command reference in manual --- CodingReadme | 8 ++++++++ kernel/register.cc | 7 +++---- manual/command-reference-manual.tex | 10 +++++----- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/CodingReadme b/CodingReadme index 46624e9c7..f4924dfb2 100644 --- a/CodingReadme +++ b/CodingReadme @@ -282,6 +282,14 @@ Update the CHANGELOG file: vi CHANGELOG +Update command reference in manual: + + cd ~yosys + make + cd manual + ../yosys -p 'help -write-tex-command-reference-manual' + + Run all tests with "make config-{clang,gcc,gcc-4.6}": cd ~yosys diff --git a/kernel/register.cc b/kernel/register.cc index 56dc695aa..cdba4c36f 100644 --- a/kernel/register.cc +++ b/kernel/register.cc @@ -545,11 +545,10 @@ struct HelpPass : public Pass { } void escape_tex(std::string &tex) { - size_t pos = 0; - while ((pos = tex.find('_', pos)) != std::string::npos) { + for (size_t pos = 0; (pos = tex.find('_', pos)) != std::string::npos; pos += 2) tex.replace(pos, 1, "\\_"); - pos += 2; - } + for (size_t pos = 0; (pos = tex.find('$', pos)) != std::string::npos; pos += 2) + tex.replace(pos, 1, "\\$"); } void write_tex(FILE *f, std::string cmd, std::string title, std::string text) { diff --git a/manual/command-reference-manual.tex b/manual/command-reference-manual.tex index 047ec4214..d653f4093 100644 --- a/manual/command-reference-manual.tex +++ b/manual/command-reference-manual.tex @@ -346,7 +346,7 @@ evaluated in the other design. Copy modules from the current design into the soecified one. \end{lstlisting} -\section{dff2dffe -- transform $dff cells to $dffe cells} +\section{dff2dffe -- transform \$dff cells to \$dffe cells} \label{cmd:dff2dffe} \begin{lstlisting}[numbers=left,frame=single] dff2dffe [selection] @@ -420,7 +420,7 @@ Print all commands to log before executing them. Do not print all commands to log before executing them. (default) \end{lstlisting} -\section{equiv\_add -- add a $equiv cell} +\section{equiv\_add -- add a \$equiv cell} \label{cmd:equiv_add} \begin{lstlisting}[numbers=left,frame=single] equiv_add gold_sig gate_sig @@ -428,7 +428,7 @@ Do not print all commands to log before executing them. (default) This command adds an $equiv cell for the specified signals. \end{lstlisting} -\section{equiv\_induct -- proving $equiv cells using temporal induction} +\section{equiv\_induct -- proving \$equiv cells using temporal induction} \label{cmd:equiv_induct} \begin{lstlisting}[numbers=left,frame=single] equiv_induct [options] [selection] @@ -501,7 +501,7 @@ This creates a miter module for further analysis of the selected $equiv cells. Create compare logic that handles undefs correctly \end{lstlisting} -\section{equiv\_remove -- remove $equiv cells} +\section{equiv\_remove -- remove \$equiv cells} \label{cmd:equiv_remove} \begin{lstlisting}[numbers=left,frame=single] equiv_remove [options] [selection] @@ -516,7 +516,7 @@ used then only proven cells are removed. keep gate circuit \end{lstlisting} -\section{equiv\_simple -- try proving simple $equiv instances} +\section{equiv\_simple -- try proving simple \$equiv instances} \label{cmd:equiv_simple} \begin{lstlisting}[numbers=left,frame=single] equiv_simple [options] [selection]