chiark / gitweb /
man: fix a typo
[elogind.git] / man / sd_journal_next.xml
index f55ee157444f5d954f11f4de84fe4a879a8c1223..1409b0dba30c695541c07c33db6ec1285b2bf9ca 100644 (file)
@@ -47,6 +47,8 @@
                 <refname>sd_journal_previous</refname>
                 <refname>sd_journal_next_skip</refname>
                 <refname>sd_journal_previous_skip</refname>
+                <refname>SD_JOURNAL_FOREACH</refname>
+                <refname>SD_JOURNAL_FOREACH_BACKWARDS</refname>
                 <refpurpose>Advance or set back the read pointer in the journal</refpurpose>
         </refnamediv>
 
                                 <paramdef>uint64_t <parameter>skip</parameter></paramdef>
                         </funcprototype>
 
+                        <funcprototype>
+                                <funcdef><function>SD_JOURNAL_FOREACH</function></funcdef>
+                                <paramdef>sd_journal* <parameter>j</parameter></paramdef>
+                        </funcprototype>
+
+                        <funcprototype>
+                                <funcdef><function>SD_JOURNAL_FOREACH_BACKWARDS</function></funcdef>
+                                <paramdef>sd_journal* <parameter>j</parameter></paramdef>
+                        </funcprototype>
                 </funcsynopsis>
         </refsynopsisdiv>
 
                 functions such as
                 <citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
 
-                <para>Similar, <function>sd_journal_previous()</function> sets
+                <para>Similarly, <function>sd_journal_previous()</function> sets
                 the read pointer back one entry.</para>
 
                 <para><function>sd_journal_next_skip()</function> and
                 that the entry then pointing to is later in time than
                 then previous one, or has the same timestamp.</para>
 
+                <para>Note that
+                <citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                and related calls will fail unless
+                <function>sd_journal_next()</function> has been
+                invoked at least once in order to position the read
+                pointer on a journal entry.</para>
+
                 <para>Note that the
                 <function>SD_JOURNAL_FOREACH()</function> macro may be used
                 as a wrapper around
                 <citerefentry><refentrytitle>sd_journal_seek_head</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 and <function>sd_journal_next()</function> in order to
-                make iteratring through the journal easier. See below
-                for an example. Similar,
+                make iterating through the journal easier. See below
+                for an example. Similarly,
                 <function>SD_JOURNAL_FOREACH_BACKWARDS()</function>
                 may be used for iterating the journal in reverse
                 order.</para>
 
                 <para>The four calls return the number of entries
                 advanced/set back on success or a negative errno-style
-                error code. When the end (resp. beginning) of the journal
-                is reached a number smaller than requested is
+                error code. When the end or beginning of the journal
+                is reached, a number smaller than requested is
                 returned. More specifically, if
                 <function>sd_journal_next()</function> or
                 <function>sd_journal_previous()</function> reach the
                 <para>The <function>sd_journal_next()</function>, <function>sd_journal_previous()</function>,
                 <function>sd_journal_next_skip()</function> and
                 <function>sd_journal_previous_skip()</function> interfaces are
-                available as shared library, which can be compiled and
+                available as shared library, which can be compiled and
                 linked to with the
-                <literal>libsystemd-journal</literal>
-                <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                <constant>libsystemd-journal</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                 file.</para>
         </refsect1>
 
@@ -187,7 +204,9 @@ int main(int argc, char *argv[]) {
                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
                         <citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-                        <citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+                        <citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+                        <citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>
                 </para>
         </refsect1>