1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-05-27 21:41:23 +02:00

include support and texi fixes

This commit is contained in:
Werner Koch 2006-08-17 19:58:28 +00:00
parent 6e3e2513d8
commit e5be94ce45
6 changed files with 86 additions and 37 deletions

View File

@ -11,7 +11,7 @@
@manpage gpg-agent.1 @manpage gpg-agent.1
@ifset manverb @ifset manverb
.B gpg-agent .B gpg-agent
.R \- Secret key management for GnuPG \- Secret key management for GnuPG
@end ifset @end ifset
@mansect synopsis @mansect synopsis

View File

@ -13,7 +13,7 @@
@manpage gpg2.1 @manpage gpg2.1
@ifset manverb @ifset manverb
.B gpg2 .B gpg2
.R \- OpenPGP encryption and signing tool \- OpenPGP encryption and signing tool
@end ifset @end ifset
@mansect synopsis @mansect synopsis

View File

@ -11,7 +11,7 @@
@manpage gpgsm.1 @manpage gpgsm.1
@ifset manverb @ifset manverb
.B gpgsm .B gpgsm
.R \- CMS encryption and signing tool \- CMS encryption and signing tool
@end ifset @end ifset
@mansect synopsis @mansect synopsis

View File

@ -11,7 +11,7 @@
@manpage scdaemon.1 @manpage scdaemon.1
@ifset manverb @ifset manverb
.B scdaemon .B scdaemon
.R \- Smartcard daemon for the GnuPG system \- Smartcard daemon for the GnuPG system
@end ifset @end ifset
@mansect synopsis @mansect synopsis

View File

@ -25,7 +25,16 @@ GnuPG comes with a couple of smaller tools:
@node watchgnupg @node watchgnupg
@section Read logs from a socket @section Read logs from a socket
@ifset manverb @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 @end ifset
@mansect description @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 stamp and makes sure that long lines are not interspersed with log
output from other utilities. output from other utilities.
@manpause
@noindent @noindent
@command{watchgnupg} is commonly invoked as @command{watchgnupg} is commonly invoked as
@mansect synopsis
@example @example
watchgnupg --force ~/.gnupg/S.log watchgnupg --force ~/.gnupg/S.log
@end example @end example
@ -49,11 +56,11 @@ watchgnupg --force ~/.gnupg/S.log
This starts it on the current terminal for listening on the socket This starts it on the current terminal for listening on the socket
@file{~/.gnupg/S.log}. @file{~/.gnupg/S.log}.
@mansect options
@noindent @noindent
@command{watchgnupg} understands these options: @command{watchgnupg} understands these options:
@table @gnupgtabopt @table @gnupgtabopt
@mansect options
@item --force @item --force
@opindex force @opindex force
@ -71,9 +78,15 @@ print version of the program and exit
@opindex help @opindex help
Display a brief help page and exit Display a brief help page and exit
@manpause
@end table @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
@c ADDGNUPGHOME @c ADDGNUPGHOME
@ -82,7 +95,15 @@ Display a brief help page and exit
@node addgnupghome @node addgnupghome
@section Create .gnupg home directories. @section Create .gnupg home directories.
@ifset manverb @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 @end ifset
@mansect description @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 directories of the accounts given on the command line. It takes care
not to overwrite existing GnuPG home directories. not to overwrite existing GnuPG home directories.
@manpause
@noindent @noindent
@command{addgnupghome} is invoked by root as: @command{addgnupghome} is invoked by root as:
@mansect synopsis
@example @example
addgnupghome account1 account2 ... accountn addgnupghome account1 account2 ... accountn
@end example @end example
@ -111,9 +130,26 @@ addgnupghome account1 account2 ... accountn
@node gpgconf @node gpgconf
@section Modify .gnupg home directories. @section Modify .gnupg home directories.
@ifset manverb @ifset manverb
gpgconf \- Modify .gnupg home directories .B gpgconf
\- Modify .gnupg home directories
@end ifset @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 @mansect description
The @command{gpgconf} is a utility to automatically and reasonable The @command{gpgconf} is a utility to automatically and reasonable
safely query and modify configuration files in the @file{.gnupg} home 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 program that uses @command{gpgconf} in this way will be called GUI
throughout this section. throughout this section.
@manpause
@menu @menu
* Invoking gpgconf:: List of all commands and options. * Invoking gpgconf:: List of all commands and options.
* Format conventions:: Formatting conventions relevant for all commands. * Format conventions:: Formatting conventions relevant for all commands.
@ -164,9 +199,7 @@ throughout this section.
@mansect commands @mansect commands
One of the following commands must be given: One of the following commands must be given:
@manpause
@table @gnupgtabopt @table @gnupgtabopt
@mancont
@item --list-components @item --list-components
List all components. This is the default command used if none is 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: The following options may be used:
@manpause
@table @gnupgtabopt @table @gnupgtabopt
@mancont
@c FIXME: Not yet supported. @c FIXME: Not yet supported.
@c @item -o @var{file} @c @item -o @var{file}
@c @itemx --output @var{file} @c @itemx --output @var{file}

