shishi-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU shishi branch, master, updated. shishi-1-0-2-34-gd3f8c9e


From: Mats Erik Andersson
Subject: [SCM] GNU shishi branch, master, updated. shishi-1-0-2-34-gd3f8c9e
Date: Thu, 26 Jun 2014 22:55:51 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU shishi".

http://git.savannah.gnu.org/cgit/shishi.git/commit/?id=d3f8c9ed166b4a2d5699e97c8152f19a0e080bf9

The branch, master has been updated
       via  d3f8c9ed166b4a2d5699e97c8152f19a0e080bf9 (commit)
      from  9062a2023e9060d3a05a968f10ad30e9e1bf5c2a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d3f8c9ed166b4a2d5699e97c8152f19a0e080bf9
Author: Mats Erik Andersson <address@hidden>
Date:   Fri Jun 27 00:52:56 2014 +0200

    gdoc: Improved coverage in LaTeX mode.
    
    In particular, the libshisa documentation compiles
    without errors under LaTeX.

-----------------------------------------------------------------------

Summary of changes:
 db/core.c    |    2 +-
 db/setup.c   |    2 --
 doc/gdoc     |   46 +++++++++++++++++++++++++++++-----------------
 lib/gztime.c |    2 +-
 4 files changed, 31 insertions(+), 21 deletions(-)

diff --git a/db/core.c b/db/core.c
index 03030e5..f84e98c 100644
--- a/db/core.c
+++ b/db/core.c
@@ -363,7 +363,7 @@ shisa_key_add (Shisa * dbh,
  * then set the @key->etype field to 3, and all other fields to 0.
  *
  * Return value: Returns %SHISA_OK on success, %SHISA_NO_KEY if no
- *   key could be located , %SHISA_MULTIPLE_KEY_MATCH if more
+ *   key could be located, %SHISA_MULTIPLE_KEY_MATCH if more
  *   than a single key matched the given criteria, or an error code
  *   otherwise.
  **/
diff --git a/db/setup.c b/db/setup.c
index 2309556..5e9beb6 100644
--- a/db/setup.c
+++ b/db/setup.c
@@ -71,7 +71,6 @@ shisa_done (Shisa * dbh)
  * configuration file from its default location.  The path to the
  * default system configuration file is decided at compile time
  * ($sysconfdir/shisa.conf).
- *
  * The handle is allocated regardless of return value, except for
  * %SHISA_INIT_ERROR which indicates a problem in allocating the
  * handle.  Other error conditions arise while reading a file.
@@ -95,7 +94,6 @@ shisa_init (Shisa ** dbh)
  * default location, should @file be %NULL.
  * The path to the default system configuration file is
  * decided at compile time ($sysconfdir/shisa.conf).
- *
  * The handle is allocated regardless of return value, except for
  * %SHISA_INIT_ERROR which indicates a problem in allocating the
  * handle.  Other error conditions arise while reading a file.
diff --git a/doc/gdoc b/doc/gdoc
index 1848052..c245f77 100755
--- a/doc/gdoc
+++ b/doc/gdoc
@@ -96,8 +96,8 @@ eval '(exit $?0)' && eval 'exec perl -S "$0" ${1+"$@"}'
 #  * my_function
 #  **/
 #
-# If the Description: header tag is ommitted, then there must be a blank line
-# after the last parameter specification.
+# If the Description: header tag is omitted, then there must be
+# a blank line after the last parameter specification.
 # e.g.
 # /**
 #  * my_function - does my stuff
@@ -165,11 +165,13 @@ $blankline_html = '</p><p>';
                        $type_param     => '@var{$1}' );
 $blankline_texinfo = "";
 
