Correct programlisting elements, fix trailing spaces, tabs after spaces,

and blank lines.  Translators may wish to verify the output of
programlisting elements.  Although these are whitespace changes, they can
result in differences in the rendered output.
This commit is contained in:
Warren Block 2012-01-07 22:08:17 +00:00
parent 83d74f0570
commit 97b9b5c3f7
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=38152

View file

@ -239,33 +239,29 @@
<example>
<title>Newbus Methods</title>
<programlisting>
# Foo subsystem/driver (a comment...)
<programlisting> # Foo subsystem/driver (a comment...)
INTERFACE foo
METHOD int doit {
device_t dev;
};
# DEFAULT is the method that will be used, if a method was not
# provided via: DEVMETHOD()
METHOD void doit_to_child {
device_t dev;
driver_t child;
} DEFAULT doit_generic_to_child;
</programlisting>
METHOD int doit {
device_t dev;
};
# DEFAULT is the method that will be used, if a method was not
# provided via: DEVMETHOD()
METHOD void doit_to_child {
device_t dev;
driver_t child;
} DEFAULT doit_generic_to_child;</programlisting>
</example>
<para>When this interface is compiled, it generates a header file
<quote><filename>foo_if.h</filename></quote> which contains
function declarations:</para>
<programlisting>
int FOO_DOIT(device_t dev);
int FOO_DOIT_TO_CHILD(device_t dev, device_t child);
</programlisting>
<programlisting> int FOO_DOIT(device_t dev);
int FOO_DOIT_TO_CHILD(device_t dev, device_t child);</programlisting>
<para>A source file, <quote><filename>foo_if.c</filename></quote>
is also created to accompany the automatically generated header
@ -378,10 +374,9 @@
<programlisting>
struct driver {
KOBJ_CLASS_FIELDS;
void *priv; /* driver private data */
};
</programlisting>
KOBJ_CLASS_FIELDS;
void *priv; /* driver private data */
};</programlisting>
</figure>
<para>A <literal>device_state_t</literal> type, which is
@ -393,17 +388,15 @@
<title>Device
states<emphasis>device_state_t</emphasis></title>
<programlisting>
/*
<programlisting> /*
* src/sys/sys/bus.h
*/
typedef enum device_state {
DS_NOTPRESENT, /* not probed or probe failed */
DS_ALIVE, /* probe succeeded */
DS_ATTACHED, /* attach method called */
DS_BUSY /* device is open */
} device_state_t;
</programlisting>
DS_NOTPRESENT, /* not probed or probe failed */
DS_ALIVE, /* probe succeeded */
DS_ATTACHED, /* attach method called */
DS_BUSY /* device is open */
} device_state_t;</programlisting>
</figure>
</sect2>
</sect1>