View File

@ -446,6 +446,7 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len,
{ "table", 3 }, { "table", 3 },
{ "end", 4 }, { "end", 4 },
{ "quotation",1, ".RS\n\\fB" }, { "quotation",1, ".RS\n\\fB" },
{ "ifset", 1 },
{ NULL } { NULL }
}; };
size_t n; size_t n;
@ -780,14 +781,12 @@ finish_page (void)
/* Parse one Texinfo file and create manpages according to the /* Parse one Texinfo file and create manpages according to the
embedded instructions. */ embedded instructions. */
static void static void
parse_file (const char *fname, FILE *fp) parse_file (const char *fname, FILE *fp, char **section_name)
{ {
char *line; char *line;
int lnr = 0; int lnr = 0;
int in_verbatim = 0; int in_verbatim = 0;
int in_pause = 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. */ int skip_to_end = 0; /* Used to skip over menu entries. */
line = xmalloc (LINESIZE); line = xmalloc (LINESIZE);
@ -842,8 +841,8 @@ parse_file (const char *fname, FILE *fp)
} }
else if (n == 8 && !memcmp (line, "@manpage", 8)) else if (n == 8 && !memcmp (line, "@manpage", 8))
{ {
free (section_name); free (*section_name);
section_name = NULL; *section_name = NULL;
finish_page (); finish_page ();
start_page (p); start_page (p);
in_pause = 0; 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); err ("%s:%d: section outside of a man page", fname, lnr);
else else
{ {
free (section_name); free (*section_name);
section_name = ascii_strupr (xstrdup (p)); *section_name = ascii_strupr (xstrdup (p));
in_pause = 0; in_pause = 0;
} }
} }
else if (n == 9 && !memcmp (line, "@manpause", 9)) 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); err ("%s:%d: pausing outside of a man section", fname, lnr);
else if (in_pause) else if (in_pause)
err ("%s:%d: already pausing", fname, lnr); 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)) 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); err ("%s:%d: continue outside of a man section", fname, lnr);
else if (!in_pause) else if (!in_pause)
err ("%s:%d: continue while not pausing", fname, lnr); err ("%s:%d: continue while not pausing", fname, lnr);
@ -882,6 +881,21 @@ parse_file (const char *fname, FILE *fp)
{ {
skip_to_end = 1; 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 else
got_line = 1; got_line = 1;
} }
@ -889,22 +903,26 @@ parse_file (const char *fname, FILE *fp)
got_line = 1; got_line = 1;
if (got_line && in_verbatim) if (got_line && in_verbatim)
add_content (section_name, line, 1); add_content (*section_name, line, 1);
else if (got_line && thepage.name && section_name && !in_pause) else if (got_line && thepage.name && *section_name && !in_pause)
add_content (section_name, line, 0); add_content (*section_name, line, 0);
} }
if (ferror (fp)) if (ferror (fp))
err ("%s:%d: read error: %s", fname, lnr, strerror (errno)); err ("%s:%d: read error: %s", fname, lnr, strerror (errno));
finish_page ();
free (section_name);
free (line); 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 int
@ -1014,11 +1032,11 @@ main (int argc, char **argv)
FILE *fp = fopen (*argv, "rb"); FILE *fp = fopen (*argv, "rb");
if (!fp) if (!fp)
die ("%s:0: can't open file: %s", *argv, strerror (errno)); die ("%s:0: can't open file: %s", *argv, strerror (errno));
parse_file (*argv, fp); top_parse_file (*argv, fp);
fclose (fp); fclose (fp);
} }
else else
parse_file ("-", stdin); top_parse_file ("-", stdin);
return !!any_error; return !!any_error;
} }