aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/gpg-agent.texi2
-rw-r--r--doc/gpg.texi2
-rw-r--r--doc/gpgsm.texi2
-rw-r--r--doc/scdaemon.texi2
-rw-r--r--doc/tools.texi59
-rw-r--r--doc/yat2m.c56
6 files changed, 86 insertions, 37 deletions
diff --git a/doc/gpg-agent.texi b/doc/gpg-agent.texi
index b9f02b462..74f9aa537 100644
--- a/doc/gpg-agent.texi
+++ b/doc/gpg-agent.texi
@@ -11,7 +11,7 @@
@manpage gpg-agent.1
@ifset manverb
.B gpg-agent
-.R \- Secret key management for GnuPG
+\- Secret key management for GnuPG
@end ifset
@mansect synopsis
diff --git a/doc/gpg.texi b/doc/gpg.texi
index ee75e4f5c..49d332f5a 100644
--- a/doc/gpg.texi
+++ b/doc/gpg.texi
@@ -13,7 +13,7 @@
@manpage gpg2.1
@ifset manverb
.B gpg2
-.R \- OpenPGP encryption and signing tool
+\- OpenPGP encryption and signing tool
@end ifset
@mansect synopsis
diff --git a/doc/gpgsm.texi b/doc/gpgsm.texi
index 9057f5d1b..63b1f74ad 100644
--- a/doc/gpgsm.texi
+++ b/doc/gpgsm.texi
@@ -11,7 +11,7 @@
@manpage gpgsm.1
@ifset manverb
.B gpgsm
-.R \- CMS encryption and signing tool
+\- CMS encryption and signing tool
@end ifset
@mansect synopsis
diff --git a/doc/scdaemon.texi b/doc/scdaemon.texi
index ee018ed0c..9a9e278aa 100644
--- a/doc/scdaemon.texi
+++ b/doc/scdaemon.texi
@@ -11,7 +11,7 @@
@manpage scdaemon.1
@ifset manverb
.B scdaemon
-.R \- Smartcard daemon for the GnuPG system
+\- Smartcard daemon for the GnuPG system
@end ifset
@mansect synopsis
diff --git a/doc/tools.texi b/doc/tools.texi
index d39d950f4..ec147601b 100644
--- a/doc/tools.texi
+++ b/doc/tools.texi
@@ -25,7 +25,16 @@ GnuPG comes with a couple of smaller tools:
@node watchgnupg
@section Read logs from a socket
@ifset manverb
- watchgnupg \- Read and print logs from a socket
+.B watchgnupg
+\- Read and print logs from a socket
+@end ifset
+
+@mansect synopsis
+@ifset manverb
+.B watchgnupg
+.RB [ \-\-force ]
+.RB [ \-\-verbose ]
+.I socketname
@end ifset
@mansect description
@@ -35,11 +44,9 @@ listener for such a socket. It ameliorates the output with a time
stamp and makes sure that long lines are not interspersed with log
output from other utilities.
-@manpause
@noindent
@command{watchgnupg} is commonly invoked as
-@mansect synopsis
@example
watchgnupg --force ~/.gnupg/S.log
@end example
@@ -49,11 +56,11 @@ watchgnupg --force ~/.gnupg/S.log
This starts it on the current terminal for listening on the socket
@file{~/.gnupg/S.log}.
+@mansect options
@noindent
@command{watchgnupg} understands these options:
@table @gnupgtabopt
-@mansect options
@item --force
@opindex force
@@ -71,9 +78,15 @@ print version of the program and exit
@opindex help
Display a brief help page and exit
-@manpause
@end table
+@mansect see also
+@command{gpg}(1),
+@command{gpgsm}(1),
+@command{gpg-agent}(1),
+@command{scdaemon}(1)
+@include see-also-note.texi
+
@c
@c ADDGNUPGHOME
@@ -82,7 +95,15 @@ Display a brief help page and exit
@node addgnupghome
@section Create .gnupg home directories.
@ifset manverb
- addgnupghome \- Create .gnupg home directories
+.B addgnupghome
+\- Create .gnupg home directories
+@end ifset
+
+@mansect synopsis
+@ifset manverb
+.B addgnupghome
+.I account_1
+.IR account_2 ... account_n
@end ifset
@mansect description
@@ -94,11 +115,9 @@ by copying all files from @file{/etc/skel/.gnupg} to the home
directories of the accounts given on the command line. It takes care
not to overwrite existing GnuPG home directories.
-@manpause
@noindent
@command{addgnupghome} is invoked by root as:
-@mansect synopsis
@example
addgnupghome account1 account2 ... accountn
@end example
@@ -111,9 +130,26 @@ addgnupghome account1 account2 ... accountn
@node gpgconf
@section Modify .gnupg home directories.
@ifset manverb
- gpgconf \- Modify .gnupg home directories
+.B gpgconf
+\- Modify .gnupg home directories
+@end ifset
+
+@mansect synopsis
+@ifset manverb
+.B gpgconf
+.RI [ options ]
+.BI --list-components
+.br
+.B gpgconf
+.RI [ options ]
+.BI --list-options component
+.br
+.B gpgconf
+.RI [ options ]
+.BI --change-options component
@end ifset
+
@mansect description
The @command{gpgconf} is a utility to automatically and reasonable
safely query and modify configuration files in the @file{.gnupg} home
@@ -148,7 +184,6 @@ changes can then be made active with @command{gpgconf} again. Such a
program that uses @command{gpgconf} in this way will be called GUI
throughout this section.
-@manpause
@menu
* Invoking gpgconf:: List of all commands and options.
* Format conventions:: Formatting conventions relevant for all commands.
@@ -164,9 +199,7 @@ throughout this section.
@mansect commands
One of the following commands must be given:
-@manpause
@table @gnupgtabopt
-@mancont
@item --list-components
List all components. This is the default command used if none is
@@ -184,9 +217,7 @@ Change the options of the component @var{component}.
The following options may be used:
-@manpause
@table @gnupgtabopt
-@mancont
@c FIXME: Not yet supported.
@c @item -o @var{file}
@c @itemx --output @var{file}
diff --git a/doc/yat2m.c b/doc/yat2m.c
index 703ac658c..e45168a4f 100644
--- a/doc/yat2m.c
+++ b/doc/yat2m.c
@@ -446,6 +446,7 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len,
{ "table", 3 },
{ "end", 4 },
{ "quotation",1, ".RS\n\\fB" },
+ { "ifset", 1 },
{ NULL }
};
size_t n;
@@ -780,14 +781,12 @@ finish_page (void)
/* Parse one Texinfo file and create manpages according to the
embedded instructions. */
static void
-parse_file (const char *fname, FILE *fp)
+parse_file (const char *fname, FILE *fp, char **section_name)
{
char *line;
int lnr = 0;
int in_verbatim = 0;
int in_pause = 0;
- char *section_name = NULL; /* Name of the current section or NULL
- if not in a section. */
int skip_to_end = 0; /* Used to skip over menu entries. */
line = xmalloc (LINESIZE);
@@ -842,8 +841,8 @@ parse_file (const char *fname, FILE *fp)
}
else if (n == 8 && !memcmp (line, "@manpage", 8))
{
- free (section_name);
- section_name = NULL;
+ free (*section_name);
+ *section_name = NULL;
finish_page ();
start_page (p);
in_pause = 0;
@@ -854,14 +853,14 @@ parse_file (const char *fname, FILE *fp)
err ("%s:%d: section outside of a man page", fname, lnr);
else
{
- free (section_name);
- section_name = ascii_strupr (xstrdup (p));
+ free (*section_name);
+ *section_name = ascii_strupr (xstrdup (p));
in_pause = 0;
}
}
else if (n == 9 && !memcmp (line, "@manpause", 9))
{
- if (!section_name)
+ if (!*section_name)
err ("%s:%d: pausing outside of a man section", fname, lnr);
else if (in_pause)
err ("%s:%d: already pausing", fname, lnr);
@@ -870,7 +869,7 @@ parse_file (const char *fname, FILE *fp)
}
else if (n == 8 && !memcmp (line, "@mancont", 8))
{
- if (!section_name)
+ if (!*section_name)
err ("%s:%d: continue outside of a man section", fname, lnr);
else if (!in_pause)
err ("%s:%d: continue while not pausing", fname, lnr);
@@ -882,6 +881,21 @@ parse_file (const char *fname, FILE *fp)
{
skip_to_end = 1;
}
+ else if (n == 8 && !memcmp (line, "@include", 8)
+ && (line[8]==' '||line[8]=='\t'||!line[8]))
+ {
+ char *incname = xstrdup (p);
+ FILE *incfp = fopen (incname, "r");
+
+ if (!incfp)
+ err ("can't open include file `%s':%s",
+ incname, strerror (errno));
+ else
+ {
+ parse_file (incname, incfp, section_name);
+ fclose (incfp);
+ }
+ }
else
got_line = 1;
}
@@ -889,22 +903,26 @@ parse_file (const char *fname, FILE *fp)
got_line = 1;
if (got_line && in_verbatim)
- add_content (section_name, line, 1);
- else if (got_line && thepage.name && section_name && !in_pause)
- add_content (section_name, line, 0);
+ add_content (*section_name, line, 1);
+ else if (got_line && thepage.name && *section_name && !in_pause)
+ add_content (*section_name, line, 0);
}
if (ferror (fp))
err ("%s:%d: read error: %s", fname, lnr, strerror (errno));
- finish_page ();
- free (section_name);
free (line);
}
-
-
-
+static void
+top_parse_file (const char *fname, FILE *fp)
+{
+ char *section_name = NULL; /* Name of the current section or NULL
+ if not in a section. */
+ parse_file (fname, fp, &section_name);
+ free (section_name);
+ finish_page ();
+}
int
@@ -1014,11 +1032,11 @@ main (int argc, char **argv)
FILE *fp = fopen (*argv, "rb");
if (!fp)
die ("%s:0: can't open file: %s", *argv, strerror (errno));
- parse_file (*argv, fp);
+ top_parse_file (*argv, fp);
fclose (fp);
}
else
- parse_file ("-", stdin);
+ top_parse_file ("-", stdin);
return !!any_error;
}