summaryrefslogtreecommitdiff
path: root/package/aboot/src/doc/man/de
diff options
context:
space:
mode:
Diffstat (limited to 'package/aboot/src/doc/man/de')
-rw-r--r--package/aboot/src/doc/man/de/Makefile46
-rw-r--r--package/aboot/src/doc/man/de/aboot.conf.sgml108
-rw-r--r--package/aboot/src/doc/man/de/aboot.sgml89
-rw-r--r--package/aboot/src/doc/man/de/abootconf.sgml146
-rw-r--r--package/aboot/src/doc/man/de/docbook2man-de-spec.pl1304
-rw-r--r--package/aboot/src/doc/man/de/e2writeboot.845
-rw-r--r--package/aboot/src/doc/man/de/isomarkboot.sgml92
-rw-r--r--package/aboot/src/doc/man/de/netabootwrap.sgml107
-rw-r--r--package/aboot/src/doc/man/de/sdisklabel.sgml247
-rw-r--r--package/aboot/src/doc/man/de/srmbootfat.sgml86
-rw-r--r--package/aboot/src/doc/man/de/srmbootraw.sgml84
-rw-r--r--package/aboot/src/doc/man/de/swriteboot.861
12 files changed, 2415 insertions, 0 deletions
diff --git a/package/aboot/src/doc/man/de/Makefile b/package/aboot/src/doc/man/de/Makefile
new file mode 100644
index 000000000..22ef583a1
--- /dev/null
+++ b/package/aboot/src/doc/man/de/Makefile
@@ -0,0 +1,46 @@
+all: srmbootraw.de.8 aboot.de.8 aboot.conf.de.5 abootconf.de.8 isomarkboot.de.1 sdisklabel.de.8 srmbootfat.de.1 e2writeboot.de.8 swriteboot.de.8 netabootwrap.de.1
+
+aboot.de.8: aboot.sgml
+ nsgmls aboot.sgml | sgmlspl docbook2man-de-spec.pl
+ mv aboot.8 aboot.de.8
+
+aboot.conf.de.5: aboot.conf.sgml
+ nsgmls aboot.conf.sgml | sgmlspl docbook2man-de-spec.pl
+ mv aboot.conf.5 aboot.conf.de.5
+
+abootconf.de.8: abootconf.sgml
+ nsgmls abootconf.sgml | sgmlspl docbook2man-de-spec.pl
+ mv abootconf.8 abootconf.de.8
+
+netabootwrap.de.1: netabootwrap.sgml
+ nsgmls netabootwrap.sgml | sgmlspl docbook2man-de-spec.pl
+ mv netabootwrap.1 netabootwrap.de.1
+
+isomarkboot.de.1: isomarkboot.sgml
+ nsgmls isomarkboot.sgml | sgmlspl docbook2man-de-spec.pl
+ mv isomarkboot.1 isomarkboot.de.1
+
+sdisklabel.de.8: sdisklabel.sgml
+ nsgmls sdisklabel.sgml | sgmlspl docbook2man-de-spec.pl
+ mv sdisklabel.8 sdisklabel.de.8
+
+srmbootfat.de.1: srmbootfat.sgml
+ nsgmls srmbootfat.sgml | sgmlspl docbook2man-de-spec.pl
+ mv srmbootfat.1 srmbootfat.de.1
+
+srmbootraw.de.8: srmbootraw.sgml
+ nsgmls srmbootraw.sgml | sgmlspl docbook2man-de-spec.pl
+ mv srmbootraw.8 srmbootraw.de.8
+
+e2writeboot.de.8: e2writeboot.8
+ ln -s e2writeboot.8 e2writeboot.de.8
+
+swriteboot.de.8: swriteboot.8
+ ln -s swriteboot.8 swriteboot.de.8
+
+clean :
+ rm -f *.html *.de.? srmbootraw.8 srmbootfat.1 sdisklabel.8 isomarkboot.8 abootconf.8 aboot.conf.5 aboot.8 netabootwrap.1 manpage.links manpage.log manpage.refs
+ rm -rf SRM-HOWTO
+
+
+#.PHONY clean
diff --git a/package/aboot/src/doc/man/de/aboot.conf.sgml b/package/aboot/src/doc/man/de/aboot.conf.sgml
new file mode 100644
index 000000000..5702c70db
--- /dev/null
+++ b/package/aboot/src/doc/man/de/aboot.conf.sgml
@@ -0,0 +1,108 @@
+<!DOCTYPE RefEntry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<refentry id="aboot.conf">
+
+<refmeta>
+<refentrytitle>aboot.conf</refentrytitle>
+<manvolnum>5</manvolnum>
+<refmiscinfo>aboot.conf</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>aboot.conf</refname>
+<refpurpose>Die Konfigurationsdatei für <application>aboot</application>(8)
+</refpurpose>
+</refnamediv>
+
+<refsect1><title>BESCHREIBUNG</title>
+<para>
+<indexterm><primary>aboot.conf</primary></indexterm>
+<filename>aboot.conf</filename> enthält eine Liste von Boot-Einstellungen
+für <application>aboot</application>(8). Jede Boot-Einstellung hat eine
+eindeutige Zahl, die am SRM-Prompt angegeben werden kann.
+<indexterm><primary>SRM</primary></indexterm>.
+</para>
+<para>
+<filename>aboot.conf</filename> muß sich in einem Verzeichnis names
+<filename>etc</filename> auf der <emphasis>gleichen Partition</emphasis>
+wie Ihre Kernel befinden, es sei den, Sie geben explizit die Partition
+für Ihre Kernel an (siehe dazu die Ausführungen weiter unten). Falls Sie
+also eine seperate Boot-Partition (namens <filename>/boot</filename>)
+erzeugen, dann sollte <filename>aboot.conf</filename> in
+<filename>/boot/etc/</filename> liegen.
+</para>
+<para>
+Im folgenden Beispiel liegen die Kernel auf einer anderen Partition (hda4)
+als <filename>/</filename> (hda5), während in der fünften Zeile
+<filename>/boot</filename> auf der gleichen Partition (hda6) wie
+<filename>/</filename> liegt. Daher kann sich <filename>aboot.conf</filename>
+auf einer der drei Partitionen befinden, muß aber <emphasis>immer</emphasis>
+in einem Verzeichnis namens <filename>etc</filename> relativ zur obersten
+Verzeichnisebene auf dieser Partition angelegt sein. Die zu verwendene
+Partition können Sie mittels <application>abootconf</application>(8)
+ändern.
+</para>
+<para><example>
+<title>BEISPIEL <filename>aboot.conf</filename></title>
+<blockquote>
+<literallayout>
+0:4/vmlinuz root=/dev/hda5
+1:4/vmlinuz root=/dev/hda5 single
+2:4/vmlinuz.old ro root=/dev/hda5
+3:4/vmlinuz-2.4.9-32 root=/dev/sdc3 initrd=/initrd-2.4.9-32.img console=tty0
+8:6/boot/vmlinuz ro root=/dev/hda6
+</literallayout>
+</blockquote>
+</example></para>
+<para>
+Die erste Zahl ist ein eindeutige Identifikation für jede Boot-Konfiguration.
+Um eine bestimmte Konfiguration am SRM-Prompt zu booten, geben Sie
+</para>
+<para>
+<command>
+boot <parameter>dka0 -fl "0"</parameter>
+</command>
+</para>
+<para>
+ein, wobei dka0 durch Ihr Boot-Gerät und die 0 durch die zur bootende,
+in <filename>etc/aboot.conf</filename> angegegebene Konfigurationszahl
+ersetzt werden muß.
+</para>
+
+<para>
+Nach dem Doppelpunkt ist die Partition, auf der sich der Kernel befindet,
+angegeben. 1 entspricht der BSD-Partition mit Namen A:, 2 B: und so weiter.
+</para>
+
+<para>
+Nach dem Schrägstrich ist der Name (ggf. inklusive des zugehörigen Pfads)
+des zu bootenden Kernels angegeben. Falls sich Ihr Kernel nicht in einem
+Dateisystem, sondern direkt nach <application>aboot</application>(8) am Anfang
+der Festplatte befindet lassen Sie die Zahl, den Schrägstrich und den
+Kernelnamen weg.
+</para>
+
+<para>
+Als nächstes ist die als <filename>/</filename> zu montierende Partition
+angegeben. Andere benötigte Kernel-Parameter folgen. Wie gezeigt kann auch
+eine initrd angegeben werden.
+</para>
+
+<para>
+Der Inhalt dieser Datei kann vor dem Booten mittels des interaktiven
+Modus -- durch Booten mit dem Paramter "i" --
+von <application>aboot</application>(8) und der Angabe von
+"h" am <application>aboot</application>-Prompt angezeigt werden.
+</para>
+
+</refsect1>
+<refsect1><title>AUTOR</title>
+<para>
+Diese Handbuchseite wurde von Helge Kreutzmann
+<email>debian@helgefjell.de</email> für das Debian GNU/Linux-Projekt
+geschrieben, sie darf aber auch von anderen verwendet werden.
+</para>
+</refsect1>
+<refsect1><title>SIEHE AUCH</title>
+<para><application>aboot</application>(8), <application>abootconf</application>(8), <application>swriteboot</application>(8), HP SRM Handbuch (<ULink URL="http://h18002.www1.hp.com/alphaserver/download/srm_reference.pdf"></ULink>)
+</refsect1>
+</refentry>
diff --git a/package/aboot/src/doc/man/de/aboot.sgml b/package/aboot/src/doc/man/de/aboot.sgml
new file mode 100644
index 000000000..49fa124e6
--- /dev/null
+++ b/package/aboot/src/doc/man/de/aboot.sgml
@@ -0,0 +1,89 @@
+<!DOCTYPE RefEntry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<refentry id="aboot">
+
+<refmeta>
+<refentrytitle>aboot</refentrytitle>
+<manvolnum>8</manvolnum>
+<refmiscinfo>aboot</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>aboot</refname>
+<refpurpose>Der Bootloader (Urlader) der zweiten Stufe auf Linux/Alpha</refpurpose>
+</refnamediv>
+
+<refsect1><title>COPYRIGHT</title>
+<para>
+<application>aboot</application> unterliegt dem Copyright (C) 1996 Linus Torvalds, David Mosberger-Tang und Michael Schwingen
+</para>
+</refsect1>
+
+<refsect1><title>BESCHREIBUNG</title>
+<para>
+<indexterm><primary>aboot</primary></indexterm>
+<application>aboot</application> wird als Bootloader (Urlader) der zweiten
+Stufe benötigt, falls das System via SRM gebootet wird. Er wird normalerweise
+während der Systeminstallation durch
+<application>swriteboot</application>(8) installiert.
+</para>
+<para>
+Um den Bootprozess zu automatisieren können vordefinierte Boot-Konfigurationen
+in <filename>etc/aboot.conf</filename>(5) eingetragen werden.
+</para>
+<para>
+<application>aboot</application> kann durch die Angabe von
+</para>
+<para>
+<command>boot <parameter>dka0 -fl "i"</parameter></command>
+</para>
+<para>
+am SRM-Prompt auch interaktiv verwendet werden, wobei dka0 durch das
+verwendete Gerät ersetzt werden muß.
+</para>
+<para>
+Im interaktiven Modus können Sie das Kommando l zur Anzeige der derzeitigen
+<filename>etc/aboot.conf</filename> verwenden, und durch die Angabe der
+entsprechenden Zahl (oder des kompletten Boot-Kommandos wie bei SRM)
+Linux booten.
+</para>
+<para>
+Falls Sie nicht die von <application>abootconf</application>(8) erstellte
+<filename>etc/aboot.conf</filename> verwenden wollen, können Sie
+<application>aboot</application> explizit angeben, wo es nach der
+<filename>etc/aboot.conf</filename> suchen soll, indem Sie vor die
+Zahl der Konfiguration die passende Partition angeben, d.h. falls
+Ihre <filename>etc/aboot.conf</filename> sich auf Ihrer zweiten Partition
+befindet und Sie den mit 3 benannten Eintrag booten wollen, dann gäben
+Sie an
+</para>
+<para>
+<command>boot <parameter>dqa -fl "2:3"</parameter></command>
+</para>
+<para>
+Beachten Sie, daß dies nur für das Booten von Linux via SRM zutrifft, da
+<ProductName>VMS</ProductName>, <ProductName>Tru64</ProductName>, *BSD und
+<ProductName>Windows NT</ProductName> jeweils über ihren eigenen Bootloader
+für die zweite Stufe verfügen. Desweiteren wird <application>aboot</application>
+nicht benötigt, falls das System mittels <application>milo</application>
+gebootet wird.
+</para>
+</refsect1>
+
+
+<refsect1><title>AUTOR</title>
+<para>
+Diese Handbuchseite wurde von Helge Kreutzmann
+<email>debian@helgefjell.de</email> für das Debian GNU/Linux-Projekt
+geschrieben, sie darf aber auch von anderen verwendet werden.
+</para>
+</refsect1>
+
+<refsect1><title>DATEIEN</title>
+<para><filename>etc/aboot.conf</filename></para>
+</refsect1>
+
+<refsect1><title>SIEHE AUCH</title>
+<para><application>abootconf</application>(8), <filename>aboot.conf</filename>(5),
+<application>swriteboot</application>(8), HP SRM Handbuch (<ULink URL="http://h18002.www1.hp.com/alphaserver/download/srm_reference.pdf"></ULink>)</para>
+</refsect1>
+</refentry>
diff --git a/package/aboot/src/doc/man/de/abootconf.sgml b/package/aboot/src/doc/man/de/abootconf.sgml
new file mode 100644
index 000000000..21cbe5ebf
--- /dev/null
+++ b/package/aboot/src/doc/man/de/abootconf.sgml
@@ -0,0 +1,146 @@
+<!DOCTYPE RefEntry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+<refentry id="abootconf">
+
+<refmeta>
+<refentrytitle>abootconf</refentrytitle>
+<manvolnum>8</manvolnum>
+<refmiscinfo>abootconf</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>abootconf</refname>
+<refpurpose>
+Konfiguration des Ortes der Konfigurationsdatei für den Bootloader der zweiten Stufe <application>aboot</application>(8) von Linux/Alpha.
+</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+ <cmdsynopsis>
+ <command>abootconf</command> <arg choice="plain">/dev/xxx num</arg>
+ </cmdsynopsis>
+</refsynopsisdiv>
+
+<refsect1><title>COPYRIGHT</title>
+<para>
+<application>abootconf</application> unterliegt dem Copyright (C) 1996 Linus Torvalds, David Mosberger-Tang und Michael Schwingen
+</para>
+</refsect1>
+
+<refsect1><title>BESCHREIBUNG</title>
+<para>
+<indexterm><primary>abootconf</primary></indexterm>
+<indexterm><primary>aboot</primary></indexterm>
+<application>abootconf</application> wird zur Änderung der
+Partition<indexterm><primary>partition</primary></indexterm>, in der der Linux
+Boot-Loader (Urlader) <application>aboot</application>(8) nach seiner
+Konfigurationsdatei schaut, verwendet. Die Konfiguration wird in
+<filename>etc/aboot.conf</filename>(5) relativ zur Wurzel des Dateisystems
+auf dieser Partition gespeichert.
+</para>
+<para>
+<application>abootconf</application> benötigt das Boot-Gerät (bspw.
+<filename>/dev/hdb</filename>, <filename>/dev/sda</filename>) und die
+zu verwendende Partition (z.B. 3). Wollen Sie daher von Partition E:
+auf Ihrer zweiten SCSI-Festplatte booten, dann geben Sie</para>
+<para>
+<command>
+abootconf <parameter>/dev/sdb 5</parameter>
+</command>
+</para>
+<para>
+ein.
+</para>
+</refsect1>
+<refsect1><title>HINWEISE</title>
+<para>
+<application>abootconf</application> wird nicht benötigt, wenn Sie Ihr
+alpha-System mittels <application>milo</application> booten.
+</para>
+<para>
+Auf jeder Festplatte kann eine Partition aktiviert werden, die die
+Konfiguration für <application>aboot</application>(8) enthält, welche
+unter <filename>etc/aboot.conf</filename>(5) liegt. Die zu bootende
+Festplatte wird am SRM-Prompt als zweites Argument ausgewählt, also
+beispielsweise
+</para>
+<para>
+<command>
+boot <parameter>dqa</parameter>
+</command>
+</para>
+<para>
+um von der ersten IDE-Festplatte zu booten. Lesen Sie bitte das
+HP SRM-Handbuch und <application>aboot</application>(8) für weitere
+Informationen.
+</para>
+<para>
+<application>aboot</application>(8) kann einen Kernel von einer beliebiegen
+Partition laden und kann soger eine andere Root-Partition verwenden, als die
+zu der <filename>etc/aboot.conf</filename> gehört. Daher sollten Sie
+normalerweise eine <filename>etc/aboot.conf</filename> mit allen Kombinationen
+erstellen und benötigten <application>abootconf</application> außer für
+die Erstinstallation nicht. Sie können dann den gewünschten Linuxkernel über
+die entsprechenden Parameter am SRM-Prompt booten, z.B. um den mit 2
+bezeichneten Eintrag zu booten würden Sie
+</para>
+<para>
+<command>
+boot <parameter>dqa -fl "2"</parameter>
+</command>
+</para>
+<para>
+verwenden. Bitte lesen Sie das HP SRM-Handbuch und
+<filename>aboot.conf</filename>(5) für weitere Informationen.
+</para>
+<para>
+Um die derzeitigen Einstellungen anzuzeigen, lassen Sie einfach das letzte
+Argument fort (d.h. die Partitionsnummer).
+</para>
+<para>
+Beachten Sie, daß Sie <application>abootconf</application> erneut ausführen
+müssen, wenn Sie <application>aboot</application>(8) aktualisiert haben.
+</para>
+<para>
+Streng genommen wird <application>abootconf</application> nicht benötigt,
+da Sie die Partition, auf der <filename>etc/aboot.conf</filename> liegt
+auf dem SRM-Prompt spezifizieren können, indem Sie den Flags-Parameter mit
+der Partitions-Nummer, gefolgt vom einem Doppelpunkt, einleiten, d.h.
+falls <filename>etc/aboot.conf</filename> auf der vierten Partition liegt
+und Sie den Eintrag mit der Nummer 2 booten wollen, dann könnte Sie am
+SRM-Prompt auch
+</para>
+<para>
+<command>
+boot <parameter>dqa -fl "4:2"</parameter>
+</command>
+</para>
+<para>
+eingeben.
+</para>
+<para>
+Beachten Sie, daß dies nur auf Linux zutrifft, da
+<ProductName>VMS</ProductName>, <ProductName>Tru64</ProductName>, *BSD und
+<ProductName>Windows NT</ProductName> jeweils über Ihren eigenen Bootloader
+der zweiten Stufe verfügen.
+</para>
+<para>
+Beachten Sie desweiteren, daß für das erstmalige Aufsetzen auf der Festplatte
+<application>abootconf</application> ebenfalls nicht mehr benötigt wird, da
+<application>swriteboot</application>(8) über die gesamte Funktionalität
+von <application>abootconf</application> verfügt.
+</para>
+</refsect1>
+<refsect1><title>AUTOR</title>
+<para>
+Diese Handbuchseite wurde von Helge Kreutzmann
+<email>debian@helgefjell.de</email> für das Debian GNU/Linux-Projekt
+geschrieben, sie darf aber auch von anderen verwendet werden.
+</para>
+</refsect1>
+<refsect1><title>DATEIEN</title>
+<para><filename>etc/aboot.conf</filename></para>
+</refsect1>
+<refsect1><title>SIEHE AUCH</title>
+<para><application>aboot</application>(8), <application>swriteboot</application>(8), <filename>aboot.conf</filename>(5), HP SRM Handbuch (<ULink URL="http://h18002.www1.hp.com/alphaserver/download/srm_reference.pdf"></ULink>)</para>
+</refsect1>
+</refentry>
diff --git a/package/aboot/src/doc/man/de/docbook2man-de-spec.pl b/package/aboot/src/doc/man/de/docbook2man-de-spec.pl
new file mode 100644
index 000000000..2eed9015e
--- /dev/null
+++ b/package/aboot/src/doc/man/de/docbook2man-de-spec.pl
@@ -0,0 +1,1304 @@
+=head1 NAME
+
+docbook2man-spec - convert DocBook RefEntries to Unix manpages
+
+=head1 SYNOPSIS
+
+The SGMLSpm package from CPAN. This contains the sgmlspl script which
+is used to grok this file. Use it like this:
+
+nsgmls some-docbook-document.sgml | sgmlspl sgmlspl-specs/docbook2man-spec.pl
+
+=head1 OPTIONS
+
+=over 4
+
+=item --section <label>
+
+Use the specified manpage section number,
+if not specified in <MANVOLNUM>. Default is one (1).
+
+=item --date <string>
+
+Use the specified date in the .TH header.
+Default is today.
+
+=item --lowercase | --preserve-case
+
+Convert output file names and cross-references to lower case.
+Default is to convert to upper case.
+
+=head1 DESCRIPTION
+
+This is a sgmlspl spec file that produces Unix-style
+manpages from RefEntry markup.
+
+See the accompanying RefEntry man page for 'plain new' documentation. :)
+
+=head1 LIMITATIONS
+
+Trying docbook2man on non-DocBook or non-conformant SGML results in
+undefined behavior. :-)
+
+This program is a slow, dodgy Perl script.
+
+This program does not come close to supporting all the possible markup
+in DocBook, and will produce wrong output in some cases with supported
+markup.
+
+=head1 TODO
+
+Add new element handling and fix existing handling. Be robust.
+Produce cleanest, readable man output as possible (unlike some
+other converters). Follow Linux man(7) convention.
+If this results in added logic in this script,
+that's okay. The code should still be reasonably organized.
+
+Make it faster. If Perl sucks port it to another language.
+
+=head1 COPYRIGHT
+
+Copyright (C) 1998-1999 Steve Cheng <steve@ggi-project.org>
+
+Copyright (C) 1999 Thomas Lockhart <lockhart@alumni.caltech.edu>
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+You should have received a copy of the GNU General Public License along with
+this program; see the file COPYING. If not, please write to the Free
+Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+=cut
+
+# $Id: docbook2man-de-spec.pl,v 1.1 2004/07/05 09:32:10 kreutzm-guest Exp $
+
+use SGMLS; # Use the SGMLS package.
+use SGMLS::Output; # Use stack-based output.
+use SGMLS::Refs;
+
+
+########################################################################
+# SGMLSPL script produced automatically by the script sgmlspl.pl
+#
+# Document Type: any, but processes only RefEntries
+# Edited by: me :)
+########################################################################
+
+
+$write_manpages = 0;
+$blank_xrefs = 0;
+
+$default_sect = "1";
+$default_date = `date "+%d %B %Y"`; # L10N
+
+while (@ARGV) {
+ my $arg = shift @ARGV;
+ if ($arg eq "--section") {
+ $default_sect = shift @ARGV || die "$arg requires an argument\n"; # L10N
+ } elsif ($arg eq "--date") {
+ $default_date = shift @ARGV || die "$arg requires an argument\n"; # L10N
+ } elsif ($arg eq "--lowercase") {
+ $lowercase_names = 1;
+ } elsif ($arg eq "--preserve-case") {
+ $lowercase_names = 0;
+ } elsif ($arg eq "--help") {
+ print "Usage: $0",
+ " [ --section <label> ]",
+ " [ --date <string> ]",
+ " [ --lowercase | --preserve-case ]",
+ "\n";
+ exit;
+ } else {
+ die "unrecognized switch $arg; try $0 --help\n"; # L10N
+ }
+}
+
+sgml('start', sub {
+ push_output('nul');
+ $raw_cdata = 1; # Makes it a bit faster.
+
+ # Links file
+ open(LINKSFILE, ">manpage.links");
+
+ $Refs = new SGMLS::Refs("manpage.refs", "manpage.log");
+});
+sgml('end', sub {
+ close(LINKSFILE);
+
+ # Explicitly invoke destructor,
+ # otherwise cache file may not get written!
+ # Thomas Lockhart, 1999-08-03, perl-5.004, RedHat5.2
+ undef $Refs;
+
+ if($blank_xrefs) {
+ warn "Warning: output contains unresolved XRefs\n"; # L10N
+ }
+});
+
+
+########################################################################
+#
+# Output helpers
+#
+########################################################################
+
+# Remove leading and trailing blanks.
+
+sub StripString
+{
+ my $str = shift;
+
+ $str = $1 if ($str =~ m#^\s*(\S.*)#);
+ $str = $1 if ($str =~ m#^(.*\S)\s*$#);
+
+ return $str;
+}
+
+# Generate a good file name, for given manpage title and manvolnum
+# (cdata content).
+# Cleanup whitespace and convert to lower case if required.
+
+sub FileInfo
+{
+ my $title = StripString(shift);
+ my $volnum = StripString(shift);
+
+ $title = lc $title if $lowercase_names;
+
+ $title =~ tr/ /_/;
+ $volnum =~ tr/ /_/;
+
+ # The 'package name' part of the section should
+ # not be used when citing it.
+ my $sectcite = $1 if ($volnum =~ /([0-9]*)/);
+
+ return ("$title.$volnum", "$title($sectcite)");
+}
+
+# Our own version of sgml() and output() to allow simple string output
+# to play well with roff's stupid whitespace rules.
+
+sub man_sgml
+{
+ if(ref($_[1]) eq 'CODE') {
+ return &sgml;
+ }
+
+ my $s = $_[1];
+ $s =~ s/\\/\\\\/g;
+ $s =~ s/'/\\'/g;
+
+ sgml($_[0], eval("sub { man_output '$s' }"));
+}
+
+sub man_output
+{
+ if($separator eq 'full') {
+ output "\n" unless $newline_last++;
+ output ".PP\n";
+ $separator = '';
+ }
+
+ $_ = shift;
+ if(s/^\n//) {
+ output "\n" unless $newline_last++;
+ }
+ return if $_ eq '';
+
+ output $_;
+
+ if(@_) {
+ output @_;
+ $newline_last = (pop(@_) =~ /\n$/);
+ } else {
+ $newline_last = ($_ =~ /\n$/)
+ }
+}
+
+# Fold lines into one, quote some characters
+sub fold_string
+{
+ $_ = shift;
+
+ s/\\/\\\\/g;
+ s/"/\\\&"/g;
+
+ # Change tabs and newlines to spaces
+ # The newlines will be swallowed later while trimming
+ tr/[\t\n]/ /;
+
+ # Trim whitespace from beginning and end.
+ s/^ +//;
+ s/ +$//;
+
+ return $_;
+}
+
+sub save_cdata()
+{
+ $raw_cdata++;
+ push_output('string');
+}
+
+sub bold_on()
+{
+ # If the last font is also bold, don't change anything.
+ # Basically this is to just get more readable man output.
+ if($fontstack[$#fontstack] ne 'bold') {
+ if(!$raw_cdata) {
+ output '\fB';
+ #$newline_last = 0;
+ }
+ }
+ push(@fontstack, 'bold');
+}
+
+sub italic_on()
+{
+ # If the last font is also italic, don't change anything.
+ if($fontstack[$#fontstack] ne 'italic') {
+ if(!$raw_cdata) {
+ output '\fI';
+ #$newline_last = 0;
+ }
+ }
+ push(@fontstack, 'italic');
+}
+
+sub font_off()
+{
+ my $thisfont = pop(@fontstack);
+ my $lastfont = $fontstack[$#fontstack];
+
+ # Only output font change if it is different
+ if($thisfont ne $lastfont) {
+ if($raw_cdata) { return; }
+ elsif($lastfont eq 'bold') { output '\fB'; }
+ elsif($lastfont eq 'italic') { output '\fI'; }
+ else { output '\fR'; }
+
+ #$newline_last = 0;
+ }
+}
+
+
+########################################################################
+#
+# Manpage management
+#
+########################################################################
+
+sgml('<REFENTRY>', sub {
+ # This will be overwritten at end of REFMETA, when we know the name of the page.
+ pop_output();
+
+ $write_manpages = 1; # Currently writing manpage.
+
+ $nocollapse_whitespace = 0; # Current whitespace collapse counter.
+ $newline_last = 1; # At beginning of line?
+ # Just a bit of warning, you will see this variable manipulated
+ # manually a lot. It makes the code harder to follow but it
+ # saves you from having to worry about collapsing at the end of
+ # parse, stopping at verbatims, etc.
+ $raw_cdata = 0; # Instructs certain output functions to
+ # leave CDATA alone, so we can assign
+ # it to a string and process it, etc.
+ @fontstack = (); # Fonts being activated.
+
+ $list_nestlevel = 0; # Indent certain nested content.
+
+ # Separator to use between 'elements' in the content of a
+ # paragraph (usually). This makes sure that PCDATA after a list
+ # in a PARA gets a break in between and not become part of the
+ # last listitem. Note that we can't do it after the list ends,
+ # because often the list ends the paragraph and we'll get an
+ # extra break. Anything that changes the separator status from
+ # the default should also save its last state in the parent
+ # element's ext, but I'm not going to explain further. It's a
+ # gross hack and almost guaranteed to fail in unforseen cases.
+ # The only way to avoid all this is to use a tree/grove model, which
+ # we're _not_ doing.
+ $separator = '';
+
+ $manpage_title = ''; # Needed for indexing.
+ $manpage_sect = '';
+ @manpage_names = ();
+
+ $manpage_misc = '';
+});
+sgml('</REFENTRY>', sub {
+ if(!$newline_last) {
+ output "\n";
+ }
+
+ $raw_cdata = 1;
+ push_output('nul');
+
+ $write_manpages = 0;
+});
+
+sgml('</REFMETA>', sub {
+ my ($filename, $citation) =
+ FileInfo($manpage_title, $manpage_sect || $default_sect);
+
+ push_output('file', $filename);
+
+ output <<_END_BANNER;
+.\\" This manpage has been automatically generated by docbook2man-spec
+.\\" from a DocBook document. docbook2man-spec can be found at:
+.\\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
+.\\" Please send any bug reports, improvements, comments, patches,
+.\\" etc. to Steve Cheng <steve\@ggi-project.org>.
+_END_BANNER
+
+ my $manpage_date = $_[0]->parent->ext->{'date'} || $default_date;
+
+ output '.TH "';
+
+ # If the title is not mixed-case, convention says to
+ # uppercase the whole title. (The canonical title is
+ # lowercase.)
+ if($manpage_title =~ /[A-Z]/) {
+ output fold_string($manpage_title);
+ } else {
+ output uc(fold_string($manpage_title));
+ }
+
+ output '" "', fold_string($manpage_sect),
+ '" "', fold_string($manpage_date),
+ '" "', $manpage_misc,
+ '" "', $manpage_manual,
+ "\"\n";
+
+ $newline_last = 1;
+
+ # References to this RefEntry.
+ if(defined($_[0]->parent->attribute('ID')->value)) {
+ my $id = $_[0]->parent->attribute('ID')->value;
+
+ # Append XREFLABEL content to citations.
+ if(defined($_[0]->parent->attribute('XREFLABEL')->value)) {
+ $citation = $_[0]->parent->attribute('XREFLABEL')->value .
+ ' [' . $citation . ']';
+ }
+
+ $Refs->put("refentry:$id", $citation);
+ }
+});
+
+sgml('<REFENTRYTITLE>', sub {
+ if($_[0]->in('REFMETA')) {
+ save_cdata();
+ } else {
+ # Manpage citations are in bold.
+ bold_on();
+ }
+});
+sgml('</REFENTRYTITLE>', sub {
+ if($_[0]->in('REFMETA')) {
+ $raw_cdata--;
+ $manpage_title = pop_output();
+ }
+ else { font_off(); }
+
+ if (defined($_[0]->attribute('ID')->value)) {
+ my $id = $_[0]->attribute('ID')->value;
+ my ($name, $citation) = FileInfo($manpage_title, $default_sect);
+
+ $Refs->put("refentrytitle:$id", $citation);
+ }
+});
+
+sgml('<MANVOLNUM>', sub {
+ if($_[0]->in('REFMETA')) {
+ save_cdata();
+ } else {
+ # Manpage citations use ().
+ output '(';
+ }
+});
+sgml('</MANVOLNUM>', sub {
+ if($_[0]->in('REFMETA')) {
+ $raw_cdata--;
+ $manpage_sect = pop_output();
+ }
+ else { output ')' }
+});
+
+sgml('<REFMISCINFO>', \&save_cdata);
+sgml('</REFMISCINFO>', sub {
+ $raw_cdata--;
+ $manpage_misc = fold_string(pop_output());
+});
+
+
+# NAME section
+man_sgml('<REFNAMEDIV>', "\n.SH NAME\n"); # L10N
+
+sgml('<REFNAME>', \&save_cdata);
+sgml('</REFNAME>', sub {
+ $raw_cdata--;
+ push(@manpage_names, pop_output());
+});
+
+sgml('<REFPURPOSE>', \&save_cdata);
+sgml('</REFPURPOSE>', sub {
+ $raw_cdata--;
+ my $manpage_purpose = fold_string(pop_output());
+
+ for(my $i = 0; $i < $#manpage_names; $i++) {
+ output fold_string($manpage_names[$i]), ', ';
+ }
+
+ output fold_string($manpage_names[$#manpage_names]);
+ output " \\- $manpage_purpose\n";
+
+ $newline_last = 1;
+
+ foreach(@manpage_names) {
+ # Don't link to itself
+ if($_ ne $manpage_title) {
+ print LINKSFILE "$manpage_title.$manpage_sect $_.$manpage_sect\n";
+ }
+ }
+});
+
+man_sgml('<REFCLASS>', "\n.sp\n");
+
+#RefDescriptor
+
+
+########################################################################
+#
+# SYNOPSIS section and synopses
+#
+########################################################################
+
+man_sgml('<REFSYNOPSISDIV>', "\n.SH ÜBERSICHT\n"); # L10N
+man_sgml('</REFSYNOPSISDIV>', "\n");
+
+## FIXME! Must be made into block elements!!
+#sgml('<FUNCSYNOPSIS>', \&bold_on);
+#sgml('</FUNCSYNOPSIS>', \&font_off);
+#sgml('<CMDSYNOPSIS>', \&bold_on);
+#sgml('</CMDSYNOPSIS>', \&font_off);
+
+man_sgml('<FUNCSYNOPSIS>', sub {
+ #man_output("\n.sp\n");
+ bold_on();
+});
+man_sgml('</FUNCSYNOPSIS>', sub {
+ font_off();
+ man_output "\n";
+});
+
+man_sgml('<CMDSYNOPSIS>', "\n.sp\n");
+man_sgml('</CMDSYNOPSIS>', "\n");
+
+man_sgml('<FUNCPROTOTYPE>', "\n.sp\n");
+
+# Arguments to functions. This is C convention.
+man_sgml('<PARAMDEF>', '(');
+man_sgml('</PARAMDEF>', ");\n");
+man_sgml('<VOID>', "(void);\n");
+
+
+sub arg_start
+{
+ # my $choice = $_[0]->attribute('CHOICE')->value;
+
+ # The content model for CmdSynopsis doesn't include #PCDATA,
+ # so we won't see any of the whitespace in the source file,
+ # so we have to add it after each component.
+ man_output ' ';
+
+ if($_[0]->attribute('CHOICE')->value =~ /opt/i) {
+ man_output '[ ';
+ }
+ bold_on();
+}
+sub arg_end
+{
+ font_off();
+ if($_[0]->attribute('REP')->value =~ /^Repeat/i) {
+ italic_on();
+ man_output '...';
+ font_off();
+ }
+ if($_[0]->attribute('CHOICE')->value =~ /opt/i) {
+ man_output ' ] ';
+ }
+}
+
+sgml('<ARG>', \&arg_start);
+sgml('</ARG>', \&arg_end);
+sgml('<GROUP>', \&arg_start);
+sgml('</GROUP>', \&arg_end);
+
+sgml('<OPTION>', \&bold_on);
+sgml('</OPTION>', \&font_off);
+
+# FIXME: This is one _blank_ line.
+man_sgml('<SBR>', "\n\n");
+
+
+########################################################################
+#
+# General sections
+#
+########################################################################
+
+# The name of the section is handled by TITLE. This just sets
+# up the roff markup.
+man_sgml('<REFSECT1>', sub { $separator = ''; man_output "\n.SH "});
+man_sgml('<REFSECT2>', sub { $separator = ''; man_output "\n.SS "});
+man_sgml('<REFSECT3>', sub { $separator = ''; man_output "\n.SS "});
+
+
+########################################################################
+#
+# Titles, metadata.
+#
+########################################################################
+
+sgml('<TITLE>', sub {
+ if($_[0]->in('REFERENCE') or $_[0]->in('BOOK')) {
+ $write_manpages = 1;
+ }