Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package htmldoc for openSUSE:Factory checked 
in at 2024-02-16 21:41:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/htmldoc (Old)
 and      /work/SRC/openSUSE:Factory/.htmldoc.new.1815 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "htmldoc"

Fri Feb 16 21:41:29 2024 rev:34 rq:1146797 version:1.9.18

Changes:
--------
--- /work/SRC/openSUSE:Factory/htmldoc/htmldoc.changes  2023-10-04 
22:30:54.602467043 +0200
+++ /work/SRC/openSUSE:Factory/.htmldoc.new.1815/htmldoc.changes        
2024-02-16 21:41:30.719873892 +0100
@@ -1,0 +2,10 @@
+Thu Feb 15 08:06:02 UTC 2024 - pgaj...@suse.com
+
+- version update to 1.9.18
+  * Fixed table rendering when there are missing `</tr>` (Issue #494)
+  * Fixed support for links of the form "filename.html#anchor" in PDF output
+    (Issue #514)
+  * Fixed `--header1` support for web page output (Issue #515)
+  * Fixed markdown emphasized, strong, and struck-through text (Issue 517)
+
+-------------------------------------------------------------------

Old:
----
  htmldoc-1.9.17-source.tar.gz

New:
----
  htmldoc-1.9.18-source.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ htmldoc.spec ++++++
--- /var/tmp/diff_new_pack.CCMs2i/_old  2024-02-16 21:41:31.243892799 +0100
+++ /var/tmp/diff_new_pack.CCMs2i/_new  2024-02-16 21:41:31.243892799 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package htmldoc
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           htmldoc
-Version:        1.9.17
+Version:        1.9.18
 Release:        0
 Summary:        HTML Processor that Generates HTML, PostScript, and PDF Files
 License:        LGPL-2.1-or-later

++++++ htmldoc-1.9.17-source.tar.gz -> htmldoc-1.9.18-source.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/htmldoc-1.9.17/CHANGES.md 
new/htmldoc-1.9.18/CHANGES.md
--- old/htmldoc-1.9.17/CHANGES.md       2023-09-18 03:33:38.000000000 +0200
+++ new/htmldoc-1.9.18/CHANGES.md       2024-02-12 01:54:12.000000000 +0100
@@ -1,3 +1,12 @@
+# Changes in HTMLDOC v1.9.18
+
+- Fixed table rendering when there are missing `</tr>` (Issue #494)
+- Fixed support for links of the form "filename.html#anchor" in PDF output
+  (Issue #514)
+- Fixed `--header1` support for web page output (Issue #515)
+- Fixed markdown emphasized, strong, and struck-through text (Issue 517)
+
+
 # Changes in HTMLDOC v1.9.17
 
 - Added new `--pre-indent` option to control indentation of pre-formatted text
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/htmldoc-1.9.17/INSTALL.md 
new/htmldoc-1.9.18/INSTALL.md
--- old/htmldoc-1.9.17/INSTALL.md       2023-09-18 03:33:38.000000000 +0200
+++ new/htmldoc-1.9.18/INSTALL.md       2024-02-12 01:54:12.000000000 +0100
@@ -5,7 +5,7 @@
 along with the following libraries:
 
 - FLTK 1.1.x or higher for GUI support
-- GNU TLS for HTTPS support (except on macOS and Windows)
+- CUPS 2.2 or higher for HTTP/HTTPS support
 - libjpeg (7 or higher) or libjpeg-turbo for JPEG support
 - libpng 1.6 or higher for PNG support
 - zlib 1.1 or higher
@@ -63,7 +63,7 @@
 You should install the following packages:
 
     sudo apt-get install build-essential autoconf libfltk1.3-dev \
-        libgnutls28-dev libjpeg-dev libpng-dev pkg-config zlib1g-dev
+        libcups2-dev libjpeg-dev libpng-dev pkg-config zlib1g-dev
 
 
 CentOS, Fedora, and RHEL Notes
@@ -71,5 +71,5 @@
 
 Install the following packages to get full functionality:
 
-    sudo yum install autoconf fltk-devel gnutls-devel libjpeg-devel \
+    sudo dnf install autoconf fltk-devel cups-devel libjpeg-devel \
        libpng-devel pkgconfig zlib-devel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/htmldoc-1.9.17/README.md new/htmldoc-1.9.18/README.md
--- old/htmldoc-1.9.17/README.md        2023-09-18 03:33:38.000000000 +0200
+++ new/htmldoc-1.9.18/README.md        2024-02-12 01:54:12.000000000 +0100
@@ -20,7 +20,7 @@
   output (which is not well supported by CSS)
 
 - Encryption: HTMLDOC currently supports the older (and very insecure) PDF 1.4
-  (128-bit RC4) encryption.  I have looked at supporting AES (256-bit)
+  (128-bit RC4) encryption.  I have looked at supporting AES (128/256-bit)
   encryption, however it is not widely supported and there are incompatible
   changes in PDF 2.0, so it is unlikely to be added to HTMLDOC.
 
@@ -118,7 +118,7 @@
 Legal Stuff
 -----------
 
-HTMLDOC is copyright © 1997-2023 by Michael R Sweet.  This program is free
+HTMLDOC is copyright © 1997-2024 by Michael R Sweet.  This program is free
 software.  Distribution and use rights are outlined in the file "COPYING".
 
 HTMLDOC includes code to encrypt PDF document files using the RC4 algorithm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/htmldoc-1.9.17/configure new/htmldoc-1.9.18/configure
--- old/htmldoc-1.9.17/configure        2023-09-18 03:33:38.000000000 +0200
+++ new/htmldoc-1.9.18/configure        2024-02-12 01:54:12.000000000 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for HTMLDOC 1.9.17.
+# Generated by GNU Autoconf 2.71 for HTMLDOC 1.9.18.
 #
 # Report bugs to <https://github.com/michaelrsweet/htmldoc/issues>.
 #
@@ -610,8 +610,8 @@
 # Identity of this package.
 PACKAGE_NAME='HTMLDOC'
 PACKAGE_TARNAME='htmldoc'
-PACKAGE_VERSION='1.9.17'
-PACKAGE_STRING='HTMLDOC 1.9.17'
+PACKAGE_VERSION='1.9.18'
+PACKAGE_STRING='HTMLDOC 1.9.18'
 PACKAGE_BUGREPORT='https://github.com/michaelrsweet/htmldoc/issues'
 PACKAGE_URL='https://www.msweet.org/htmldoc'
 
@@ -1293,7 +1293,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures HTMLDOC 1.9.17 to adapt to many kinds of systems.
+\`configure' configures HTMLDOC 1.9.18 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1359,7 +1359,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of HTMLDOC 1.9.17:";;
+     short | recursive ) echo "Configuration of HTMLDOC 1.9.18:";;
    esac
   cat <<\_ACEOF
 
@@ -1458,7 +1458,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-HTMLDOC configure 1.9.17
+HTMLDOC configure 1.9.18
 generated by GNU Autoconf 2.71
 
 Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1753,7 +1753,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by HTMLDOC $as_me 1.9.17, which was
+It was created by HTMLDOC $as_me 1.9.18, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -2728,7 +2728,7 @@
 
 
 
-SVERSION="1.9.17"
+SVERSION="1.9.18"
 
 printf "%s\n" "#define SVERSION \"$SVERSION\"" >>confdefs.h
 
@@ -6209,7 +6209,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by HTMLDOC $as_me 1.9.17, which was
+This file was extended by HTMLDOC $as_me 1.9.18, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -6274,7 +6274,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-HTMLDOC config.status 1.9.17
+HTMLDOC config.status 1.9.18
 configured by $0, generated by GNU Autoconf 2.71,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/htmldoc-1.9.17/configure.ac 
new/htmldoc-1.9.18/configure.ac
--- old/htmldoc-1.9.17/configure.ac     2023-09-18 03:33:38.000000000 +0200
+++ new/htmldoc-1.9.18/configure.ac     2024-02-12 01:54:12.000000000 +0100
@@ -1,7 +1,7 @@
 dnl
 dnl Configuration script for HTMLDOC, an HTML document processing program.
 dnl
-dnl Copyright © 2011-2023 by Michael R Sweet.
+dnl Copyright © 2011-2024 by Michael R Sweet.
 dnl Copyright © 1997-2010 by Easy Software Products.
 dnl
 dnl This program is free software.  Distribution and use rights are outlined in
@@ -21,7 +21,7 @@
 AC_PREREQ([2.69])
 
 
-AC_INIT([HTMLDOC], [1.9.17], 
[https://github.com/michaelrsweet/htmldoc/issues], [htmldoc], 
[https://www.msweet.org/htmldoc])
+AC_INIT([HTMLDOC], [1.9.18], 
[https://github.com/michaelrsweet/htmldoc/issues], [htmldoc], 
[https://www.msweet.org/htmldoc])
 AC_CONFIG_HEADERS([config.h])
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/htmldoc-1.9.17/doc/1-intro.html 
new/htmldoc-1.9.18/doc/1-intro.html
--- old/htmldoc-1.9.17/doc/1-intro.html 2023-09-18 03:33:38.000000000 +0200
+++ new/htmldoc-1.9.18/doc/1-intro.html 2024-02-12 01:54:12.000000000 +0100
@@ -1,8 +1,8 @@
 <html>
 <head>
        <meta name="author" content="Michael R Sweet">
-       <meta name="copyright" content="Copyright &copy; 1997-2023, All Rights 
Reserved.">
-       <meta name="docversion" content="htmldoc-1.9.17">
+       <meta name="copyright" content="Copyright &copy; 1997-2024, All Rights 
Reserved.">
+       <meta name="docversion" content="htmldoc-1.9.18">
        <meta name="keywords" content="Software">
        <title>HTMLDOC Users Manual</title>
 </head>
@@ -35,19 +35,19 @@
 
 <ul>
 
-       <li><a href="#INTRO">Chapter 1</a> - Introduction</li>
+       <li><a href="1-intro.html#INTRO">Chapter 1</a> - Introduction</li>
 
-       <li><a href="#USING">Chapter 2</a> - Using HTMLDOC</li>
+       <li><a href="2-using.html#USING">Chapter 2</a> - Using HTMLDOC</li>
 
-       <li><a href="#CMDREF">Chapter 3</a> - Command-Line Reference</li>
+       <li><a href="3-cmdref.html#CMDREF">Chapter 3</a> - Command-Line 
Reference</li>
 
-       <li><a href="#HTMLREF">Chapter 4</a> - HTML Reference</li>
+       <li><a href="4-htmlref.html#HTMLREF">Chapter 4</a> - HTML Reference</li>
 
-       <li><a href="#MDREF">Chapter 5</a> - Markdown Reference</li>
+       <li><a href="5-mdref.html#MDREF">Chapter 5</a> - Markdown Reference</li>
 
-       <li><a href="#LICENSE">Appendix A</a> - License Agreement</li>
+       <li><a href="a-license.html#LICENSE">Appendix A</a> - License 
Agreement</li>
 
-       <li><a href="#BOOKFORMAT">Appendix B</a> - Book File Format</li>
+       <li><a href="b-book.html#BOOKFORMAT">Appendix B</a> - Book File 
Format</li>
 
 </ul>
 
@@ -57,7 +57,7 @@
 
 <h2>Legal Stuff</h2>
 
-<p>HTMLDOC is copyright &copy; 1997-2020 by Michael R Sweet. See <a 
href="#LICENSE">Appendix A - License Agreement</a> for the terms of use. This 
software is based in part on the work of the Independent JPEG Group and FLTK 
project.</p>
+<p>HTMLDOC is copyright &copy; 1997-2024 by Michael R Sweet. See <a 
href="#LICENSE">Appendix A - License Agreement</a> for the terms of use. This 
software is based in part on the work of the Independent JPEG Group and FLTK 
project.</p>
 
 </div>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/htmldoc-1.9.17/htmldoc/gui.cxx 
new/htmldoc-1.9.18/htmldoc/gui.cxx
--- old/htmldoc-1.9.17/htmldoc/gui.cxx  2023-09-18 03:33:38.000000000 +0200
+++ new/htmldoc-1.9.18/htmldoc/gui.cxx  2024-02-12 01:54:12.000000000 +0100
@@ -1,7 +1,7 @@
 //
 // GUI routines for HTMLDOC, an HTML document processing program.
 //
-// Copyright © 2011-2023 by Michael R Sweet.
+// Copyright © 2011-2024 by Michael R Sweet.
 // Copyright © 1997-2010 by Easy Software Products.  All rights reserved.
 //
 // This program is free software.  Distribution and use rights are outlined in
@@ -4284,7 +4284,7 @@
   label->image(&logo);
 
   label = new Fl_Box(60, 45, 530, 35,
-          "HTMLDOC " SVERSION "\nCopyright © 2011-2023 by Michael R Sweet."
+          "HTMLDOC " SVERSION "\nCopyright © 2011-2024 by Michael R Sweet."
          );
   label->align(FL_ALIGN_TOP_LEFT | FL_ALIGN_INSIDE | FL_ALIGN_WRAP);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/htmldoc-1.9.17/htmldoc/htmldoc.cxx 
new/htmldoc-1.9.18/htmldoc/htmldoc.cxx
--- old/htmldoc-1.9.17/htmldoc/htmldoc.cxx      2023-09-18 03:33:38.000000000 
+0200
+++ new/htmldoc-1.9.18/htmldoc/htmldoc.cxx      2024-02-12 01:54:12.000000000 
+0100
@@ -1,7 +1,7 @@
 /*
  * Main entry for HTMLDOC, a HTML document processing program.
  *
- * Copyright 2011-2023 by Michael R Sweet.
+ * Copyright 2011-2024 by Michael R Sweet.
  * Copyright 1997-2010 by Easy Software Products.  All rights reserved.
  *
  * This program is free software.  Distribution and use rights are outlined in
@@ -2617,7 +2617,7 @@
   if (CGIMode)
     puts("Content-Type: text/plain\r\n\r");
 
-  puts("HTMLDOC Version " SVERSION " Copyright 2011-2022 by Michael R Sweet.");
+  puts("HTMLDOC Version " SVERSION " Copyright 2011-2024 by Michael R Sweet.");
   puts("HTMLDOC is provided under the terms of the GNU General Public License 
and");
   puts("comes with absolutely no warranty.  This software is based in part on 
the work");
   puts("of the Independent JPEG Group.");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/htmldoc-1.9.17/htmldoc/htmllib.cxx 
new/htmldoc-1.9.18/htmldoc/htmllib.cxx
--- old/htmldoc-1.9.17/htmldoc/htmllib.cxx      2023-09-18 03:33:38.000000000 
+0200
+++ new/htmldoc-1.9.18/htmldoc/htmllib.cxx      2024-02-12 01:54:12.000000000 
+0100
@@ -1,7 +1,7 @@
 /*
  * HTML parsing routines for HTMLDOC, a HTML document processing program.
  *
- * Copyright 2011-2023 by Michael R Sweet.
+ * Copyright 2011-2024 by Michael R Sweet.
  * Copyright 1997-2010 by Easy Software Products.  All rights reserved.
  *
  * This program is free software.  Distribution and use rights are outlined in
@@ -571,9 +571,23 @@
               break;
            }
        }
+       else if (t->markup == MARKUP_TR)
+       {
+          for (temp = parent; temp != NULL; temp = temp->parent)
+          {
+            if (temp->markup == MARKUP_TR)
+              break;
+            else if (temp->markup == MARKUP_TABLE || t->markup == MARKUP_THEAD 
|| t->markup == MARKUP_TBODY || t->markup == MARKUP_TFOOT || temp->markup == 
MARKUP_EMBED)
+           {
+             temp = NULL;
+              break;
+           }
+         }
+       }
        else if (istentry(t->markup))
        {
           for (temp = parent; temp != NULL; temp = temp->parent)
+          {
             if (istentry(temp->markup))
               break;
            else if (temp->markup == MARKUP_TABLE || istable(temp->markup) ||
@@ -598,6 +612,7 @@
              temp = NULL;
               break;
            }
+         }
        }
        else
           temp = NULL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/htmldoc-1.9.17/htmldoc/license.cxx 
new/htmldoc-1.9.18/htmldoc/license.cxx
--- old/htmldoc-1.9.17/htmldoc/license.cxx      2023-09-18 03:33:38.000000000 
+0200
+++ new/htmldoc-1.9.18/htmldoc/license.cxx      2024-02-12 01:54:12.000000000 
+0100
@@ -2,7 +2,7 @@
 // GUI license dialog routines for HTMLDOC, an HTML document processing
 // program.
 //
-// Copyright 2011-2020 by Michael R Sweet.
+// Copyright 2011-2024 by Michael R Sweet.
 // Copyright 1997-2010 by Easy Software Products.  All rights reserved.
 //
 // This program is free software.  Distribution and use rights are outlined in
@@ -59,7 +59,7 @@
   group->labelsize(18);
 
   box = new Fl_Box(20, 45, 600, 110,
-    "Copyright © 2011-2022 by Michael R Sweet.\n\n"
+    "Copyright © 2011-2024 by Michael R Sweet.\n\n"
     "HTMLDOC is provided under the terms of the GNU General Public License and 
"
     "comes with absolutely no warranty.  Please report problems on the Github "
     "issues page at:\n\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/htmldoc-1.9.17/htmldoc/markdown.cxx 
new/htmldoc-1.9.18/htmldoc/markdown.cxx
--- old/htmldoc-1.9.17/htmldoc/markdown.cxx     2023-09-18 03:33:38.000000000 
+0200
+++ new/htmldoc-1.9.18/htmldoc/markdown.cxx     2024-02-12 01:54:12.000000000 
+0100
@@ -1,7 +1,7 @@
 /*
  * Markdown parsing definitions for HTMLDOC, a HTML document processing 
program.
  *
- * Copyright © 2017-2020 by Michael R Sweet.
+ * Copyright © 2017-2024 by Michael R Sweet.
  *
  * This program is free software.  Distribution and use rights are outlined in
  * the file "COPYING".
@@ -271,24 +271,33 @@
                 *text,                  /* Text to write */
                 *url;                   /* URL to write */
   int          whitespace;             /* Whitespace before text? */
+  unsigned     style;                  /* Style for node */
+  unsigned     typeface;               /* Typeface for node */
+  unsigned     strikethrough;          /* Struck-through text? */
 
 
-  text       = get_text((uchar *)mmdGetText(node));
-  url        = (uchar *)mmdGetURL(node);
-  whitespace = mmdGetWhitespace(node);
+  style         = html->style;
+  strikethrough = html->strikethrough;
+  typeface      = html->typeface;
+  text          = get_text((uchar *)mmdGetText(node));
+  url           = (uchar *)mmdGetURL(node);
+  whitespace    = mmdGetWhitespace(node);
 
   switch (mmdGetType(node))
   {
     case MMD_TYPE_EMPHASIZED_TEXT :
         element = MARKUP_EM;
+        style   = STYLE_ITALIC;
         break;
 
     case MMD_TYPE_STRONG_TEXT :
         element = MARKUP_STRONG;
+        style   = STYLE_BOLD;
         break;
 
     case MMD_TYPE_STRUCK_TEXT :
-        element = MARKUP_DEL;
+        element       = MARKUP_DEL;
+        strikethrough = 1;
         break;
 
     case MMD_TYPE_LINKED_TEXT :
@@ -296,7 +305,8 @@
         break;
 
     case MMD_TYPE_CODE_TEXT :
-        element = MARKUP_CODE;
+        element  = MARKUP_CODE;
+        typeface = _htmlBodyFont >= TYPE_MONOSPACE ? TYPE_MONOSPACE : 
TYPE_COURIER;
         break;
 
     case MMD_TYPE_IMAGE :
@@ -326,7 +336,9 @@
   }
 
   if (element == MARKUP_NONE)
+  {
     parent = html;
+  }
   else if ((parent = html->last_child) == NULL || parent->markup != element)
   {
     if (whitespace)
@@ -335,7 +347,10 @@
       whitespace = 0;
     }
 
-    parent = htmlAddTree(html, element, NULL);
+    parent                = htmlAddTree(html, element, NULL);
+    parent->style         = style;
+    parent->strikethrough = strikethrough;
+    parent->typeface      = typeface;
 
     if (element == MARKUP_A && url)
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/htmldoc-1.9.17/htmldoc/ps-pdf.cxx 
new/htmldoc-1.9.18/htmldoc/ps-pdf.cxx
--- old/htmldoc-1.9.17/htmldoc/ps-pdf.cxx       2023-09-18 03:33:38.000000000 
+0200
+++ new/htmldoc-1.9.18/htmldoc/ps-pdf.cxx       2024-02-12 01:54:12.000000000 
+0100
@@ -6,7 +6,7 @@
  * broken into more manageable pieces once we make all of the output
  * "drivers" into classes...
  *
- * Copyright © 2011-2023 by Michael R Sweet.
+ * Copyright © 2011-2024 by Michael R Sweet.
  * Copyright © 1997-2010 by Easy Software Products.  All rights reserved.
  *
  * This program is free software.  Distribution and use rights are outlined in
@@ -68,7 +68,7 @@
 
 #define HTMLDOC_ASCII85
 //#define HTMLDOC_INTERPOLATION
-#define HTMLDOC_PRODUCER "htmldoc " SVERSION " Copyright 2011-2022 by Michael 
R Sweet"
+#define HTMLDOC_PRODUCER "htmldoc " SVERSION " Copyright 2011-2024 by Michael 
R Sweet"
 
 
 /*
@@ -116,7 +116,7 @@
 {
   short                page,                   /* Page # */
                top;                    /* Top position */
-  uchar                name[124];              /* Reference name */
+  uchar                name[252];              /* Reference name */
 } link_t;
 
 typedef struct                         //// Page information
@@ -320,7 +320,7 @@
 
 static void    check_pages(int page);
 
-static void    add_link(uchar *name, int page, int top);
+static void    add_link(tree_t *html, uchar *name, int page, int top);
 static link_t  *find_link(uchar *name);
 static int     compare_links(link_t *n1, link_t *n2);
 
@@ -1471,14 +1471,12 @@
     * Add chapter header & footer...
     */
 
-    if (page > chapter_starts[chapter] || OutputType != OUTPUT_BOOK)
-      pspdf_prepare_heading(page, print_page, pages[page].header, top,
-                            page_text, sizeof(page_text));
+    if (page == chapter_starts[chapter])
+      pspdf_prepare_heading(page, print_page, pages[page].header1, top, 
page_text, sizeof(page_text));
     else
-      pspdf_prepare_heading(page, print_page, pages[page].header1, top,
-                            page_text, sizeof(page_text));
-    pspdf_prepare_heading(page, print_page, pages[page].footer, 0,
-                          page_text, sizeof(page_text));
+      pspdf_prepare_heading(page, print_page, pages[page].header, top, 
page_text, sizeof(page_text));
+
+    pspdf_prepare_heading(page, print_page, pages[page].footer, 0, page_text, 
sizeof(page_text));
   }
 
  /*
@@ -3837,7 +3835,8 @@
       * Add a target link...
       */
 
-      add_link(link, *page, (int)(*y + height));
+      add_link(NULL, link, *page, (int)(*y + height));
+      add_link(temp, link, *page, (int)(*y + height));
     }
 
     switch (temp->markup)
@@ -3849,7 +3848,8 @@
             * Add a target link...
             */
 
-            add_link(link, *page, (int)(*y + height));
+            add_link(NULL, link, *page, (int)(*y + height));
+            add_link(temp, link, *page, (int)(*y + height));
           }
           break;
 
@@ -4158,7 +4158,8 @@
       * Add a link target using the ID=name variable...
       */
 
-      add_link(name, *page, (int)*y);
+      add_link(NULL, name, *page, (int)*y);
+      add_link(t, name, *page, (int)*y);
     }
     else if (t->markup == MARKUP_FILE)
     {
@@ -4178,7 +4179,7 @@
         *sep = '\0';
 
       // Add the link
-      add_link(newname, *page, (int)*y);
+      add_link(NULL, newname, *page, (int)*y);
     }
 
     if (chapter == 0 && !title_page)
@@ -5347,7 +5348,8 @@
        * Add a target link...
        */
 
-       add_link(link, *page, (int)(*y + height));
+       add_link(NULL, link, *page, (int)(*y + height));
+       add_link(temp, link, *page, (int)(*y + height));
       }
 
       switch (temp->markup)
@@ -5359,7 +5361,8 @@
               * Add a target link...
               */
 
-              add_link(link, *page, (int)(*y + height));
+              add_link(NULL, link, *page, (int)(*y + height));
+              add_link(temp, link, *page, (int)(*y + height));
             }
 
        default :
@@ -5675,7 +5678,8 @@
        * Add a target link...
        */
 
-       add_link(link, *page, (int)(*y + height));
+       add_link(NULL, link, *page, (int)(*y + height));
+       add_link(start, link, *page, (int)(*y + height));
       }
 
       switch (start->markup)
@@ -5691,7 +5695,8 @@
               * Add a target link...
               */
 
-              add_link(link, *page, (int)(*y + height));
+              add_link(NULL, link, *page, (int)(*y + height));
+              add_link(start, link, *page, (int)(*y + height));
             }
             break;
 
@@ -9037,9 +9042,10 @@
  */
 
 static void
-add_link(uchar *name,          /* I - Name of link */
-         int   page,           /* I - Page # */
-         int   top)            /* I - Y position */
+add_link(tree_t *html,         /* I - HTML node */
+         uchar  *name,         /* I - Name of link */
+         int    page,          /* I - Page # */
+         int    top)           /* I - Y position */
 {
   link_t       *temp;          /* New name */
 
@@ -9049,48 +9055,57 @@
 
   DEBUG_printf(("add_link(name=\"%s\", page=%d, top=%d)\n", name, page, top));
 
-  if ((temp = find_link(name)) != NULL)
+  if (!html && (temp = find_link(name)) != NULL)
   {
     temp->page = (short)page;
     temp->top  = (short)top;
+    return;
   }
-  else
-  {
-    // See if we need to allocate memory for links...
-    if (num_links >= alloc_links)
-    {
-      // Allocate more links...
-      alloc_links += ALLOC_LINKS;
 
-      if (num_links == 0)
-        temp = (link_t *)malloc(sizeof(link_t) * alloc_links);
-      else
-        temp = (link_t *)realloc(links, sizeof(link_t) * alloc_links);
+  // See if we need to allocate memory for links...
+  if (num_links >= alloc_links)
+  {
+    // Allocate more links...
+    alloc_links += ALLOC_LINKS;
 
-      if (temp == NULL)
-      {
-       progress_error(HD_ERROR_OUT_OF_MEMORY,
-                       "Unable to allocate memory for %d links - %s",
-                      (int)alloc_links, strerror(errno));
-        alloc_links -= ALLOC_LINKS;
-       return;
-      }
+    if (num_links == 0)
+      temp = (link_t *)malloc(sizeof(link_t) * alloc_links);
+    else
+      temp = (link_t *)realloc(links, sizeof(link_t) * alloc_links);
 
-      links = temp;
+    if (temp == NULL)
+    {
+      progress_error(HD_ERROR_OUT_OF_MEMORY, "Unable to allocate memory for %d 
links - %s", (int)alloc_links, strerror(errno));
+      alloc_links -= ALLOC_LINKS;
+      return;
     }
 
-    // Add a new link...
-    temp = links + num_links;
-    num_links ++;
+    links = temp;
+  }
 
-    strlcpy((char *)temp->name, (char *)name, sizeof(temp->name));
-    temp->page = (short)page;
-    temp->top  = (short)top;
+  // Add a new link...
+  temp = links + num_links;
+  num_links ++;
+
+  if (html)
+  {
+    uchar      *filename;              /* Filename */
 
-    if (num_links > 1)
-      qsort(links, num_links, sizeof(link_t),
-            (compare_func_t)compare_links);
+    if ((filename = htmlGetVariable(html->parent, (uchar *)"_HD_FILENAME")) != 
NULL)
+      snprintf((char *)temp->name, sizeof(temp->name), "%s#%s", (char 
*)filename, (char *)name);
+    else
+      strlcpy((char *)temp->name, (char *)name, sizeof(temp->name));
+  }
+  else
+  {
+    strlcpy((char *)temp->name, (char *)name, sizeof(temp->name));
   }
+
+  temp->page = (short)page;
+  temp->top  = (short)top;
+
+  if (num_links > 1)
+    qsort(links, num_links, sizeof(link_t), (compare_func_t)compare_links);
 }
 
 
@@ -9664,10 +9679,20 @@
 flatten_tree(tree_t *t)                /* I - Markup tree to flatten */
 {
   tree_t       *temp,          /* New tree node */
+               *parent,        /* Parent node (for file info) */
                *flat;          /* Flattened tree */
 
 
-  flat = NULL;
+  flat   = NULL;
+  parent = NULL;
+  for (temp = t; temp != NULL; temp = temp->parent)
+  {
+    if (temp->markup == MARKUP_FILE)
+    {
+      parent = temp;
+      break;
+    }
+  }
 
   while (t != NULL)
   {
@@ -9682,7 +9707,7 @@
       case MARKUP_IMG :
          temp = (tree_t *)calloc(sizeof(tree_t), 1);
          memcpy(temp, t, sizeof(tree_t));
-         temp->parent = NULL;
+         temp->parent = parent;
          temp->child  = NULL;
          temp->prev   = flat;
          temp->next   = NULL;
@@ -9699,7 +9724,7 @@
           {
            temp = (tree_t *)calloc(sizeof(tree_t), 1);
            memcpy(temp, t, sizeof(tree_t));
-           temp->parent = NULL;
+           temp->parent = parent;
            temp->child  = NULL;
            temp->prev   = flat;
            temp->next   = NULL;
@@ -9738,7 +9763,7 @@
       case MARKUP_CAPTION :
          temp = (tree_t *)calloc(sizeof(tree_t), 1);
          temp->markup = MARKUP_BR;
-         temp->parent = NULL;
+         temp->parent = parent;
          temp->child  = NULL;
          temp->prev   = flat;
          temp->next   = NULL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/htmldoc-1.9.17/snap/snapcraft.yaml 
new/htmldoc-1.9.18/snap/snapcraft.yaml
--- old/htmldoc-1.9.17/snap/snapcraft.yaml      2023-09-18 03:33:38.000000000 
+0200
+++ new/htmldoc-1.9.18/snap/snapcraft.yaml      2024-02-12 01:54:12.000000000 
+0100
@@ -1,6 +1,6 @@
 name: htmldoc
-base: core20
-version: 1.9.17
+base: core22
+version: "1.9.18"
 summary: HTML and Markdown conversion utility
 description: |
   HTMLDOC is a program that reads HTML and Markdown source files or web pages
@@ -22,7 +22,7 @@
 
 apps:
     htmldoc:
-        extensions: [gnome-3-38]
+        extensions: [gnome]
         command: usr/bin/htmldoc
         desktop: usr/share/applications/htmldoc.desktop
         plugs: [desktop, home, network, x11]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/htmldoc-1.9.17/vcnet/config.h 
new/htmldoc-1.9.18/vcnet/config.h
--- old/htmldoc-1.9.17/vcnet/config.h   2023-09-18 03:33:38.000000000 +0200
+++ new/htmldoc-1.9.18/vcnet/config.h   2024-02-12 01:54:12.000000000 +0100
@@ -1,7 +1,7 @@
 /*
  * Visual Studio configuration file for HTMLDOC.
  *
- * Copyright © 2011-2023 by Michael R Sweet.
+ * Copyright © 2011-2024 by Michael R Sweet.
  * Copyright © 1997-2010 by Easy Software Products.  All rights reserved.
  *
  * This program is free software.  Distribution and use rights are outlined in
@@ -93,7 +93,7 @@
  * What is the version number for this software?
  */
 
-#define SVERSION       "1.9.17"
+#define SVERSION       "1.9.18"
 
 
 /*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/htmldoc-1.9.17/vcnet/htmldoc-installer.aip 
new/htmldoc-1.9.18/vcnet/htmldoc-installer.aip
--- old/htmldoc-1.9.17/vcnet/htmldoc-installer.aip      2023-09-18 
03:33:38.000000000 +0200
+++ new/htmldoc-1.9.18/vcnet/htmldoc-installer.aip      2024-02-12 
01:54:12.000000000 +0100
@@ -19,7 +19,7 @@
     <ROW Property="ProductCode" 
Value="1033:{20C49885-ABD0-4F20-B13A-3ED4D0888BF8} " Type="16"/>
     <ROW Property="ProductLanguage" Value="1033"/>
     <ROW Property="ProductName" Value="HTMLDOC"/>
-    <ROW Property="ProductVersion" Value="1.9.17.0" Options="32"/>
+    <ROW Property="ProductVersion" Value="1.9.18.0" Options="32"/>
     <ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
     <ROW Property="SecureCustomProperties" 
Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/>
     <ROW Property="UpgradeCode" 
Value="{4016A37E-404B-4785-B768-D4FF161DE6E9}"/>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/htmldoc-1.9.17/xcode/config.h 
new/htmldoc-1.9.18/xcode/config.h
--- old/htmldoc-1.9.17/xcode/config.h   2023-09-18 03:33:38.000000000 +0200
+++ new/htmldoc-1.9.18/xcode/config.h   2024-02-12 01:54:12.000000000 +0100
@@ -1,7 +1,7 @@
 /*
  * Xcode configuration file for HTMLDOC.
  *
- * Copyright © 2011-2023 by Michael R Sweet.
+ * Copyright © 2011-2024 by Michael R Sweet.
  * Copyright © 1997-2010 by Easy Software Products.  All rights reserved.
  *
  * This program is free software.  Distribution and use rights are outlined in
@@ -12,7 +12,7 @@
  * What is the version number for this software?
  */
 
-#define SVERSION "1.9.17"
+#define SVERSION "1.9.18"
 
 
 /*

Reply via email to