From 4effe5759a1229be4ce152db87172119ddcb45bb Mon Sep 17 00:00:00 2001
From: Mark Wooding <mdw@distorted.org.uk>
Date: Tue, 15 Dec 2015 19:15:23 +0000
Subject: [PATCH] doc/sod.sty, doc/structures.tex: Use non-indenting variant of
 `prog'.

Otherwise space is wasted when program fragments are shown in floats.
---
 doc/sod.sty        | 5 ++++-
 doc/structures.tex | 8 ++++----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/doc/sod.sty b/doc/sod.sty
index ed39c24..9c9aaf8 100644
--- a/doc/sod.sty
+++ b/doc/sod.sty
@@ -124,8 +124,11 @@
 %% Environment for setting programs.  Newlines are explicit, because
 %% otherwise I need comments in weird places to make the vertical spacing
 %% come out properly.  You can write `\obeylines' if you really want to.
-\def\prog{\let\prog@@cr\@tabcr\let\@tabcr\@progcr\codeface\quote\tabbing}
+\def\@prog{\let\prog@@cr\@tabcr\let\@tabcr\@progcr\codeface\tabbing}
+\def\prog{\quote\@prog}
 \def\endprog{\endtabbing\endquote}
+\let\nprog\@prog
+\let\endnprog\endtabbing
 \def\ind{\quad\=\+\kill}
 \def\@progcr{\futurelet\@tempa\@progcr@i}
 {\def\:{\gdef\@progcr@sp}\: {\@progcr}}
diff --git a/doc/structures.tex b/doc/structures.tex
index 2fcbb2e..9c0451e 100644
--- a/doc/structures.tex
+++ b/doc/structures.tex
@@ -92,7 +92,7 @@ recommended.
 
 \begin{figure}[tbp]
   \begin{tabular}{p{10pt}p{10pt}}
-    \begin{prog}
+    \begin{nprog}
       struct SodObject__ilayout \{ \\ \ind
         union \{ \\ \ind
           struct SodObject__ichain_obj \{ \\ \ind
@@ -100,14 +100,14 @@ recommended.
           \} obj; \- \\
         \} obj; \- \\
       \};
-    \end{prog}
+    \end{nprog}
     &
-    \begin{prog}
+    \begin{nprog}
       struct SodObject__vt_obj \{ \\ \ind
         const SodClass *_class; \\
         size_t _base; \- \\
       \};
-    \end{prog} \\
+    \end{nprog} \\
   \end{tabular}
   \caption{Instance and vtable layout of @|SodObject|}
   \label{fig:structures.root.sodobject}
-- 
2.11.0

