[svn] GnuPG - r4223 - trunk/doc

svn author wk cvs at cvs.gnupg.org
Thu Aug 17 21:58:28 CEST 2006


Author: wk
Date: 2006-08-17 21:58:28 +0200 (Thu, 17 Aug 2006)
New Revision: 4223

Modified:
   trunk/doc/gpg-agent.texi
   trunk/doc/gpg.texi
   trunk/doc/gpgsm.texi
   trunk/doc/scdaemon.texi
   trunk/doc/tools.texi
   trunk/doc/yat2m.c
Log:
include support and texi fixes


Modified: trunk/doc/gpg-agent.texi
===================================================================
--- trunk/doc/gpg-agent.texi	2006-08-17 18:01:25 UTC (rev 4222)
+++ trunk/doc/gpg-agent.texi	2006-08-17 19:58:28 UTC (rev 4223)
@@ -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

Modified: trunk/doc/gpg.texi
===================================================================
--- trunk/doc/gpg.texi	2006-08-17 18:01:25 UTC (rev 4222)
+++ trunk/doc/gpg.texi	2006-08-17 19:58:28 UTC (rev 4223)
@@ -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

Modified: trunk/doc/gpgsm.texi
===================================================================
--- trunk/doc/gpgsm.texi	2006-08-17 18:01:25 UTC (rev 4222)
+++ trunk/doc/gpgsm.texi	2006-08-17 19:58:28 UTC (rev 4223)
@@ -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

Modified: trunk/doc/scdaemon.texi
===================================================================
--- trunk/doc/scdaemon.texi	2006-08-17 18:01:25 UTC (rev 4222)
+++ trunk/doc/scdaemon.texi	2006-08-17 19:58:28 UTC (rev 4223)
@@ -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

Modified: trunk/doc/tools.texi
===================================================================
--- trunk/doc/tools.texi	2006-08-17 18:01:25 UTC (rev 4222)
+++ trunk/doc/tools.texi	2006-08-17 19:58:28 UTC (rev 4223)
@@ -25,9 +25,18 @@
 @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
 
+ at mansect synopsis
+ at ifset manverb
+.B  watchgnupg
+.RB [ \-\-force ]
+.RB [ \-\-verbose ]
+.I socketname
+ at end ifset
+
 @mansect description
 Most of the main utilities are able to write there log files to a
 Unix Domain socket if configured that way.  @command{watchgnupg} is a simple
@@ -35,11 +44,9 @@
 stamp and makes sure that long lines are not interspersed with log
 output from other utilities.
 
- at manpause
 @noindent
 @command{watchgnupg} is commonly invoked as
 
- at mansect synopsis
 @example
 watchgnupg --force ~/.gnupg/S.log
 @end example
@@ -49,11 +56,11 @@
 This starts it on the current terminal for listening on the socket
 @file{~/.gnupg/S.log}.  
 
+ at mansect options
 @noindent
 @command{watchgnupg} understands these options:
 
 @table @gnupgtabopt
- at mansect options
 
 @item --force 
 @opindex force
@@ -71,10 +78,16 @@
 @opindex help
 Display a brief help page and exit
 
- at manpause
 @end table
 
+ at mansect see also
+ at command{gpg}(1), 
+ at command{gpgsm}(1), 
+ at command{gpg-agent}(1), 
+ at command{scdaemon}(1)
+ at include see-also-note.texi
 
+
 @c
 @c    ADDGNUPGHOME
 @c
@@ -82,9 +95,17 @@
 @node addgnupghome
 @section Create .gnupg home directories.
 @ifset manverb
- addgnupghome \-  Create .gnupg home directories
+.B addgnupghome 
+\- Create .gnupg home directories
 @end ifset
 
+ at mansect synopsis
+ at ifset manverb
+.B  addgnupghome
+.I account_1
+.IR account_2 ... account_n
+ at end ifset
+
 @mansect description
 If GnuPG is installed on a system with existing user accounts, it is
 sometimes required to populate the GnuPG home directory with existing
@@ -94,11 +115,9 @@
 directories of the accounts given on the command line.  It takes care
 not to overwrite existing GnuPG home directories.
 
- at manpause
 @noindent
 @command{addgnupghome} is invoked by root as:
 
- at mansect synopsis
 @example
 addgnupghome account1 account2 ... accountn
 @end example
@@ -111,9 +130,26 @@
 @node gpgconf
 @section Modify .gnupg home directories.
 @ifset manverb
-  gpgconf \- Modify .gnupg home directories
+.B gpgconf
+\- Modify .gnupg home directories
 @end ifset
 
+ at mansect synopsis
+ at 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
+ at 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 @@
 program that uses @command{gpgconf} in this way will be called GUI
 throughout this section.
 
- at manpause
 @menu
 * Invoking gpgconf::      List of all commands and options.
 * Format conventions::    Formatting conventions relevant for all commands.
@@ -164,9 +199,7 @@
 @mansect commands
 One of the following commands must be given:
 
- at manpause
 @table @gnupgtabopt
- at mancont
 
 @item --list-components
 List all components.  This is the default command used if none is
@@ -184,9 +217,7 @@
 
 The following options may be used:
 
- at manpause
 @table @gnupgtabopt
- at mancont
 @c FIXME: Not yet supported.
 @c @item -o @var{file}
 @c @itemx --output @var{file}

Modified: trunk/doc/yat2m.c
===================================================================
--- trunk/doc/yat2m.c	2006-08-17 18:01:25 UTC (rev 4222)
+++ trunk/doc/yat2m.c	2006-08-17 19:58:28 UTC (rev 4223)
@@ -446,6 +446,7 @@
     { "table",   3 }, 
     { "end",     4 },
     { "quotation",1, ".RS\n\\fB" },
+    { "ifset",   1 },
     { NULL }
   };
   size_t n;
@@ -780,14 +781,12 @@
 /* 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 @@
             }
           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 @@
                 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 @@
             }
           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 @@
             {
               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,24 +903,28 @@
         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 
 main (int argc, char **argv)
 {
@@ -1014,11 +1032,11 @@
       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;
 }




More information about the Gnupg-commits mailing list