commit f8eb6da1554f52a9df518e15dee13be3dbd7663f
parent 129e3382f30b1ea7d5265711ffe615a82defd8a1
Author: Mattias Andrée <maandree@kth.se>
Date: Mon, 9 May 2016 18:22:43 +0200
Small improvements to the manual
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat:
3 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/doc/get-started.tex b/doc/get-started.tex
@@ -156,14 +156,11 @@ jump, call {\tt setjmp} and {\tt zsetup} again.
\begin{alltt}
jmp_buf jmpenv;
-
if (setjmp(jmpenv)) \{
\textcolor{c}{/* \textrm{\ldots} */}
\}
zsetup(jmpenv);
-
\textcolor{c}{/* \textrm{\ldots} */}
-
if (setjmp(jmpenv)) \{
\textcolor{c}{/* \textrm{\ldots} */}
\}
diff --git a/doc/libzahl.tex b/doc/libzahl.tex
@@ -5,7 +5,6 @@
\usepackage{algorithmic, algorithm, colonequals, alltt}
\usepackage{amsmath, amssymb, mathtools, MnSymbol, mathrsfs, esvect}
\usepackage{tipa, color, graphicx}
-\usepackage{microtype}
\usepackage{shorttoc, minitoc}
\usepackage[english]{babel}
\selectlanguage{english}
@@ -28,7 +27,9 @@
\makeindex
\usepackage{geometry}
\geometry{margin=1in}
-%\DisableLigatures{encoding = *, family = *}
+\usepackage{microtype}
+\DisableLigatures{encoding = *, family = *} % NB! disables -- and ---
+\frenchspacing
\newcommand{\chapref}[1]{\hyperref[#1]{Chapter~\ref*{#1} [\nameref*{#1}], page \pageref*{#1}}}
\newcommand{\secref}[1]{\hyperref[#1]{Section~\ref*{#1} [\nameref*{#1}], page \pageref*{#1}}}
diff --git a/doc/libzahls-design.tex b/doc/libzahls-design.tex
@@ -24,8 +24,8 @@ the number multiplied by the size of an element.
Powers of two (growth factor 2) is not the most memory
efficient way to do this, but it is the simplest and
performance efficient. This power of two (sans the few
-extra elements) is used to calculate --- getting the index
-of the only set bit --- the index of the bucket in
+extra elements) is used to calculate — getting the index
+of the only set bit — the index of the bucket in
which the allocation is stored when pooled. The buckets
are dynamic arrays with the growth factor 1.5. The
growth factor 1.5 is often used for dynamic arrays, it
@@ -106,7 +106,10 @@ software that uses libzahl.
\label{sec:Integer structure}
The data type used to represent a big integer with
-libzahl is {\tt z\_t}, defined as
+libzahl is {\tt z\_t},\footnote{This name actually
+violates the naming convention; it should be {\tt Z},
+or {\tt Zahl} to avoid single-letter names. But this
+violation is common place.} defined as
\begin{alltt}
typedef struct zahl z_t[1];
@@ -117,10 +120,10 @@ where {\tt struct zahl} is defined as
\begin{alltt}
struct zahl \{
- int sign;
+ int sign; \textcolor{c}{/* \textrm{\emph{not} short for `signum'} */}
size_t used;
- size_t alloced;
- zahl_char_t *chars;
+ size_t alloced; \textcolor{c}{/* \textrm{short for `allocated'} */}
+ zahl_char_t *chars; \textcolor{c}{/* \textrm{short for `characters'} */}
\};
\end{alltt}