[2/3] [docs] winelib: Do not indent verbatim environments

Frédéric Delanoy frederic.delanoy at gmail.com
Tue Sep 10 01:37:52 CDT 2013


Verbatim block-mode environments, like <screen> or <programlisting> shouldn't be indented:
- this extra space yields an extraneous blank line after each such indented block when converted
- custom indentation/spacing for blocks should use stylesheets like DSSSL or XSL
---
 en/winelib-bindlls.sgml |  4 +--
 en/winelib-intro.sgml   | 24 +++++++--------
 en/winelib-mfc.sgml     |  4 +--
 en/winelib-toolkit.sgml | 78 ++++++++++++++++++++++++-------------------------
 4 files changed, 55 insertions(+), 55 deletions(-)

diff --git a/en/winelib-bindlls.sgml b/en/winelib-bindlls.sgml
index 3638a0b..671ae99 100644
--- a/en/winelib-bindlls.sgml
+++ b/en/winelib-bindlls.sgml
@@ -122,7 +122,7 @@ signed short MyLinuxFunc (unsigned short a, void *b, void *c,
         Doing this ensures that the high bits of the returned value are set
 	correctly.  Also unlike with the ODBC example we will link directly to
 	the Linux Shared Library.
-        <programlisting>
+<programlisting language="c">
 /*
  * File: MyWin.c
  *
@@ -166,7 +166,7 @@ signed short WINAPI MyProxyWinFunc (unsigned short a, void *b, void *c,
 }
 
 /* End of file */
-        </programlisting>
+</programlisting>
       </para>
       <para>
         For a more extensive case we can use the ODBC example.  This is
diff --git a/en/winelib-intro.sgml b/en/winelib-intro.sgml
index d76a52e..cd5f82f 100644
--- a/en/winelib-intro.sgml
+++ b/en/winelib-intro.sgml
@@ -129,10 +129,10 @@
           as just running the two commands below (note the dot indicating
           current directory at the end of the first command):
         </para>
-        <screen>
-          <prompt>$ </prompt><userinput>winemaker --lower-uppercase .</userinput>
-          <prompt>$ </prompt><userinput>make</userinput>
-        </screen>
+<screen>
+<prompt>$ </prompt><userinput>winemaker --lower-uppercase .</userinput>
+<prompt>$ </prompt><userinput>make</userinput>
+</screen>
 
         <para>
           But of course things are not always that simple which is why we have
@@ -160,10 +160,10 @@
           Now run the commands mentioned above from the <filename
           class="directory">notepad2</filename> directory:
         </para>
-        <screen>
-          <prompt>$ </prompt><userinput>winemaker --lower-uppercase .</userinput>
-          <prompt>$ </prompt><userinput>make</userinput>
-        </screen>
+<screen>
+<prompt>$ </prompt><userinput>winemaker --lower-uppercase .</userinput>
+<prompt>$ </prompt><userinput>make</userinput>
+</screen>
 
         <para>
           Notice how it fails linking, because of undefined reference to
@@ -178,10 +178,10 @@
           be a list of import libraries. Now run <command>winemaker</command> again, but with
           these libraries prefixed by <option>-i</option>:
         </para>
-        <screen>
-          <prompt>$ </prompt><userinput>winemaker --lower-uppercase -icomdlg32 -ishell32 -ishlwapi -iuser32 -igdi32 -iadvapi32 .</userinput>
-          <prompt>$ </prompt><userinput>make</userinput>
-        </screen>
+<screen>
+<prompt>$ </prompt><userinput>winemaker --lower-uppercase -icomdlg32 -ishell32 -ishlwapi -iuser32 -igdi32 -iadvapi32 .</userinput>
+<prompt>$ </prompt><userinput>make</userinput>
+</screen>
 
         <para>
           You are done! Now you can start the application as
diff --git a/en/winelib-mfc.sgml b/en/winelib-mfc.sgml
index d169c21..cb04e5d 100644
--- a/en/winelib-mfc.sgml
+++ b/en/winelib-mfc.sgml
@@ -150,14 +150,14 @@
         support is not very good.  Here are the AFX options I use:
       </para>
       <para>
-        <programlisting>
+<programlisting language="c">
 #define _AFX_PORTABLE
 #define _FORCENAMELESSUNION
 #define _AFX_NO_DAO_SUPPORT
 #define _AFX_NO_DHTML_SUPPORT
 #define _AFX_NO_OLEDB_SUPPORT
 #define _AFX_NO_RICHEDIT_SUPPORT
-        </programlisting>
+</programlisting>
       </para>
       <para>
         You will also need custom ones for
diff --git a/en/winelib-toolkit.sgml b/en/winelib-toolkit.sgml
index 77c5fa4..b6bdb65 100644
--- a/en/winelib-toolkit.sgml
+++ b/en/winelib-toolkit.sgml
@@ -25,10 +25,10 @@
           The usage is very easy, just replace the path to the source folder
           with the path to the project file.
         </para>
-        <screen>
-          <prompt>$ </prompt><userinput>winemaker --lower-uppercase myproject.vcproj</userinput>
-          <prompt>$ </prompt><userinput>make</userinput>
-        </screen>
+<screen>
+<prompt>$ </prompt><userinput>winemaker --lower-uppercase myproject.vcproj</userinput>
+<prompt>$ </prompt><userinput>make</userinput>
+</screen>
       </sect2>
 
       <sect2 id="source-analysis">
@@ -209,10 +209,10 @@
           project / target. You should consider adding more options to
           the following example:
         </para>
-        <screen>
-          <prompt>$ </prompt><userinput>winemaker --interactive .</userinput>
-          <prompt>$ </prompt><userinput>make</userinput>
-        </screen>
+<screen>
+<prompt>$ </prompt><userinput>winemaker --interactive .</userinput>
+<prompt>$ </prompt><userinput>make</userinput>
+</screen>
       </sect2>
 
       <sect2 id="Makefile">
@@ -222,13 +222,13 @@
           So this is the file to modify if you want to customize things. 
           Here's a detailed description of its content:
         </para>
-        <programlisting>
+<programlisting>
 SRCDIR                = .
 SUBDIRS               =
 DLLS                  =
 LIBS                  =
 EXES                  = hello.exe
-        </programlisting>
+</programlisting>
         <para>
           This is where the targets for this directory are listed. The names 
           are pretty self-explanatory. <varname>SUBDIRS</varname> is usually 
@@ -238,7 +238,7 @@ EXES                  = hello.exe
           <filename class="extension">.exe</filename>
           extension. Note that these names must be in all lowercase.
         </para>
-        <programlisting>
+<programlisting>
 ### Common settings
 
 DEFINES               = -DSTRICT
@@ -247,7 +247,7 @@ DLL_PATH              =
 DLL_IMPORTS           =
 LIBRARY_PATH          =
 LIBRARIES             =
-        </programlisting>
+</programlisting>
         <para>
           This section contains the global compilation settings: they apply
           to all the targets in this makefile. The <varname>LIBRARIES</varname>
@@ -271,13 +271,13 @@ LIBRARIES             =
           Then there is one section per target, each describing the various 
           components that target is made of.
         </para>
-        <programlisting>
+<programlisting>
 ### hello.exe sources and settings
 
 hello_exe_C_SRCS          = hello.c
 hello_exe_CXX_SRCS        =
 hello_exe_RC_SRCS         =
-        </programlisting>
+</programlisting>
         <para>
           The above variables list the sources that are used to generate the 
           target. Each section will start with a comment indicating the name of
@@ -286,12 +286,12 @@ hello_exe_RC_SRCS         =
           different from that of the target because of restrictions on the 
           variable names.
         </para>
-        <programlisting>
+<programlisting>
 hello_exe_DLL_PATH        =
 hello_exe_DLLS            =
 hello_exe_LIBRARY_PATH    =
 hello_exe_LIBRARIES       =
-        </programlisting>
+</programlisting>
         <para>
           The above variables specify how to link the target. Note that they 
           add to the global settings we saw at the beginning of this file.
@@ -301,38 +301,38 @@ hello_exe_LIBRARIES       =
           DLLs that executable imports. It should contain the full DLL name,
           but not the <option>-l</option> option.
         </para>
-        <programlisting>
+<programlisting>
 hello_exe_OBJS        = $(hello_exe_C_SRCS:.c=.o) \
                         $(hello_exe_CXX_SRCS:.cpp=.o) \
                         $(hello_exe_RC_SRCS:.rc=.res)
-        </programlisting>
+</programlisting>
         <para>
           The above just builds a list of all the object files that 
           correspond to this target. This list is later used for the link 
           command.
         </para>
-        <programlisting>
+<programlisting>
 ### Global source lists
 
 C_SRCS                = $(hello_exe_C_SRCS)
 CXX_SRCS              = $(hello_exe_CXX_SRCS)
 RC_SRCS               = $(hello_exe_RC_SRCS)
-        </programlisting>
+</programlisting>
         <para>
-          This section builds 'summary' lists of source files.
+          This section builds <quote>summary</quote> lists of source files.
         </para>
-        <programlisting>
+<programlisting>
 ### Generic targets
 
 all: $(SUBDIRS) $(DLLS:%=%.so) $(LIBS) $(EXES)
-        </programlisting>
+</programlisting>
         <para>
           The above first defines the default target for this makefile. Here 
           it consists in trying to build all the targets.
         </para>
-        <programlisting>
+<programlisting>
 ### Target specific build rules
-        </programlisting>
+</programlisting>
         <para>
           Then come additional directives to link the executables and 
           libraries. These are pretty much standard and you should not need 
@@ -355,7 +355,7 @@ all: $(SUBDIRS) $(DLLS:%=%.so) $(LIBS) $(EXES)
         But if you were to write your own makefile you would put something 
         like the following:
       </para>
-      <programlisting>
+<programlisting>
 WRC=$(WINE_DIR)/tools/wrc/wrc
 
 WINELIB_FLAGS = -I$(WINE_DIR)/include -DWINELIB -D_REENTRANT
@@ -365,7 +365,7 @@ WRCFLAGS      = -r -L
 
 .rc.res:
 	$(WRC) $(WRCFLAGS) $(WINELIB_FLAGS) -o $@ $<
-      </programlisting>
+</programlisting>
       <para>
         There are two issues you are likely to encounter with resource files.
       </para>
@@ -399,11 +399,11 @@ WRCFLAGS      = -r -L
             Or you could use the C/C++ compiler to perform the preprocessing. 
             To do so, simply modify your makefile as follows:
           </para>
-          <programlisting>
+<programlisting>
 .rc.res:
 	$(CC) $(CC_OPTS) -DRC_INVOKED -E -x c $< | $(WRC) -N $(WRCFLAGS) $(WINELIB_FLAGS) -o $@
 
-          </programlisting>
+</programlisting>
           <!-- FIXME: does this still cause problems for the line numbers? -->
         </listitem>
       </itemizedlist>
@@ -454,12 +454,12 @@ WRCFLAGS      = -r -L
         <para>
           A typical spec file will look something like this:
         </para>
-        <screen>
+<screen>
 @ stdcall -private DllCanUnloadNow()
 @ stdcall -private DllGetClassObject(ptr ptr ptr)
 @ stdcall -private DllRegisterServer()
 @ stdcall -private DllUnregisterServer()
-        </screen>
+</screen>
       </sect2>
 
       <sect2 id="spec-reference">
@@ -469,19 +469,19 @@ WRCFLAGS      = -r -L
           Here is a more detailed description of the spec file format.
         </para>
 
-        <programlisting>
+<programlisting>
 # <replaceable>comment text</replaceable>
-        </programlisting>
+</programlisting>
         <para>
           Anything after a '#' will be ignored as comments.
         </para>
 
-        <programlisting>
+<programlisting>
 ORDINAL FUNCTYPE OPTIONS EXPORTNAME([ARGTYPE [ARGTYPE [...]]]) HANDLERNAME
 @ stdcall CreateDesktopW(wstr wstr ptr long long ptr)
 @ stdcall CM_Get_Parent(ptr long long) setupapi.CM_Get_Parent
 @ cdecl -arch=x86_64 ceilf(float) MSVCRT_ceilf
-        </programlisting>
+</programlisting>
         <para>
           This field can be present zero or more times.
           Each instance defines a function entry point. The prototype 
@@ -686,9 +686,9 @@ ORDINAL FUNCTYPE OPTIONS EXPORTNAME([ARGTYPE [ARGTYPE [...]]]) HANDLERNAME
           <filename>user32.spec</filename> for an example.
         </para>
 
-        <programlisting>
+<programlisting>
 ORDINAL stub EXPORTNAME
-        </programlisting>
+</programlisting>
         <para>
           This field can be present zero or more times.
           Each instance defines a stub function. It makes the ordinal 
@@ -696,9 +696,9 @@ ORDINAL stub EXPORTNAME
           an error message if the function is ever called.
         </para>
 
-        <programlisting>
+<programlisting>
 ORDINAL extern EXPORTNAME SYMBOLNAME
-        </programlisting>
+</programlisting>
         <para>
           This field can be present zero or more times.
           Each instance defines an entry that simply maps to a Wine symbol
-- 
1.8.4




More information about the wine-patches mailing list