-%highlights_tex = ( $type_constant =>  "{\\\\it \$1}",
-                    $type_func =>      "{\\\\bf \$1}",
-                    $type_struct =>    "{\\\\it \$1}",
-                    $type_param =>     "{\\\\bf \$1}" );
-$blankline_tex = "\\\\";
+%highlights_tex = ( $type_constant =>  '{\\it $1}',
+                    $type_func =>      '{\\bf $1}',
+                    $type_struct =>    '{\\it $1}',
+                    $type_param =>     '{\\bf $1}' );
+# Ideally this value should be place on the line preceding
+# the detected empty line.  Then '\\' would be ideal.
+$blankline_tex = '\smallskip'
 
 # sgml, docbook format
 %highlights_sgml = ( $type_constant =>
@@ -496,7 +498,8 @@ sub output_tex {
 
     $func =~ s/_/\\_/g;
 
-    print "\n\n\\subsection{". $func . "}\n\\label{" . $args{'function'} . 
"}\n";
+    print "\n", '\subsection*{', $func, "}\n",
+         '\label{', $args{'function'}, "}\n";
 
     $type = $args{'functiontype'};
     $type =~ s/_/\\_/g;
@@ -526,9 +529,9 @@ sub output_tex {
            print ", ";
        }
     }
-    print ")\n";
+    print ")\n\n";
 
-    print "\n{\\large{Arguments}}\n";
+    print '\subsection*{Arguments}', "\n";
 
     print "\\begin{itemize}\n";
     $check=0;
@@ -545,11 +548,10 @@ sub output_tex {
 
        # Variadic arguments carry no type: insert a place holder.
        print '\item ',
-             $param1 ? '{\it ' . $param1 . '}' : '{\vphantom{l}}',
-             ' {\bf ', $param2, '}',
+             $param1 ? '{\it ' . $param1 . '} ' : '',
+             '{\bf ', $param2, '}',
              $param4 ? '{\it ' . $param4 . '}' : '',
-             ": \n";
-#      print "\n";
+             '\hspace{0.3ex}:', "\n";  # Small space for readability.
 
        $param3 = $args{'parameters'}{$parameter};
        $param3 =~ s/#([a-zA-Z\_]+)/{\\it $1}/g;
@@ -568,18 +570,28 @@ sub output_tex {
        $sec =~ s/_/\\_/g;
        $sec =~ s/#([a-zA-Z\_]+)/{\\it $1}/g;
 
-       print "\n{\\large{$sec}}\\\\\n";
+       print "\n", '\subsection*{', $sec, '}', "\n";
        print "\\begin{rmfamily}\n";
 
        $sec = $args{'sections'}{$section};
        $sec =~ s/\\:/:/g;
        $sec =~ s/#([a-zA-Z\_]+)/{\\it $1}/g;
-       $sec =~ s/->/\$\\rightarrow\$/g;
-       $sec =~ s/([0-9]+)\^([0-9]+)/\$\{$1\}\^\{$2\}\$/g;
 
        $out = just_highlight($sec);
        $out =~ s/_/\\_/g;
 
+       # Ampersands may appear in embedded code samples, and are
+       # at the same time tokens in TeX source, so we escape them.
+       $out =~ s/&/\\&/g;
+
+       # The dollar sign starts math mode in TeX and must there-
+       # fore be escaped.  Furthermore, the rewrite rules for
+       # '->' and '#^#' must be delayed until that protection
+       # is in place.
+       $out =~ s/\$/\\\$/g;
+       $out =~ s/->/\$\\rightarrow\$/g;
+       $out =~ s/([0-9]+)\^([0-9]+)/\$\{$1\}\^\{$2\}\$/g;
+
        print $out;
        print "\\end{rmfamily}\n";
     }
diff --git a/lib/gztime.c b/lib/gztime.c
index 650fc79..7bb7ddc 100644
--- a/lib/gztime.c
+++ b/lib/gztime.c
@@ -108,7 +108,7 @@ shishi_generalize_ctime (Shishi * handle, const char *t)
  * and to be precise, does so from the named field @field
  * within the structure @node.
  *
- * Return value: Returns %SHISHI_OK if successful, or an error..
+ * Return value: Returns %SHISHI_OK if successful, or an error.
  **/
 int
 shishi_time (Shishi * handle, Shishi_asn1 node, const char *field, char **t)


hooks/post-receive
-- 
GNU shishi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]