From 1f457376b478257b88d4a857f5ec1b6155442dd7 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 20 Sep 2020 03:03:26 +0000 Subject: CTAN sync 202009200303 --- support/dktools/hbtool.ctr | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'support/dktools/hbtool.ctr') diff --git a/support/dktools/hbtool.ctr b/support/dktools/hbtool.ctr index 31075a254e..3a51adcadc 100644 --- a/support/dktools/hbtool.ctr +++ b/support/dktools/hbtool.ctr @@ -2,7 +2,7 @@ copyright owner = Dirk Krause copyright year = 2013-xxxx -license = bsd +SPDX-License-Identifier: BSD-3-Clause @@ -115,6 +115,7 @@ hbtool_write_text_utf(hb_job_t *job, dkChar const *src); #include "dk3all.h" #include "dk3se.h" #include "htmlbook.h" +#include "dk3unused.h" @@ -196,7 +197,14 @@ hbtool_check_filename(hb_job_t *job, dkChar const *fn) dk3_c32_t -hbtool_get_start_char(dkChar const *text, int enc) +hbtool_get_start_char( + dkChar const *text, +#if DK3_CHAR_SIZE > 1 + int DK3_ARG_UNUSED(enc) +#else + int enc +#endif +) { dk3_c32_t back = 0UL; dk3_c32_t c32 = 0UL; /* Start character */ @@ -204,6 +212,9 @@ hbtool_get_start_char(dkChar const *text, int enc) size_t used; /* Number of bytes used */ #if DK3_CHAR_SIZE <= 1 char c; /* Result character */ +#endif +#if DK3_CHAR_SIZE > 1 + DK3_UNUSED_ARG(enc) #endif $? "+ hbtool_get_start_char" if(text) { @@ -229,7 +240,7 @@ hbtool_get_start_char(dkChar const *text, int enc) back &= ((dk3_c32_t)0x000000FFUL); } #endif - } $? "- hbtool_get_start_char 0x%lx %lu", (unsigned long)back, (unsigned long)back + } $? "- hbtool_get_start_char 0x%lx %lu", dk3enc_uc_to_ul(back), dk3enc_uc_to_ul(back) return back; } @@ -300,6 +311,11 @@ hbtool_write_header_number(hb_job_t *job, hb_node_t *nptr) back = 0; $? ". this is impressum" } } + if(job->privacynode) { + if((job->privacynode)->objno == nptr->objno) { + back = 0; $? ". this is privacy" + } + } if(back) { $? ". ok to write number" hbtool_write_header_number(job, nptr->parent); if(1 < nptr->depth) { $? ". write dot" @@ -360,7 +376,7 @@ hbtool_add_url(hb_job_t *job, dkChar const *url) void -hbtool_correct_backslash_to_slash(dkChar *str) +hbtool_correct_backslash_to_slash(dkChar * DK3_ARG_UNUSED(str) ) { #if DK3_ON_WINDOWS dkChar *ptr; @@ -369,6 +385,8 @@ hbtool_correct_backslash_to_slash(dkChar *str) if(dkT('\\') == *ptr) { *ptr = dkT('/'); } ptr++; } +#else + DK3_UNUSED_ARG(str) #endif } @@ -387,6 +405,11 @@ hbtool_write_all_titles(hb_job_t *job, hb_node_t *nptr, int isprim) back = 0; } } + if (job->privacynode) { + if ((job->privacynode)->objno == nptr->objno) { + back = 0; + } + } if (back) { if (hbtool_write_all_titles(job, nptr->parent, 0)) { hbhtml_output_for_text(job, dkT(" → ")); -- cgit v1.2.3